Environment/Affected Version


Aqua SCP



Applicable Versions


4.6


Problem

 

In certain situations you might need to change multiple parameters of your scanning configuration and this can be done using our API in a single call rather than having to do multiple separated calls for every single modification. 


Solution

 

In first instance, you need to get the actual JSON payload of your current settings, by running the below REST API, 

GET --  {{Server_URL}}/api/v1/settings/system/system


Once you have this payload you will be able to modify multiple settings by using as example the below scanning settings and their parameters and the REST API call,


PUT --  {{Server_URL}}/api/v1/settings/system/system


--------------------------------------------------------------------
"scheduled_scan": {
"daily": true,
"days": [],
"enabled": true,
"time": [
4,
0
]
 },

"scheduled_scan": {
"daily": true,
"days": [],
"enabled": false,
"time": [
4,
0
]
},
--------------------------------------------------------------------
"host_auto_image_scan": true,
"host_auto_image_scan": false,
--------------------------------------------------------------------
"strict_scan": true,
"strict_scan": false,
--------------------------------------------------------------------
"use_cvss3": true,
"use_cvss3": false,
--------------------------------------------------------------------
"cli_scans_only": true,
"cli_scans_only": false,
--------------------------------------------------------------------
"show_willnotfix": true,
"show_willnotfix": false,
--------------------------------------------------------------------
"suggest_os_upgrade": true,
"suggest_os_upgrade": false,
--------------------------------------------------------------------
"scan_executables": true,
"scan_executables": false,
--------------------------------------------------------------------
"scan_sensitive_data": true,
"scan_sensitive_data": false,
--------------------------------------------------------------------
"scan_malware": true,
"scan_malware": false,
"scan_elf": true,
"scan_elf": false
--------------------------------------------------------------------
"audit_every_scan": true,
"audit_every_scan": false,
--------------------------------------------------------------------
"save_adhoc_scans": true,
"adhoc_scan_retention": 30,
"save_adhoc_scans": false,
--------------------------------------------------------------------
"manual_pull_fallback": true,
"manual_pull_fallback": false,
--------------------------------------------------------------------
"scan_host_vulnerabilities": true,
"scan_host_vulnerabilities": false,
--------------------------------------------------------------------
"send_scan_results_to_siem": true,
"send_scan_results_to_siem": false,
--------------------------------------------------------------------
"enable_fast_scanning": true,
"enable_fast_scanning": false,
--------------------------------------------------------------------

"scan_timeout": 60,



 

Related information

https://docs.aquasec.com/reference#aqua-api-overview
https://docs.aquasec.com/docs/configure-scan-options