scanSbom

abstract suspend fun scanSbom(input: ScanSbomRequest): ScanSbomResponse

Scans a provided CycloneDX 1.5 SBOM and reports on any vulnerabilities discovered in that SBOM. You can generate compatible SBOMs for your resources using the Amazon Inspector SBOM generator.

Samples

import aws.smithy.kotlin.runtime.content.Document
import aws.smithy.kotlin.runtime.content.buildDocument
fun main() { 
   //sampleStart 
   // Sample ScanSbom Call
val resp = inspectorScanClient.scanSbom {
    outputFormat = OutputFormat.fromValue("CYCLONE_DX_1_5")
    sbom = buildDocument {
        "bomFormat" to Document("CycloneDX")
        "specVersion" to Document("1.5")
        "components" to Document(
            listOf(
                buildDocument {
                    "type" to Document("library")
                    "name" to Document("log4j-core")
                    "purl" to Document("pkg:maven/org.apache.logging.log4j/log4j-core@2.17.0")
                },

            )
        )
    }
} 
   //sampleEnd
}