Class GetCodeFindingResponse
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<GetCodeFindingResponse.Builder,GetCodeFindingResponse>
Contains the current state and details of the requested finding. Which type-specific members are populated depends on
type.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal List<AffectedPackage> Packages implicated by the finding.builder()final Stringcategory()The producer's vulnerability category.final InstantWhen processing finished, whether by creating an issue or discarding.final InstantThe timestamp when the finding was ingested.final StringThe issue Continuum created from this finding.final StringcveId()The CVE this finding reports, for software-composition findings.final DoubleThe CVSS base score accompanyingcveId, when the producer supplies one, from 0.0 to 10.0.cweIds()CWE identifiers classifying the finding.final StringThe full analysis.final FindingDiscardReasonWhy the finding was not escalated.final StringWhy the finding was not escalated.final StringCustomer-facing explanation accompanyingdiscardReason.final StringThe existing issue this finding duplicates.final IntegerendLine()The last line of the affected range, from the document's affected_code[].end_line.final StringThe environment that owns the finding.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final StringfilePath()The file the finding is about.final StringThe ARN of the finding.final StringThe unique identifier of the finding.The producer's own classification of the finding (finding_info.types).final InstantWhen the producer first observed the finding (finding_info.first_seen_time).final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) Used to retrieve the value of a field from any class that extendsSdkResponse.final booleanFor responses, this returns true if the service returned a value for the AffectedPackages property.final booleanFor responses, this returns true if the service returned a value for the CweIds property.final booleanFor responses, this returns true if the service returned a value for the FindingTypes property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the MitreTechniques property.final booleanFor responses, this returns true if the service returned a value for the RelevantInputs property.final booleanFor responses, this returns true if the service returned a value for the RemediationReferences property.final booleanFor responses, this returns true if the service returned a value for the Resources property.final booleanFor responses, this returns true if the service returned a value for the StepsToReproduce property.final booleanFor responses, this returns true if the service returned a value for the Vulnerabilities property.final IntegerThe 1-indexed line the finding is about.final StringHow to fix the finding.MITRE ATT&CK technique identifiers, from the document's finding_info.attacks[].technique.uid.final FindingOcsfClassThe OCSF class the document declared.final StringThe OCSF class the document declared.final StringThe OCSF schema version the producer wrote against (metadata.version).final StringThe OWASP Top 10 category, when the producer supplies one.final FindingPostureposture()The compliance posture, for an Application Security Posture Finding.final StringThe producing product and vendor (metadata.product).final StringReturns the value of the ProductVendorName property for this object.final StringReturns the value of the ProductVersion property for this object.User-controlled inputs that reach the vulnerability.Remediation references, from the document's vulnerabilities[].remediation.references.final InstantWhen the producer reported the finding -- its own clock, which is not Continuum's ingestion time.final List<FindingResource> Resources the document named (resources[]).final StringThe scan that produced the finding, when it came from one.static Class<? extends GetCodeFindingResponse.Builder> final FindingSeverityIdseverity()The finding's severity.final StringThe finding's severity.final Stringsource()The system that produced the finding.final StringThe producer's own identifier for the finding.final StringThe producer's own status for the finding, and the enum value behind it.final IntegerThe producer's numeric enum value forsourceStatus.final FindingStatusstatus()The current lifecycle status of the finding.final StringThe current lifecycle status of the finding.final StringHuman-readable context about the current status.final InstantThe timestamp when the status last transitioned.Steps to reproduce or exploit the finding.final StringA more specific classification withincategory.final Stringsummary()A one-paragraph description.final Stringtitle()The producer's title for the finding.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final FindingTypetype()What kind of finding this is.final StringWhat kind of finding this is.final FindingValidationThe validator's assessment.final List<FindingVulnerability> Every vulnerability the document reported.final StringThe vulnerable code fragment.Methods inherited from class software.amazon.awssdk.services.continuum.model.ContinuumResponse
responseMetadataMethods inherited from class software.amazon.awssdk.core.SdkResponse
sdkHttpResponseMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
type
What kind of finding this is. Determines which of the type-specific members below are populated.
If the service returns an enum value that is not available in the current SDK version,
typewill returnFindingType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtypeAsString().- Returns:
- What kind of finding this is. Determines which of the type-specific members below are populated.
- See Also:
-
typeAsString
What kind of finding this is. Determines which of the type-specific members below are populated.
If the service returns an enum value that is not available in the current SDK version,
typewill returnFindingType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtypeAsString().- Returns:
- What kind of finding this is. Determines which of the type-specific members below are populated.
- See Also:
-
title
The producer's title for the finding.
- Returns:
- The producer's title for the finding.
-
severity
The finding's severity.
If the service returns an enum value that is not available in the current SDK version,
severitywill returnFindingSeverityId.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromseverityAsString().- Returns:
- The finding's severity.
- See Also:
-
severityAsString
The finding's severity.
If the service returns an enum value that is not available in the current SDK version,
severitywill returnFindingSeverityId.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromseverityAsString().- Returns:
- The finding's severity.
- See Also:
-
summary
-
detailedDescription
-
category
The producer's vulnerability category. Not a stable filter key across finding types -- see FindingCategory.
- Returns:
- The producer's vulnerability category. Not a stable filter key across finding types -- see FindingCategory.
-
subCategory
A more specific classification within
category.- Returns:
- A more specific classification within
category.
-
hasCweIds
public final boolean hasCweIds()For responses, this returns true if the service returned a value for the CweIds property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
cweIds
CWE identifiers classifying the finding.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasCweIds()method.- Returns:
- CWE identifiers classifying the finding.
-
owaspCategory
The OWASP Top 10 category, when the producer supplies one.
- Returns:
- The OWASP Top 10 category, when the producer supplies one.
-
mitigation
-
filePath
The file the finding is about.
- Returns:
- The file the finding is about.
-
lineNumber
The 1-indexed line the finding is about. Bounds are enforced server-side rather than by a constraint trait: a numeric constraint generates a distinct newtype per enclosing structure, so the same concept would not share a type across the create input and the read output.
- Returns:
- The 1-indexed line the finding is about. Bounds are enforced server-side rather than by a constraint trait: a numeric constraint generates a distinct newtype per enclosing structure, so the same concept would not share a type across the create input and the read output.
-
cveId
The CVE this finding reports, for software-composition findings. Both code types can carry one: a customer document supplies it under vulnerabilities[].cve, and Continuum's scanner reports CVEs for dependency-manifest findings.
- Returns:
- The CVE this finding reports, for software-composition findings. Both code types can carry one: a customer document supplies it under vulnerabilities[].cve, and Continuum's scanner reports CVEs for dependency-manifest findings.
-
cvssBaseScore
The CVSS base score accompanying
cveId, when the producer supplies one, from 0.0 to 10.0. Not computed by Continuum. The range is enforced server-side, not by a @range trait -- the smithy-rs server SDK does not support range constraints on double shapes (smithy-rs#2007).- Returns:
- The CVSS base score accompanying
cveId, when the producer supplies one, from 0.0 to 10.0. Not computed by Continuum. The range is enforced server-side, not by a @range trait -- the smithy-rs server SDK does not support range constraints on double shapes (smithy-rs#2007).
-
hasAffectedPackages
public final boolean hasAffectedPackages()For responses, this returns true if the service returned a value for the AffectedPackages property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
affectedPackages
Packages implicated by the finding.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAffectedPackages()method.- Returns:
- Packages implicated by the finding.
-
vulnerableCode
The vulnerable code fragment.
- Returns:
- The vulnerable code fragment.
-
hasRelevantInputs
public final boolean hasRelevantInputs()For responses, this returns true if the service returned a value for the RelevantInputs property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
relevantInputs
User-controlled inputs that reach the vulnerability.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasRelevantInputs()method.- Returns:
- User-controlled inputs that reach the vulnerability.
-
hasStepsToReproduce
public final boolean hasStepsToReproduce()For responses, this returns true if the service returned a value for the StepsToReproduce property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
stepsToReproduce
Steps to reproduce or exploit the finding.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasStepsToReproduce()method.- Returns:
- Steps to reproduce or exploit the finding.
-
validation
The validator's assessment. Absent when no validation ran.
- Returns:
- The validator's assessment. Absent when no validation ran.
-
endLine
The last line of the affected range, from the document's affected_code[].end_line.
- Returns:
- The last line of the affected range, from the document's affected_code[].end_line.
-
hasMitreTechniques
public final boolean hasMitreTechniques()For responses, this returns true if the service returned a value for the MitreTechniques property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
mitreTechniques
MITRE ATT&CK technique identifiers, from the document's finding_info.attacks[].technique.uid.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasMitreTechniques()method.- Returns:
- MITRE ATT&CK technique identifiers, from the document's finding_info.attacks[].technique.uid.
-
hasRemediationReferences
public final boolean hasRemediationReferences()For responses, this returns true if the service returned a value for the RemediationReferences property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
remediationReferences
Remediation references, from the document's vulnerabilities[].remediation.references.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasRemediationReferences()method.- Returns:
- Remediation references, from the document's vulnerabilities[].remediation.references.
-
ocsfClass
The OCSF class the document declared. Determines whether
postureis populated.If the service returns an enum value that is not available in the current SDK version,
ocsfClasswill returnFindingOcsfClass.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromocsfClassAsString().- Returns:
- The OCSF class the document declared. Determines whether
postureis populated. - See Also:
-
ocsfClassAsString
The OCSF class the document declared. Determines whether
postureis populated.If the service returns an enum value that is not available in the current SDK version,
ocsfClasswill returnFindingOcsfClass.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromocsfClassAsString().- Returns:
- The OCSF class the document declared. Determines whether
postureis populated. - See Also:
-
ocsfSchemaVersion
The OCSF schema version the producer wrote against (metadata.version).
- Returns:
- The OCSF schema version the producer wrote against (metadata.version).
-
productName
The producing product and vendor (metadata.product).
- Returns:
- The producing product and vendor (metadata.product).
-
productVendorName
Returns the value of the ProductVendorName property for this object.- Returns:
- The value of the ProductVendorName property for this object.
-
productVersion
Returns the value of the ProductVersion property for this object.- Returns:
- The value of the ProductVersion property for this object.
-
sourceStatus
The producer's own status for the finding, and the enum value behind it. Distinct from
status, which is Continuum's lifecycle state -- a producer may call a finding "New" while Continuum has it SUBMITTED.- Returns:
- The producer's own status for the finding, and the enum value behind it. Distinct from
status, which is Continuum's lifecycle state -- a producer may call a finding "New" while Continuum has it SUBMITTED.
-
sourceStatusId
The producer's numeric enum value for
sourceStatus.- Returns:
- The producer's numeric enum value for
sourceStatus.
-
firstSeenAt
When the producer first observed the finding (finding_info.first_seen_time). The producer's own clock, not Continuum's.
- Returns:
- When the producer first observed the finding (finding_info.first_seen_time). The producer's own clock, not Continuum's.
-
hasFindingTypes
public final boolean hasFindingTypes()For responses, this returns true if the service returned a value for the FindingTypes property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
findingTypes
The producer's own classification of the finding (finding_info.types).
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasFindingTypes()method.- Returns:
- The producer's own classification of the finding (finding_info.types).
-
hasVulnerabilities
public final boolean hasVulnerabilities()For responses, this returns true if the service returned a value for the Vulnerabilities property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
vulnerabilities
Every vulnerability the document reported. A document may report several; the flat
cveId/cvssBaseScore/filePath/lineNumbermembers above carry the first one's identity so a caller that only needs "what and where" does not have to walk this list.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasVulnerabilities()method.- Returns:
- Every vulnerability the document reported. A document may report several; the flat
cveId/cvssBaseScore/filePath/lineNumbermembers above carry the first one's identity so a caller that only needs "what and where" does not have to walk this list.
-
hasResources
public final boolean hasResources()For responses, this returns true if the service returned a value for the Resources property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
resources
Resources the document named (resources[]).
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasResources()method.- Returns:
- Resources the document named (resources[]).
-
posture
The compliance posture, for an Application Security Posture Finding. Absent for a vulnerability finding.
- Returns:
- The compliance posture, for an Application Security Posture Finding. Absent for a vulnerability finding.
-
findingId
The unique identifier of the finding.
- Returns:
- The unique identifier of the finding.
-
findingArn
-
environmentId
The environment that owns the finding.
- Returns:
- The environment that owns the finding.
-
source
The system that produced the finding.
- Returns:
- The system that produced the finding.
-
sourceFindingId
The producer's own identifier for the finding.
- Returns:
- The producer's own identifier for the finding.
-
reportedAt
When the producer reported the finding -- its own clock, which is not Continuum's ingestion time.
createdAtis when Continuum accepted it; these are genuinely different instants and a reader usually wants this one.For CreateCodeFinding, this is the submitted OCSF document's own top-level
time. For findings Continuum's scanner produces, it is the finding's own creation time.Continuum does not validate it for plausibility: a producer's value is echoed as given, so a
timestamphere asserts the unit and format, not that the instant is genuine.- Returns:
- When the producer reported the finding -- its own clock, which is not Continuum's ingestion time.
createdAtis when Continuum accepted it; these are genuinely different instants and a reader usually wants this one.For CreateCodeFinding, this is the submitted OCSF document's own top-level
time. For findings Continuum's scanner produces, it is the finding's own creation time.Continuum does not validate it for plausibility: a producer's value is echoed as given, so a
timestamphere asserts the unit and format, not that the instant is genuine.
-
status
The current lifecycle status of the finding.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnFindingStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- The current lifecycle status of the finding.
- See Also:
-
statusAsString
The current lifecycle status of the finding.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnFindingStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- The current lifecycle status of the finding.
- See Also:
-
statusUpdatedAt
The timestamp when the status last transitioned.
- Returns:
- The timestamp when the status last transitioned.
-
createdAt
The timestamp when the finding was ingested.
- Returns:
- The timestamp when the finding was ingested.
-
scanRunId
The scan that produced the finding, when it came from one. For a finding Continuum's scanner produced, this is the Continuum scan run (see GetCodeScan). For a finding submitted with CreateCodeFinding, it is the OCSF document's
metadata.correlation_uid, when that value is a valid ScanRunId. Absent when the finding did not come from a scan.- Returns:
- The scan that produced the finding, when it came from one. For a finding Continuum's scanner produced,
this is the Continuum scan run (see GetCodeScan). For a finding submitted with CreateCodeFinding, it is
the OCSF document's
metadata.correlation_uid, when that value is a valid ScanRunId. Absent when the finding did not come from a scan.
-
statusMessage
Human-readable context about the current status.
- Returns:
- Human-readable context about the current status.
-
discardReason
Why the finding was not escalated. Present only when status is DISCARDED.
If the service returns an enum value that is not available in the current SDK version,
discardReasonwill returnFindingDiscardReason.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromdiscardReasonAsString().- Returns:
- Why the finding was not escalated. Present only when status is DISCARDED.
- See Also:
-
discardReasonAsString
Why the finding was not escalated. Present only when status is DISCARDED.
If the service returns an enum value that is not available in the current SDK version,
discardReasonwill returnFindingDiscardReason.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromdiscardReasonAsString().- Returns:
- Why the finding was not escalated. Present only when status is DISCARDED.
- See Also:
-
discardReasoning
Customer-facing explanation accompanying
discardReason.- Returns:
- Customer-facing explanation accompanying
discardReason.
-
duplicateOfIssueId
The existing issue this finding duplicates. Present only for the DUPLICATE_OF_* discard reasons.
- Returns:
- The existing issue this finding duplicates. Present only for the DUPLICATE_OF_* discard reasons.
-
createdIssueId
The issue Continuum created from this finding.
- Returns:
- The issue Continuum created from this finding.
-
completedAt
When processing finished, whether by creating an issue or discarding. Absent while the finding is still in flight.
- Returns:
- When processing finished, whether by creating an issue or discarding. Absent while the finding is still in flight.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<GetCodeFindingResponse.Builder,GetCodeFindingResponse> - Specified by:
toBuilderin classAwsResponse- Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode()- Overrides:
hashCodein classAwsResponse
-
equals
- Overrides:
equalsin classAwsResponse
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
Description copied from class:SdkResponseUsed to retrieve the value of a field from any class that extendsSdkResponse. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, theSdkResponse.getValueForField(String, Class)method will again be available.- Overrides:
getValueForFieldin classSdkResponse- Parameters:
fieldName- The name of the member to be retrieved.clazz- The class to cast the returned object to.- Returns:
- Optional containing the casted return value
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-