@@ -31,7 +31,7 @@ Add the following to your `.gitlab-ci.yml`:
include:
# 1: include the template
-project:"to-be-continuous/dependency-track"
ref:"1.1.0"
ref:"1.4.0"
file:"/templates/gitlab-ci-dependency-track.yml"
variables:
@@ -179,6 +179,26 @@ The Dependency Track template uses the following configuration.
| `show-findings` / `DEPTRACK_SHOW_FINDINGS` | Wait for analysis and display found vulnerabilities in logs | _none_ (disabled) |
| `risk-score-threshold` / `DEPTRACK_RISK_SCORE_THRESHOLD` | Fail the job if risk score threshold is exceeded (`<0`: disabled - default: `-1`) | `-1` (disabled) |
### Quality Gate
The job `dependency-track` runs after all the jobs in the pipeline have completed. It will not block the pipeline execution.
The `quality-gate-enabled` / `DEPTRACK_QUALITY_GATE_ENABLED` configuration can be set to `true` to enable a quality gate job `dependency-track-acceptance` that will block the pipeline if the risk score computed by Dependency Track exceeds a certain threshold defined by the `risk-score-threshold` / `DEPTRACK_RISK_SCORE_THRESHOLD` configuration.
:warning: By default, this acceptance job will use the same target project path as the main job, erasing the previous release SBOM files. If you want to keep clean release SBOM files, you should define a different project path for the acceptance job.
You can override the following configuration to customize the quality gate job:
| Input / Variable | Description | Default value |
| `quality-gate-enabled` / `DEPTRACK_QUALITY_GATE_ENABLED` | Enable a job at acceptance stage which will block the pipeline when failing | `false` |
| `quality-gate-base-api-url` / `DEPTRACK_QUALITY_GATE_BASE_API_URL` | Override Dependency Track server base API url (includes `/api`) to use for acceptance stage | _none_ (uses default) |
| :lock: `DEPTRACK_QUALITY_GATE_API_KEY` | Override Dependency Track API key to use for acceptance stage | _none_ (uses default) |
| `quality-gate-project-path` / `DEPTRACK_QUALITY_GATE_PROJECT_PATH` | Override Dependency Track target project path to publish SBOM files to during acceptance stage | _none_ (uses default) |
| `quality-gate-merge` / `DEPTRACK_QUALITY_GATE_MERGE` | Merge all SBOM files into one (default `false`) during acceptance stage | _none_ (uses default) |
| `quality-gate-show-findings` / `DEPTRACK_QUALITY_GATE_SHOW_FINDINGS` | Wait for analysis and display found vulnerabilities in logs during acceptance stage | _none_ (uses default) |
| `quality-gate-risk-score-threshold` / `DEPTRACK_QUALITY_GATE_RISK_SCORE_THRESHOLD` | Fail the job if risk score threshold is exceeded (`<0`: disabled - default: `-1`) during acceptance stage | _none_ (uses default) |
### Secrets management
Here are some advices about your **secrets** (variables marked with a :lock:):