|
1 | 1 | --- |
2 | | -title: "Anchore-Engine" |
| 2 | +title: "Anchore Enterprise Vulnerability" |
3 | 3 | toc_hide: true |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | ### File Types |
7 | 7 | DefectDojo parser accepts a .json file. |
8 | 8 |
|
9 | | -Using the [Anchore CLI](https://docs.anchore.com/current/docs/using/cli_usage/images/inspecting_image_content/) is the most reliable way to generate an Anchore report which DefectDojo can parse. When generating a report with the Anchore CLI, please use the following command to ensure complete data: `anchore-cli --json image vuln <image:tag> all` |
| 9 | +You can generate vulnerability data using the Anchore Enterprise CLI tool, [Anchorectl](https://docs.anchore.com/current/docs/using/cli_usage/images/inspecting_image_content/), or through the Enterprise UI. |
| 10 | + |
| 11 | +## Generating a Vulnerability Report: |
| 12 | +Using Anchorectl: Run the following command to generate a vulnerability report in JSON format |
| 13 | + |
| 14 | + `anchorectl image vulnerabilities ubuntu:latest -o json ` |
| 15 | + |
| 16 | +Using the Anchore UI: Navigate to the desired image in the Anchore Enterprise UI, click on the Vulnerabilities tab, and download the report in JSON format. |
10 | 17 |
|
11 | 18 | ### Acceptable JSON Format |
| 19 | + |
12 | 20 | All properties are strings and are required by the parser. As the parser evolved, two anchore engine parser JSON formats are present till now. Both ([old](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/anchore_engine/many_vulns.json) / [new](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/anchore_engine/new_format_issue_11552.json)) are supported. |
13 | 21 |
|
| 22 | +~~~ |
| 23 | +
|
| 24 | +{ |
| 25 | + |
| 26 | + "vulnerabilityId": "CVE-2023-24531", |
| 27 | + "cves": "CVE-2023-24531", |
| 28 | + "severity": "Critical", |
| 29 | + "detectedAt": "2025-03-18T08:09:03Z", |
| 30 | + "packageType": "Go", |
| 31 | + "path": "/usr/local/bin/gosu", |
| 32 | + "package": "stdlib-go1.18.2", |
| 33 | + "fixAvailable": "1.21.0-0", |
| 34 | + "fixObservedAt": "2025-03-18T08:09:03Z", |
| 35 | + "link": "https://nvd.nist.gov/vuln/detail/CVE-2023-24531", |
| 36 | + "nvdCvssBaseScore": 9.8 |
| 37 | + |
| 38 | +} |
| 39 | +~~~ |
| 40 | + |
| 41 | + |
14 | 42 | ### Sample Scan Data |
15 | | -Sample Anchore-Engine scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/anchore_engine). |
| 43 | +Sample Anchore-Engine scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/anchore_engine) |
0 commit comments