Rating a finding in context¶
In this tutorial, we will give one vulnerability two different OWASP risk ratings in two projects, and watch each rating land on its finding.
Severity comes from the vulnerability and says nothing about where we run the affected component. A VEX can carry an OWASP risk rating instead of an analysis decision, so the same component can be risky in one deployment and harmless in another. We will write one document for an internet-facing service and one for a nightly batch job.
What we need¶
- A running Dependency-Track stack from the Quick start, version 5.1.0 or later.
- The
PORTFOLIO_MANAGEMENT,BOM_UPLOAD,VULNERABILITY_MANAGEMENT,VULNERABILITY_ANALYSIS,VIEW_PORTFOLIO, andVIEW_VULNERABILITYpermissions. Theadminaccount has all six.
We will build everything else as we go, so we do not have to wait for a vulnerability mirror.
Creating the two projects¶
We open Projects, select Create Project, and create checkout-api with version 1.0.0.
We repeat this for nightly-report, also version 1.0.0.
Both projects will hold the same component, and only the risk we record differs.
Uploading the same BOM to both projects¶
| billing.cdx.json | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
We open checkout-api, switch to the Components tab, select Upload BOM, and choose the
file. We do the same for nightly-report. Each project now holds one component and no findings.
Creating a vulnerability that affects the component¶
We need a finding to rate, and we write the vulnerability ourselves so that this tutorial produces the same result on every instance.
We open Vulnerabilities and select Create Vulnerability:
| Field | Value |
|---|---|
| Vulnerability ID | INT-BILLING-0001 |
| Title | Incorrect pattern matching in billing-lib |
| Severity | Medium |
On the Affected Components tab, we select the + icon and enter:
| Field | Value |
|---|---|
| Identifier Type | Package URL (PURL) |
| Identifier | pkg:maven/com.example/billing-lib@1.4.2 |
| Version Type | Exact |
The version travels inside the PURL. Dependency-Track drops a PURL it cannot parse without reporting an error, so the identifier has to match what the BOM declares.
After saving, we return to each project and select Reanalyze on the Audit Vulnerabilities
tab. Within a few seconds both projects show one finding for INT-BILLING-0001, each with severity
Medium. We refresh the tab if the finding has not appeared yet.
Both projects carry the same severity, which our two documents will now qualify.
Writing the two VEX documents¶
Each document names the vulnerability and points at the product as a whole, so affects[].ref
carries the bom-ref of metadata.component. See
About VEX for what an import can and cannot change.
| vex-checkout-api.json | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
The first eight factors describe how likely an attack is and the last eight what it costs us, and
the score is those two averages multiplied, out of 81. checkout-api takes traffic from the
internet and handles payments, so both halves run high.
Only the rating changes in the second document. The product name follows the project it describes,
but metadata.component never selects the target: the upload does.
| vex-nightly-report.json | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
Neither document carries an analysis object, and a rating with method: OWASP is enough on its
own.
Applying each document to its project¶
We open checkout-api, select Apply VEX, choose vex-checkout-api.json, and select
Upload. We repeat this on nightly-report with vex-nightly-report.json.
Comparing the results¶
We open the finding for INT-BILLING-0001 in checkout-api and expand it. A field labeled
OWASP RR Vector now holds the vector we sent. The Audit Trail records both values:
1 2 | |
The same finding in nightly-report carries the other vector, and a score of 1.5.
One vulnerability, one component, two deployments, two ratings. The severity stayed Medium in both projects: an imported rating sits beside the severity rather than replacing it.
What's next¶
- Exchanging VEX documents: export decisions, and target individual components rather than the product.
- VEX and VDR documents: the rules an import follows, and why it skips an entry.
- Community integrations: tools that produce these documents for you.