- Checkmarx Documentation
- Checkmarx SAST
- SAST User Guide
- Scan Results
- Configuring and Viewing Scan Metrics
Configuring and Viewing Scan Metrics
Starting from CxSAST 9.4, customers can gather various scan-related metadata, including the scan coverage and performance. By default, gathering the metrics is enabled and the metrics are saved in the database.
Customers can retrieve the metrics data using the GET endpoints described below. Please note that this data can only be retrieved using REST API version 3.
If a customer chooses to disable this feature, as described below, the metrics from subsequent scans will not saved in the database, and GET API calls will return a “No scan metrics found” error. However, the user can still retrieve the metrics from previous scans which occurred when the feature was enabled.
Notice
Upcoming features might require using the data gathered during the scans and it is therefore recommended to keep this feature turned on.
Enabling scan metrics viewing
To enable this option:
Open Swagger.
Open the GENERAL section.
Execute PUT /configurationsExtended/{group} with the following parameters:
o group select Scanning o configurationsList key = “scanMetricsEnabled” o configurationsList value = “True”
For the change to take effect, restart the
CxSystemManager service.
To disable this option:
Open Swagger.
Open the GENERAL section.
Execute PUT /configurationsExtended/{group} with the following parameters:
o group select Scanning o configurationsList key = “scanMetricsEnabled” o configurationsList value = “False”
For the change to take effect, restart the
CxSystemManager service.
Viewing scan metrics
To retrieve the scan metrics the user must have View Results permission.
GET endpoints (API version 3)
The following API calls receive scanId as a parameter and return the specific metrics about the scan.
Endpoint | Description |
---|---|
/sast/scans/{id}/statistics | Gets the basic metrics of a scan |
/sast/scans/{id}/parsedFiles | Gets the detailed metrics for parsed files |
/sast/scans/{id}/failedQueries | Gets the detailed metrics for failed queries |
/sast/scans/{id}/failedGeneralQueries | Gets the detailed metrics for failed general queries |
/sast/scans/{id}/succeeded GeneralQueries | Gets the detailed metrics for successful general queries |
.