/AWS1/IF_GUS=>GETFINDINGS()¶
About GetFindings¶
Returns a list of all findings generated by a particular scan.
Method Signature¶
METHODS /AWS1/IF_GUS~GETFINDINGS
IMPORTING
!IV_SCANNAME TYPE /AWS1/GUSSCANNAME OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/GUSNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/GUSINTEGER OPTIONAL
!IV_STATUS TYPE /AWS1/GUSSTATUS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gusgetfindingsrsp
RAISING
/AWS1/CX_GUSACCESSDENIEDEX
/AWS1/CX_GUSCONFLICTEXCEPTION
/AWS1/CX_GUSINTERNALSERVEREX
/AWS1/CX_GUSRESOURCENOTFOUNDEX
/AWS1/CX_GUSTHROTTLINGEX
/AWS1/CX_GUSVALIDATIONEX
/AWS1/CX_GUSCLIENTEXC
/AWS1/CX_GUSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_scanname TYPE /AWS1/GUSSCANNAME /AWS1/GUSSCANNAME¶
The name of the scan you want to retrieve findings from.
Optional arguments:¶
iv_nexttoken TYPE /AWS1/GUSNEXTTOKEN /AWS1/GUSNEXTTOKEN¶
A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the
nextTokenvalue returned from the previous request to continue listing results after the first page.
iv_maxresults TYPE /AWS1/GUSINTEGER /AWS1/GUSINTEGER¶
The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the
nextTokenelement is returned in the response. UsenextTokenin a subsequent request to retrieve additional results. If not specified, returns 1000 results.
iv_status TYPE /AWS1/GUSSTATUS /AWS1/GUSSTATUS¶
The status of the findings you want to get. Pass either
Open,Closed, orAll.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_gusgetfindingsrsp /AWS1/CL_GUSGETFINDINGSRSP¶
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->getfindings(
iv_maxresults = 123
iv_nexttoken = |string|
iv_scanname = |string|
iv_status = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_findings( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_timestamp = lo_row_1->get_createdat( ).
lv_string = lo_row_1->get_description( ).
lv_string = lo_row_1->get_generatorid( ).
lv_string = lo_row_1->get_id( ).
lv_timestamp = lo_row_1->get_updatedat( ).
lv_string = lo_row_1->get_type( ).
lv_status = lo_row_1->get_status( ).
lo_resource = lo_row_1->get_resource( ).
IF lo_resource IS NOT INITIAL.
lv_string = lo_resource->get_id( ).
lv_string = lo_resource->get_subresourceid( ).
ENDIF.
lo_vulnerability = lo_row_1->get_vulnerability( ).
IF lo_vulnerability IS NOT INITIAL.
LOOP AT lo_vulnerability->get_referenceurls( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_vulnerability->get_relatedvulnerabilities( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_vulnerability->get_id( ).
lo_filepath = lo_vulnerability->get_filepath( ).
IF lo_filepath IS NOT INITIAL.
lv_string = lo_filepath->get_name( ).
lv_string = lo_filepath->get_path( ).
lv_integer = lo_filepath->get_startline( ).
lv_integer = lo_filepath->get_endline( ).
LOOP AT lo_filepath->get_codesnippet( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_integer = lo_row_7->get_number( ).
lv_string = lo_row_7->get_content( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_integer = lo_vulnerability->get_itemcount( ).
ENDIF.
lv_severity = lo_row_1->get_severity( ).
lo_remediation = lo_row_1->get_remediation( ).
IF lo_remediation IS NOT INITIAL.
lo_recommendation = lo_remediation->get_recommendation( ).
IF lo_recommendation IS NOT INITIAL.
lv_string = lo_recommendation->get_text( ).
lv_string = lo_recommendation->get_url( ).
ENDIF.
LOOP AT lo_remediation->get_suggestedfixes( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_string = lo_row_9->get_description( ).
lv_string = lo_row_9->get_code( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_string = lo_row_1->get_title( ).
LOOP AT lo_row_1->get_detectortags( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_string = lo_row_11->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_row_1->get_detectorid( ).
lv_string = lo_row_1->get_detectorname( ).
lv_string = lo_row_1->get_ruleid( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.