/AWS1/IF_INC=>SCANSBOM()¶
About ScanSbom¶
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.
Method Signature¶
METHODS /AWS1/IF_INC~SCANSBOM
IMPORTING
!IO_SBOM TYPE REF TO /AWS1/CL_RT_DOCUMENT OPTIONAL
!IV_OUTPUTFORMAT TYPE /AWS1/INCOUTPUTFORMAT OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_incscansbomresponse
RAISING
/AWS1/CX_INCACCESSDENIEDEX
/AWS1/CX_INCINTERNALSERVEREX
/AWS1/CX_INCTHROTTLINGEX
/AWS1/CX_INCVALIDATIONEX
/AWS1/CX_INCCLIENTEXC
/AWS1/CX_INCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_sbom TYPE REF TO /AWS1/CL_RT_DOCUMENT /AWS1/CL_RT_DOCUMENT¶
The JSON file for the SBOM you want to scan. The SBOM must be in CycloneDX 1.5 format.
Optional arguments:¶
iv_outputformat TYPE /AWS1/INCOUTPUTFORMAT /AWS1/INCOUTPUTFORMAT¶
The output format for the vulnerability report.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_incscansbomresponse /AWS1/CL_INCSCANSBOMRESPONSE¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->scansbom(
io_sbom = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
iv_outputformat = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_value = lo_result->get_sbom( ).
IF lo_value IS NOT INITIAL.
ENDIF.
ENDIF.
Sample ScanSbom Call¶
Sample ScanSbom Call
DATA(lo_result) = lo_client->scansbom(
io_sbom = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"bomFormat":"CycloneDX","specVersion":"1.5","components":[\{|
&& |"type":"library","name":"log4j-core","purl":"pkg:maven/org.a|
&& |pache.logging.log4j/log4j-core@2.17.0"\}]\}| )
iv_outputformat = |CYCLONE_DX_1_5|
).