Skip to main content

aws_sdk_continuum/client/
get_code_finding.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetCodeFinding`](crate::operation::get_code_finding::builders::GetCodeFindingFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`environment_id(impl Into<String>)`](crate::operation::get_code_finding::builders::GetCodeFindingFluentBuilder::environment_id) / [`set_environment_id(Option<String>)`](crate::operation::get_code_finding::builders::GetCodeFindingFluentBuilder::set_environment_id):<br>required: **true**<br>The environment that owns the finding.<br>
7    ///   - [`finding_id(impl Into<String>)`](crate::operation::get_code_finding::builders::GetCodeFindingFluentBuilder::finding_id) / [`set_finding_id(Option<String>)`](crate::operation::get_code_finding::builders::GetCodeFindingFluentBuilder::set_finding_id):<br>required: **true**<br>The unique identifier of the finding to retrieve.<br>
8    /// - On success, responds with [`GetCodeFindingOutput`](crate::operation::get_code_finding::GetCodeFindingOutput) with field(s):
9    ///   - [`r#type(FindingType)`](crate::operation::get_code_finding::GetCodeFindingOutput::type): What kind of finding this is. Determines which of the type-specific members below are populated.
10    ///   - [`title(String)`](crate::operation::get_code_finding::GetCodeFindingOutput::title): The producer's title for the finding.
11    ///   - [`severity(FindingSeverityId)`](crate::operation::get_code_finding::GetCodeFindingOutput::severity): The finding's severity.
12    ///   - [`summary(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::summary): A one-paragraph description.
13    ///   - [`detailed_description(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::detailed_description): The full analysis.
14    ///   - [`category(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::category): The producer's vulnerability category. Not a stable filter key across finding types -- see FindingCategory.
15    ///   - [`sub_category(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::sub_category): A more specific classification within `category`.
16    ///   - [`cwe_ids(Option<Vec::<String>>)`](crate::operation::get_code_finding::GetCodeFindingOutput::cwe_ids): CWE identifiers classifying the finding.
17    ///   - [`owasp_category(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::owasp_category): The OWASP Top 10 category, when the producer supplies one.
18    ///   - [`mitigation(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::mitigation): How to fix the finding.
19    ///   - [`file_path(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::file_path): The file the finding is about.
20    ///   - [`line_number(Option<i32>)`](crate::operation::get_code_finding::GetCodeFindingOutput::line_number): 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.
21    ///   - [`cve_id(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::cve_id): 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.
22    ///   - [`cvss_base_score(Option<f64>)`](crate::operation::get_code_finding::GetCodeFindingOutput::cvss_base_score): 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).
23    ///   - [`affected_packages(Option<Vec::<AffectedPackage>>)`](crate::operation::get_code_finding::GetCodeFindingOutput::affected_packages): Packages implicated by the finding.
24    ///   - [`vulnerable_code(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::vulnerable_code): The vulnerable code fragment.
25    ///   - [`relevant_inputs(Option<Vec::<String>>)`](crate::operation::get_code_finding::GetCodeFindingOutput::relevant_inputs): User-controlled inputs that reach the vulnerability.
26    ///   - [`steps_to_reproduce(Option<Vec::<String>>)`](crate::operation::get_code_finding::GetCodeFindingOutput::steps_to_reproduce): Steps to reproduce or exploit the finding.
27    ///   - [`validation(Option<FindingValidation>)`](crate::operation::get_code_finding::GetCodeFindingOutput::validation): The validator's assessment. Absent when no validation ran.
28    ///   - [`end_line(Option<i32>)`](crate::operation::get_code_finding::GetCodeFindingOutput::end_line): The last line of the affected range, from the document's affected_code\[\].end_line.
29    ///   - [`mitre_techniques(Option<Vec::<String>>)`](crate::operation::get_code_finding::GetCodeFindingOutput::mitre_techniques): MITRE ATT&amp;CK technique identifiers, from the document's finding_info.attacks\[\].technique.uid.
30    ///   - [`remediation_references(Option<Vec::<String>>)`](crate::operation::get_code_finding::GetCodeFindingOutput::remediation_references): Remediation references, from the document's vulnerabilities\[\].remediation.references.
31    ///   - [`ocsf_class(Option<FindingOcsfClass>)`](crate::operation::get_code_finding::GetCodeFindingOutput::ocsf_class): The OCSF class the document declared. Determines whether `posture` is populated.
32    ///   - [`ocsf_schema_version(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::ocsf_schema_version): The OCSF schema version the producer wrote against (metadata.version).
33    ///   - [`product_name(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::product_name): The producing product and vendor (metadata.product).
34    ///   - [`product_vendor_name(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::product_vendor_name): A vulnerability-taxonomy label: the producer's category, sub-category, or OWASP category. Deliberately unconstrained beyond length -- producers do not share a taxonomy, so this is NOT a stable filter key across finding types. Use `cweIds` when a stable classification is needed.
35    ///   - [`product_version(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::product_version): A vulnerability-taxonomy label: the producer's category, sub-category, or OWASP category. Deliberately unconstrained beyond length -- producers do not share a taxonomy, so this is NOT a stable filter key across finding types. Use `cweIds` when a stable classification is needed.
36    ///   - [`source_status(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::source_status): 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.
37    ///   - [`source_status_id(Option<i32>)`](crate::operation::get_code_finding::GetCodeFindingOutput::source_status_id): The producer's numeric enum value for `sourceStatus`.
38    ///   - [`first_seen_at(Option<DateTime>)`](crate::operation::get_code_finding::GetCodeFindingOutput::first_seen_at): When the producer first observed the finding (finding_info.first_seen_time). The producer's own clock, not Continuum's.
39    ///   - [`finding_types(Option<Vec::<String>>)`](crate::operation::get_code_finding::GetCodeFindingOutput::finding_types): The producer's own classification of the finding (finding_info.types).
40    ///   - [`vulnerabilities(Option<Vec::<FindingVulnerability>>)`](crate::operation::get_code_finding::GetCodeFindingOutput::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.
41    ///   - [`resources(Option<Vec::<FindingResource>>)`](crate::operation::get_code_finding::GetCodeFindingOutput::resources): Resources the document named (resources\[\]).
42    ///   - [`posture(Option<FindingPosture>)`](crate::operation::get_code_finding::GetCodeFindingOutput::posture): The compliance posture, for an Application Security Posture Finding. Absent for a vulnerability finding.
43    ///   - [`finding_id(String)`](crate::operation::get_code_finding::GetCodeFindingOutput::finding_id): The unique identifier of the finding.
44    ///   - [`finding_arn(String)`](crate::operation::get_code_finding::GetCodeFindingOutput::finding_arn): The ARN of the finding.
45    ///   - [`environment_id(String)`](crate::operation::get_code_finding::GetCodeFindingOutput::environment_id): The environment that owns the finding.
46    ///   - [`source(String)`](crate::operation::get_code_finding::GetCodeFindingOutput::source): The system that produced the finding.
47    ///   - [`source_finding_id(String)`](crate::operation::get_code_finding::GetCodeFindingOutput::source_finding_id): The producer's own identifier for the finding.
48    ///   - [`reported_at(DateTime)`](crate::operation::get_code_finding::GetCodeFindingOutput::reported_at): 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.
49    ///   - [`status(FindingStatus)`](crate::operation::get_code_finding::GetCodeFindingOutput::status): The current lifecycle status of the finding.
50    ///   - [`status_updated_at(DateTime)`](crate::operation::get_code_finding::GetCodeFindingOutput::status_updated_at): The timestamp when the status last transitioned.
51    ///   - [`created_at(DateTime)`](crate::operation::get_code_finding::GetCodeFindingOutput::created_at): The timestamp when the finding was ingested.
52    ///   - [`scan_run_id(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::scan_run_id): 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.
53    ///   - [`status_message(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::status_message): Human-readable context about the current status.
54    ///   - [`discard_reason(Option<FindingDiscardReason>)`](crate::operation::get_code_finding::GetCodeFindingOutput::discard_reason): Why the finding was not escalated. Present only when status is DISCARDED.
55    ///   - [`discard_reasoning(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::discard_reasoning): Customer-facing explanation accompanying `discardReason`.
56    ///   - [`duplicate_of_issue_id(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::duplicate_of_issue_id): The existing issue this finding duplicates. Present only for the DUPLICATE_OF_* discard reasons.
57    ///   - [`created_issue_id(Option<String>)`](crate::operation::get_code_finding::GetCodeFindingOutput::created_issue_id): The issue Continuum created from this finding.
58    ///   - [`completed_at(Option<DateTime>)`](crate::operation::get_code_finding::GetCodeFindingOutput::completed_at): When processing finished, whether by creating an issue or discarding. Absent while the finding is still in flight.
59    /// - On failure, responds with [`SdkError<GetCodeFindingError>`](crate::operation::get_code_finding::GetCodeFindingError)
60    pub fn get_code_finding(&self) -> crate::operation::get_code_finding::builders::GetCodeFindingFluentBuilder {
61        crate::operation::get_code_finding::builders::GetCodeFindingFluentBuilder::new(self.handle.clone())
62    }
63}