Coverity Connect Executor¶
Category: Source Code Analysis
Script: coverity.py
Integration: REST API (SOAP fallback)
Faraday Plugin: Raw JSON
Website: https://www.blackduck.com/coverity.html
Description¶
Imports static analysis defects from a Coverity Connect server into Faraday. Each Coverity project becomes a host and each defect (CID) becomes a vulnerability.
Prerequisites¶
- A Coverity Connect server (REST API from version 2020.06, older versions through the SOAP fallback)
- A Coverity Connect user (username and password) with permission to view the projects and defects to import
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
COVERITY_HOST |
Yes | Base URL of Coverity Connect (e.g., https://cov.corp.example.com:8443). https:// is added if you enter a bare hostname. |
COVERITY_USER |
Yes | Coverity Connect username |
COVERITY_PASSWORD |
Yes | Coverity Connect password |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
COVERITY_PROJECT |
string | No | Name of a single project to import. Leave blank to import all visible projects. With the SOAP fallback, COVERITY_PROJECT or COVERITY_STREAM is needed. |
COVERITY_STREAM |
string | No | Only import defects of this stream |
COVERITY_MIN_SEVERITY |
string | No | Minimum severity to import: info, low, medium, high or critical (default: info). Coverity reports its impact as high, medium or low. Unrecognized values fall back to info. |
YAML Configuration Example¶
executors:
coverity:
repo_executor: coverity.py
max_size: 65536
varenvs:
COVERITY_HOST: "https://cov.corp.example.com:8443"
COVERITY_USER: "<coverity_user>"
COVERITY_PASSWORD: "<coverity_password>"
params:
COVERITY_PROJECT:
mandatory: false
type: string
base: string
COVERITY_STREAM:
mandatory: false
type: string
base: string
COVERITY_MIN_SEVERITY:
mandatory: false
type: string
base: string
How It Works¶
- Authenticates every request with HTTP Basic using
COVERITY_USERandCOVERITY_PASSWORD - Lists projects with
GET /api/v2/projects(or reads the one inCOVERITY_PROJECT) - For each project, reads its defects with
GET /api/v2/issues(filtered by stream and impact if set) and fetches the details of each one withGET /api/v2/issues/{cid} - If the projects endpoint returns 404, switches to the SOAP
defectservice(/ws/v9/defectservice) used by Coverity Connect 9.x - Creates one vulnerability per defect. Severity comes from Coverity's impact, and classifications such as
False PositiveorIntentionalbecome risk-accepted, whileFixedandDismisseddefects are closed.
Notes¶
- Each project is a host with IP
0.0.0.0and the project name as hostname, because source code defects do not belong to network addresses. - Projects without defects at or above
COVERITY_MIN_SEVERITYare skipped. - TLS certificate verification is disabled for the API calls.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor. UseCOVERITY_MIN_SEVERITYto filter by severity.