Checkmarx One Executor¶
Category: Source Code Analysis
Script: checkmarx_one.py
Integration: REST API (OAuth2)
Faraday Plugin: Raw JSON
Website: https://checkmarx.com/product/application-security-platform/
Description¶
Imports findings from Checkmarx One (SAST, SCA, KICS and other engines) into Faraday. Each Checkmarx One project becomes a host and the results of its latest scan are created as vulnerabilities.
Prerequisites¶
- A Checkmarx One tenant with API access
- An OAuth2 client (client ID and secret) with permission to read projects, scans and results
- Network access to the Checkmarx One regional URL
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
CXONE_HOST |
Yes | Checkmarx One regional base URL (e.g., https://ast.checkmarx.net) |
CXONE_TENANT |
Yes | Name of your Checkmarx One tenant, used in the authentication URL |
CXONE_CLIENT_ID |
Yes | OAuth2 client ID |
CXONE_CLIENT_SECRET |
Yes | OAuth2 client secret |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
CXONE_PROJECT_ID |
string | No | ID of a single project to import. Leave blank to import all projects. |
CXONE_BRANCH |
string | No | Only use the latest scan of this branch (e.g., main). Leave blank to use each project's latest scan. |
CXONE_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_one:
repo_executor: checkmarx_one.py
max_size: 65536
varenvs:
CXONE_HOST: "https://ast.checkmarx.net"
CXONE_TENANT: "<tenant_name>"
CXONE_CLIENT_ID: "<client_id>"
CXONE_CLIENT_SECRET: "<client_secret>"
params:
CXONE_PROJECT_ID:
mandatory: false
type: string
base: string
CXONE_BRANCH:
mandatory: false
type: string
base: string
CXONE_MIN_SEVERITY:
mandatory: false
type: string
base: string
How It Works¶
- Requests an access token from
/auth/realms/{CXONE_TENANT}/protocol/openid-connect/tokenusing the client credentials grant - Lists projects with
GET /api/projects(or reads the one inCXONE_PROJECT_ID) - For each project, finds the latest scan with
GET /api/projects/last-scan(filtered byCXONE_BRANCHif set) - Reads the scan results from
GET /api/results/, asking Checkmarx to filter by severity whenCXONE_MIN_SEVERITYis aboveinfo - Creates one vulnerability per result, named with the engine as prefix (e.g.,
[SAST] ...). The description has the file and line or package and fixed version; CWE and other identifiers are added as references. - Maps severity from the Checkmarx value. States
NOT_EXPLOITABLE,PROPOSED_NOT_EXPLOITABLEandIGNOREDbecome 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 findings belong to source code and not to network addresses. - Projects without a scan, or without results at or above
CXONE_MIN_SEVERITY, are skipped. - TLS certificate verification is disabled for the API calls.
- A failed login or a 401 response stops the run; other HTTP errors are written to the agent log.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor. UseCXONE_MIN_SEVERITYto filter by severity.