Skip to main content

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:

  1. Open Swagger.

  2. Open the GENERAL section.

  3. Execute PUT /configurationsExtended/{group} with the following parameters:

    o group select Scanning o configurationsList key = “scanMetricsEnabled” o configurationsList value = “True”

  4. For the change to take effect, restart the

    6436172469.png

    CxSystemManager service.

To disable this option:

  1. Open Swagger.

  2. Open the GENERAL section.

  3. Execute PUT /configurationsExtended/{group} with the following parameters:

    o group select Scanning o configurationsList key = “scanMetricsEnabled” o configurationsList value = “False”

  4. For the change to take effect, restart the

    6436172469.png

    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

.