Interface GetCodeFindingResponse.Builder

  • Method Details

    • type

      What kind of finding this is. Determines which of the type-specific members below are populated.

      Parameters:
      type - What kind of finding this is. Determines which of the type-specific members below are populated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      What kind of finding this is. Determines which of the type-specific members below are populated.

      Parameters:
      type - What kind of finding this is. Determines which of the type-specific members below are populated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • title

      The producer's title for the finding.

      Parameters:
      title - The producer's title for the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • severity

      The finding's severity.

      Parameters:
      severity - The finding's severity.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • severity

      The finding's severity.

      Parameters:
      severity - The finding's severity.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • summary

      A one-paragraph description.

      Parameters:
      summary - A one-paragraph description.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • detailedDescription

      GetCodeFindingResponse.Builder detailedDescription(String detailedDescription)

      The full analysis.

      Parameters:
      detailedDescription - The full analysis.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • category

      The producer's vulnerability category. Not a stable filter key across finding types -- see FindingCategory.

      Parameters:
      category - The producer's vulnerability category. Not a stable filter key across finding types -- see FindingCategory.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • subCategory

      GetCodeFindingResponse.Builder subCategory(String subCategory)

      A more specific classification within category.

      Parameters:
      subCategory - A more specific classification within category.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • cweIds

      CWE identifiers classifying the finding.

      Parameters:
      cweIds - CWE identifiers classifying the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • cweIds

      CWE identifiers classifying the finding.

      Parameters:
      cweIds - CWE identifiers classifying the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • owaspCategory

      GetCodeFindingResponse.Builder owaspCategory(String owaspCategory)

      The OWASP Top 10 category, when the producer supplies one.

      Parameters:
      owaspCategory - The OWASP Top 10 category, when the producer supplies one.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • mitigation

      GetCodeFindingResponse.Builder mitigation(String mitigation)

      How to fix the finding.

      Parameters:
      mitigation - How to fix the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • filePath

      The file the finding is about.

      Parameters:
      filePath - The file the finding is about.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • lineNumber

      GetCodeFindingResponse.Builder lineNumber(Integer 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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • cvssBaseScore

      GetCodeFindingResponse.Builder cvssBaseScore(Double 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).

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • affectedPackages

      GetCodeFindingResponse.Builder affectedPackages(Collection<AffectedPackage> affectedPackages)

      Packages implicated by the finding.

      Parameters:
      affectedPackages - Packages implicated by the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • affectedPackages

      GetCodeFindingResponse.Builder affectedPackages(AffectedPackage... affectedPackages)

      Packages implicated by the finding.

      Parameters:
      affectedPackages - Packages implicated by the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • affectedPackages

      GetCodeFindingResponse.Builder affectedPackages(Consumer<AffectedPackage.Builder>... affectedPackages)

      Packages implicated by the finding.

      This is a convenience method that creates an instance of the AffectedPackage.Builder avoiding the need to create one manually via AffectedPackage.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to affectedPackages(List<AffectedPackage>).

      Parameters:
      affectedPackages - a consumer that will call methods on AffectedPackage.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • vulnerableCode

      GetCodeFindingResponse.Builder vulnerableCode(String vulnerableCode)

      The vulnerable code fragment.

      Parameters:
      vulnerableCode - The vulnerable code fragment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • relevantInputs

      GetCodeFindingResponse.Builder relevantInputs(Collection<String> relevantInputs)

      User-controlled inputs that reach the vulnerability.

      Parameters:
      relevantInputs - User-controlled inputs that reach the vulnerability.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • relevantInputs

      GetCodeFindingResponse.Builder relevantInputs(String... relevantInputs)

      User-controlled inputs that reach the vulnerability.

      Parameters:
      relevantInputs - User-controlled inputs that reach the vulnerability.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • stepsToReproduce

      GetCodeFindingResponse.Builder stepsToReproduce(Collection<String> stepsToReproduce)

      Steps to reproduce or exploit the finding.

      Parameters:
      stepsToReproduce - Steps to reproduce or exploit the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • stepsToReproduce

      GetCodeFindingResponse.Builder stepsToReproduce(String... stepsToReproduce)

      Steps to reproduce or exploit the finding.

      Parameters:
      stepsToReproduce - Steps to reproduce or exploit the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • validation

      The validator's assessment. Absent when no validation ran.

      Parameters:
      validation - The validator's assessment. Absent when no validation ran.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • validation

      The validator's assessment. Absent when no validation ran.

      This is a convenience method that creates an instance of the FindingValidation.Builder avoiding the need to create one manually via FindingValidation.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to validation(FindingValidation).

      Parameters:
      validation - a consumer that will call methods on FindingValidation.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • endLine

      The last line of the affected range, from the document's affected_code[].end_line.

      Parameters:
      endLine - The last line of the affected range, from the document's affected_code[].end_line.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • mitreTechniques

      GetCodeFindingResponse.Builder mitreTechniques(Collection<String> mitreTechniques)

      MITRE ATT&CK technique identifiers, from the document's finding_info.attacks[].technique.uid.

      Parameters:
      mitreTechniques - MITRE ATT&CK technique identifiers, from the document's finding_info.attacks[].technique.uid.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • mitreTechniques

      GetCodeFindingResponse.Builder mitreTechniques(String... mitreTechniques)

      MITRE ATT&CK technique identifiers, from the document's finding_info.attacks[].technique.uid.

      Parameters:
      mitreTechniques - MITRE ATT&CK technique identifiers, from the document's finding_info.attacks[].technique.uid.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • remediationReferences

      GetCodeFindingResponse.Builder remediationReferences(Collection<String> remediationReferences)

      Remediation references, from the document's vulnerabilities[].remediation.references.

      Parameters:
      remediationReferences - Remediation references, from the document's vulnerabilities[].remediation.references.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • remediationReferences

      GetCodeFindingResponse.Builder remediationReferences(String... remediationReferences)

      Remediation references, from the document's vulnerabilities[].remediation.references.

      Parameters:
      remediationReferences - Remediation references, from the document's vulnerabilities[].remediation.references.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ocsfClass

      GetCodeFindingResponse.Builder ocsfClass(String ocsfClass)

      The OCSF class the document declared. Determines whether posture is populated.

      Parameters:
      ocsfClass - The OCSF class the document declared. Determines whether posture is populated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • ocsfClass

      The OCSF class the document declared. Determines whether posture is populated.

      Parameters:
      ocsfClass - The OCSF class the document declared. Determines whether posture is populated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • ocsfSchemaVersion

      GetCodeFindingResponse.Builder ocsfSchemaVersion(String ocsfSchemaVersion)

      The OCSF schema version the producer wrote against (metadata.version).

      Parameters:
      ocsfSchemaVersion - The OCSF schema version the producer wrote against (metadata.version).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • productName

      GetCodeFindingResponse.Builder productName(String productName)

      The producing product and vendor (metadata.product).

      Parameters:
      productName - The producing product and vendor (metadata.product).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • productVendorName

      GetCodeFindingResponse.Builder productVendorName(String productVendorName)
      Sets the value of the ProductVendorName property for this object.
      Parameters:
      productVendorName - The new value for the ProductVendorName property for this object.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • productVersion

      GetCodeFindingResponse.Builder productVersion(String productVersion)
      Sets the value of the ProductVersion property for this object.
      Parameters:
      productVersion - The new value for the ProductVersion property for this object.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sourceStatus

      GetCodeFindingResponse.Builder sourceStatus(String 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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • sourceStatusId

      GetCodeFindingResponse.Builder sourceStatusId(Integer sourceStatusId)

      The producer's numeric enum value for sourceStatus.

      Parameters:
      sourceStatusId - The producer's numeric enum value for sourceStatus.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • firstSeenAt

      GetCodeFindingResponse.Builder firstSeenAt(Instant firstSeenAt)

      When the producer first observed the finding (finding_info.first_seen_time). The producer's own clock, not Continuum's.

      Parameters:
      firstSeenAt - When the producer first observed the finding (finding_info.first_seen_time). The producer's own clock, not Continuum's.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • findingTypes

      GetCodeFindingResponse.Builder findingTypes(Collection<String> findingTypes)

      The producer's own classification of the finding (finding_info.types).

      Parameters:
      findingTypes - The producer's own classification of the finding (finding_info.types).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • findingTypes

      GetCodeFindingResponse.Builder findingTypes(String... findingTypes)

      The producer's own classification of the finding (finding_info.types).

      Parameters:
      findingTypes - The producer's own classification of the finding (finding_info.types).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • vulnerabilities

      Every vulnerability the document reported. A document may report several; the flat cveId/ cvssBaseScore/filePath/lineNumber members above carry the first one's identity so a caller that only needs "what and where" does not have to walk this list.

      Parameters:
      vulnerabilities - Every vulnerability the document reported. A document may report several; the flat cveId/ cvssBaseScore/filePath/lineNumber members above carry the first one's identity so a caller that only needs "what and where" does not have to walk this list.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • vulnerabilities

      GetCodeFindingResponse.Builder vulnerabilities(FindingVulnerability... vulnerabilities)

      Every vulnerability the document reported. A document may report several; the flat cveId/ cvssBaseScore/filePath/lineNumber members above carry the first one's identity so a caller that only needs "what and where" does not have to walk this list.

      Parameters:
      vulnerabilities - Every vulnerability the document reported. A document may report several; the flat cveId/ cvssBaseScore/filePath/lineNumber members above carry the first one's identity so a caller that only needs "what and where" does not have to walk this list.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • vulnerabilities

      Every vulnerability the document reported. A document may report several; the flat cveId/ cvssBaseScore/filePath/lineNumber members above carry the first one's identity so a caller that only needs "what and where" does not have to walk this list.

      This is a convenience method that creates an instance of the FindingVulnerability.Builder avoiding the need to create one manually via FindingVulnerability.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to vulnerabilities(List<FindingVulnerability>).

      Parameters:
      vulnerabilities - a consumer that will call methods on FindingVulnerability.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • resources

      Resources the document named (resources[]).

      Parameters:
      resources - Resources the document named (resources[]).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • resources

      Resources the document named (resources[]).

      Parameters:
      resources - Resources the document named (resources[]).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • resources

      Resources the document named (resources[]).

      This is a convenience method that creates an instance of the FindingResource.Builder avoiding the need to create one manually via FindingResource.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to resources(List<FindingResource>).

      Parameters:
      resources - a consumer that will call methods on FindingResource.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • posture

      The compliance posture, for an Application Security Posture Finding. Absent for a vulnerability finding.

      Parameters:
      posture - The compliance posture, for an Application Security Posture Finding. Absent for a vulnerability finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • posture

      The compliance posture, for an Application Security Posture Finding. Absent for a vulnerability finding.

      This is a convenience method that creates an instance of the FindingPosture.Builder avoiding the need to create one manually via FindingPosture.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to posture(FindingPosture).

      Parameters:
      posture - a consumer that will call methods on FindingPosture.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • findingId

      GetCodeFindingResponse.Builder findingId(String findingId)

      The unique identifier of the finding.

      Parameters:
      findingId - The unique identifier of the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • findingArn

      GetCodeFindingResponse.Builder findingArn(String findingArn)

      The ARN of the finding.

      Parameters:
      findingArn - The ARN of the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • environmentId

      GetCodeFindingResponse.Builder environmentId(String environmentId)

      The environment that owns the finding.

      Parameters:
      environmentId - The environment that owns the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • source

      The system that produced the finding.

      Parameters:
      source - The system that produced the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sourceFindingId

      GetCodeFindingResponse.Builder sourceFindingId(String sourceFindingId)

      The producer's own identifier for the finding.

      Parameters:
      sourceFindingId - The producer's own identifier for the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • reportedAt

      GetCodeFindingResponse.Builder reportedAt(Instant reportedAt)

      When the producer reported the finding -- its own clock, which is not Continuum's ingestion time. createdAt is 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 timestamp here asserts the unit and format, not that the instant is genuine.

      Parameters:
      reportedAt - When the producer reported the finding -- its own clock, which is not Continuum's ingestion time. createdAt is 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 timestamp here asserts the unit and format, not that the instant is genuine.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • status

      The current lifecycle status of the finding.

      Parameters:
      status - The current lifecycle status of the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The current lifecycle status of the finding.

      Parameters:
      status - The current lifecycle status of the finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • statusUpdatedAt

      GetCodeFindingResponse.Builder statusUpdatedAt(Instant statusUpdatedAt)

      The timestamp when the status last transitioned.

      Parameters:
      statusUpdatedAt - The timestamp when the status last transitioned.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • createdAt

      The timestamp when the finding was ingested.

      Parameters:
      createdAt - The timestamp when the finding was ingested.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scanRunId

      GetCodeFindingResponse.Builder scanRunId(String 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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • statusMessage

      GetCodeFindingResponse.Builder statusMessage(String statusMessage)

      Human-readable context about the current status.

      Parameters:
      statusMessage - Human-readable context about the current status.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • discardReason

      GetCodeFindingResponse.Builder discardReason(String discardReason)

      Why the finding was not escalated. Present only when status is DISCARDED.

      Parameters:
      discardReason - Why the finding was not escalated. Present only when status is DISCARDED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • discardReason

      Why the finding was not escalated. Present only when status is DISCARDED.

      Parameters:
      discardReason - Why the finding was not escalated. Present only when status is DISCARDED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • discardReasoning

      GetCodeFindingResponse.Builder discardReasoning(String discardReasoning)

      Customer-facing explanation accompanying discardReason.

      Parameters:
      discardReasoning - Customer-facing explanation accompanying discardReason.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • duplicateOfIssueId

      GetCodeFindingResponse.Builder duplicateOfIssueId(String duplicateOfIssueId)

      The existing issue this finding duplicates. Present only for the DUPLICATE_OF_* discard reasons.

      Parameters:
      duplicateOfIssueId - The existing issue this finding duplicates. Present only for the DUPLICATE_OF_* discard reasons.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • createdIssueId

      GetCodeFindingResponse.Builder createdIssueId(String createdIssueId)

      The issue Continuum created from this finding.

      Parameters:
      createdIssueId - The issue Continuum created from this finding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • completedAt

      GetCodeFindingResponse.Builder completedAt(Instant completedAt)

      When processing finished, whether by creating an issue or discarding. Absent while the finding is still in flight.

      Parameters:
      completedAt - When processing finished, whether by creating an issue or discarding. Absent while the finding is still in flight.
      Returns:
      Returns a reference to this object so that method calls can be chained together.