Veracode Application Security Executor¶
Category: Source Code Analysis
Script: veracode.py
Integration: REST API (HMAC)
Faraday Plugin: Raw JSON
Website: https://www.veracode.com/
Description¶
Imports SAST, DAST, SCA and manual findings from Veracode into Faraday. The executor reads the Veracode Applications API and creates one Faraday host per application, with one vulnerability per finding.
Prerequisites¶
- A Veracode account with an API ID and API key (secret) that can read applications and their findings
- Network access to the Veracode API (
api.veracode.com, orapi.veracode.eufor the EU region)
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
VERACODE_HOST |
No | Veracode API URL (default: https://api.veracode.com). Use https://api.veracode.eu for the EU region. |
VERACODE_API_KEY_ID |
Yes | Veracode API ID |
VERACODE_API_KEY_SECRET |
Yes | Veracode API key (secret), as the hex string Veracode shows when you create it |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
VERACODE_APP_GUID |
string | No | GUID of one Veracode application to import. Leave empty to import every application the credentials can see. |
VERACODE_SANDBOX_GUID |
string | No | GUID of a Veracode sandbox. When set, findings are read from that sandbox instead of the application's policy scan. |
VERACODE_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:
veracode:
repo_executor: veracode.py
max_size: 65536
varenvs:
VERACODE_HOST: "https://api.veracode.com"
VERACODE_API_KEY_ID: "<veracode_api_key_id>"
VERACODE_API_KEY_SECRET: "<veracode_api_key_secret>"
params:
VERACODE_APP_GUID:
mandatory: false
type: string
base: string
VERACODE_SANDBOX_GUID:
mandatory: false
type: string
base: string
VERACODE_MIN_SEVERITY:
mandatory: false
type: string
base: string
How It Works¶
- Signs each request with Veracode's HMAC-SHA-256 scheme using
VERACODE_API_KEY_IDandVERACODE_API_KEY_SECRET - Lists applications from
/appsec/v2/applications, or reads only/appsec/v2/applications/{guid}whenVERACODE_APP_GUIDis set - Reads the findings of each application from
/appsec/v2/applications/{guid}/findings, 100 per page, scoped to a sandbox whenVERACODE_SANDBOX_GUIDis set - Maps each finding to a Faraday vulnerability:
- Name: the finding category prefixed with the scan type (
[SAST],[DAST],[SCA]or[MANUAL]) - Severity: Veracode's 0-5 scale (0-1 info, 2 low, 3 medium, 4 high, 5 critical)
- Status: closed findings become closed. Findings resolved as false positive, benign, risk accepted or mitigated become risk-accepted (unless the resolution was rejected). All others are open.
- References: CWE, finding category and Veracode rule or plugin, plus CVEs and the CVSS v3 score for SCA findings
- Description: location, function, URL, affected package and fixed version when Veracode provides them
- Name: the finding category prefixed with the scan type (
Notes¶
- Each application becomes one host with IP
0.0.0.0and the application name as hostname (<name>/sandbox:<guid>when a sandbox is set), because Veracode findings belong to applications rather than IP addresses. - Applications without findings (after the severity filter) are not imported.
- Authentication errors (HTTP 401) stop the run. Other API errors are logged and the affected application or page is skipped.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor. UseVERACODE_MIN_SEVERITYto filter by severity.