Checkmarx SCA Executor¶
Category: Source Code Analysis
Script: checkmarx_sca.py
Integration: REST API
Faraday Plugin: Raw JSON
Website: https://checkmarx.com/cxsca-open-source-scanning/
Description¶
Imports open source dependency vulnerabilities (SCA findings) from Checkmarx SCA into Faraday. Each Checkmarx SCA project becomes a host and the vulnerabilities of its latest scan are created under it.
Prerequisites¶
- A Checkmarx SCA tenant with API access
- An access token (bearer token) with permission to read projects, scans and vulnerabilities
- Network access to the Checkmarx SCA API for your region
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
CXSCA_HOST |
Yes | Checkmarx SCA API base URL for your region (e.g., https://api-sca.checkmarx.net or https://eu.api-sca.checkmarx.net) |
CXSCA_ACCESS_TOKEN |
Yes | Access token sent as a Bearer token on every request |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
CXSCA_PROJECT_ID |
string | No | ID of a single project to import. Leave blank to import all projects. |
CXSCA_MIN_SEVERITY |
string | No | Minimum severity to import: info, low, medium, high or critical (default: info). Any other value stops the run. |
YAML Configuration Example¶
executors:
checkmarx_sca:
repo_executor: checkmarx_sca.py
max_size: 65536
varenvs:
CXSCA_HOST: "https://api-sca.checkmarx.net"
CXSCA_ACCESS_TOKEN: "<access_token>"
params:
CXSCA_PROJECT_ID:
mandatory: false
type: string
base: string
CXSCA_MIN_SEVERITY:
mandatory: false
type: string
base: string
How It Works¶
- Lists the projects with
GET /api/projects, or reads one project withGET /api/projects/{id}whenCXSCA_PROJECT_IDis set - For each project, looks up its scans and picks the most recent finished one
- Reads the scan's vulnerabilities from
GET /api/scans/{id}/vulnerabilities - Creates one vulnerability per finding (name prefixed with
[SCA]). The description includes the package and version, ecosystem, fixed version and publication date; CVEs, CWE and advisories are added as references. - Maps severity from the Checkmarx label (or the CVSS score when there is no label). Triage states such as
NOT_EXPLOITABLE,IGNOREDandSNOOZEDbecome risk-accepted,FIXED/RESOLVEDbecome closed, everything else is open.
Notes¶
- Each project is a host with IP
0.0.0.0and the project name as hostname, because SCA findings belong to dependencies and not to network addresses. - Projects without a scan, or without findings at or above
CXSCA_MIN_SEVERITY, are skipped. - TLS certificate verification is disabled for the API calls.
- A 401 response stops the run; other HTTP errors are written to the agent log and the affected data is skipped.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor. UseCXSCA_MIN_SEVERITYto filter by severity.