Skip to content

Commit e8085ba

Browse files
authored
docs: Updated JSON schema version 2 in the trivy documentation (#8188)
1 parent 4f111b9 commit e8085ba

File tree

1 file changed

+175
-100
lines changed

1 file changed

+175
-100
lines changed

docs/docs/configuration/reporting.md

Lines changed: 175 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,21 @@ Then, you can try to update **axios@0.21.4** and **cra-append-sw@2.7.0** to reso
121121
| License ||
122122

123123
```
124-
$ trivy image -f json -o results.json golang:1.12-alpine
124+
$ trivy image -f json -o results.json alpine:latest
125125
```
126126

127127
<details>
128128
<summary>Result</summary>
129129

130130
```
131-
2019-05-16T01:46:31.777+0900 INFO Updating vulnerability database...
132-
2019-05-16T01:47:03.007+0900 INFO Detecting Alpine vulnerabilities...
131+
2024-12-26T22:01:18+05:30 INFO [vuln] Vulnerability scanning is enabled
132+
2024-12-26T22:01:18+05:30 INFO [secret] Secret scanning is enabled
133+
2024-12-26T22:01:18+05:30 INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
134+
2024-12-26T22:01:18+05:30 INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.58/docs/scanner/secret#recommendation for faster secret detection
135+
2024-12-26T22:01:18+05:30 INFO Detected OS family="alpine" version="3.20.3"
136+
2024-12-26T22:01:18+05:30 INFO [alpine] Detecting vulnerabilities... os_version="3.20" repository="3.20" pkg_num=14
137+
2024-12-26T22:01:18+05:30 INFO Number of language-specific files num=0
138+
2024-12-26T22:01:18+05:30 WARN Using severities from other vendors for some vulnerabilities. Read https://aquasecurity.github.io/trivy/v0.58/docs/scanner/vulnerability#severity-selection for details.
133139
```
134140

135141
</details>
@@ -138,107 +144,176 @@ $ trivy image -f json -o results.json golang:1.12-alpine
138144
<summary>JSON</summary>
139145

140146
```
141-
[
142-
{
143-
"Target": "php-app/composer.lock",
144-
"Vulnerabilities": null
145-
},
146-
{
147-
"Target": "node-app/package-lock.json",
148-
"Vulnerabilities": [
149-
{
150-
"VulnerabilityID": "CVE-2018-16487",
151-
"PkgName": "lodash",
152-
"InstalledVersion": "4.17.4",
153-
"FixedVersion": "\u003e=4.17.11",
154-
"Title": "lodash: Prototype pollution in utilities function",
155-
"Description": "A prototype pollution vulnerability was found in lodash \u003c4.17.11 where the functions merge, mergeWith, and defaultsDeep can be tricked into adding or modifying properties of Object.prototype.",
156-
"Severity": "HIGH",
157-
"References": [
158-
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16487",
159-
]
160-
}
161-
]
162-
},
163-
{
164-
"Target": "trivy-ci-test (alpine 3.7.1)",
165-
"Vulnerabilities": [
166-
{
167-
"VulnerabilityID": "CVE-2018-16840",
168-
"PkgName": "curl",
169-
"InstalledVersion": "7.61.0-r0",
170-
"FixedVersion": "7.61.1-r1",
171-
"Title": "curl: Use-after-free when closing \"easy\" handle in Curl_close()",
172-
"Description": "A heap use-after-free flaw was found in curl versions from 7.59.0 through 7.61.1 in the code related to closing an easy handle. ",
173-
"Severity": "HIGH",
174-
"References": [
175-
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16840",
176-
]
177-
},
178-
{
179-
"VulnerabilityID": "CVE-2019-3822",
180-
"PkgName": "curl",
181-
"InstalledVersion": "7.61.0-r0",
182-
"FixedVersion": "7.61.1-r2",
183-
"Title": "curl: NTLMv2 type-3 header stack buffer overflow",
184-
"Description": "libcurl versions from 7.36.0 to before 7.64.0 are vulnerable to a stack-based buffer overflow. ",
185-
"Severity": "HIGH",
186-
"References": [
187-
"https://curl.haxx.se/docs/CVE-2019-3822.html",
188-
"https://lists.apache.org/thread.html/8338a0f605bdbb3a6098bb76f666a95fc2b2f53f37fa1ecc89f1146f@%3Cdevnull.infra.apache.org%3E"
189-
]
190-
},
191-
{
192-
"VulnerabilityID": "CVE-2018-16839",
193-
"PkgName": "curl",
194-
"InstalledVersion": "7.61.0-r0",
195-
"FixedVersion": "7.61.1-r1",
196-
"Title": "curl: Integer overflow leading to heap-based buffer overflow in Curl_sasl_create_plain_message()",
197-
"Description": "Curl versions 7.33.0 through 7.61.1 are vulnerable to a buffer overrun in the SASL authentication code that may lead to denial of service.",
198-
"Severity": "HIGH",
199-
"References": [
200-
"https://github.com/curl/curl/commit/f3a24d7916b9173c69a3e0ee790102993833d6c5",
201-
]
202-
},
203-
{
204-
"VulnerabilityID": "CVE-2018-19486",
205-
"PkgName": "git",
206-
"InstalledVersion": "2.15.2-r0",
207-
"FixedVersion": "2.15.3-r0",
208-
"Title": "git: Improper handling of PATH allows for commands to be executed from the current directory",
209-
"Description": "Git before 2.19.2 on Linux and UNIX executes commands from the current working directory (as if '.' were at the end of $PATH) in certain cases involving the run_command() API and run-command.c, because there was a dangerous change from execvp to execv during 2017.",
210-
"Severity": "HIGH",
211-
"References": [
212-
"https://usn.ubuntu.com/3829-1/",
147+
{
148+
"SchemaVersion": 2,
149+
"CreatedAt": "2024-12-26T21:58:15.943876+05:30",
150+
"ArtifactName": "alpine:latest",
151+
"ArtifactType": "container_image",
152+
"Metadata": {
153+
"OS": {
154+
"Family": "alpine",
155+
"Name": "3.20.3"
156+
},
157+
"ImageID": "sha256:511a44083d3a23416fadc62847c45d14c25cbace86e7a72b2b350436978a0450",
158+
"DiffIDs": [
159+
"sha256:651d9022c23486dfbd396c13db293af6845731cbd098a5f5606db4bc9f5573e8"
160+
],
161+
"RepoTags": [
162+
"alpine:latest"
163+
],
164+
"RepoDigests": [
165+
"alpine@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a"
166+
],
167+
"ImageConfig": {
168+
"architecture": "arm64",
169+
"created": "2024-09-06T12:05:36Z",
170+
"history": [
171+
{
172+
"created": "2024-09-06T12:05:36Z",
173+
"created_by": "ADD alpine-minirootfs-3.20.3-aarch64.tar.gz / # buildkit",
174+
"comment": "buildkit.dockerfile.v0"
175+
},
176+
{
177+
"created": "2024-09-06T12:05:36Z",
178+
"created_by": "CMD [\"/bin/sh\"]",
179+
"comment": "buildkit.dockerfile.v0",
180+
"empty_layer": true
181+
}
182+
],
183+
"os": "linux",
184+
"rootfs": {
185+
"type": "layers",
186+
"diff_ids": [
187+
"sha256:651d9022c23486dfbd396c13db293af6845731cbd098a5f5606db4bc9f5573e8"
213188
]
214189
},
215-
{
216-
"VulnerabilityID": "CVE-2018-17456",
217-
"PkgName": "git",
218-
"InstalledVersion": "2.15.2-r0",
219-
"FixedVersion": "2.15.3-r0",
220-
"Title": "git: arbitrary code execution via .gitmodules",
221-
"Description": "Git before 2.14.5, 2.15.x before 2.15.3, 2.16.x before 2.16.5, 2.17.x before 2.17.2, 2.18.x before 2.18.1, and 2.19.x before 2.19.1 allows remote code execution during processing of a recursive \"git clone\" of a superproject if a .gitmodules file has a URL field beginning with a '-' character.",
222-
"Severity": "HIGH",
223-
"References": [
224-
"http://www.securitytracker.com/id/1041811",
225-
]
190+
"config": {
191+
"Cmd": [
192+
"/bin/sh"
193+
],
194+
"Env": [
195+
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
196+
],
197+
"WorkingDir": "/",
198+
"ArgsEscaped": true
226199
}
227-
]
200+
}
228201
},
229-
{
230-
"Target": "python-app/Pipfile.lock",
231-
"Vulnerabilities": null
232-
},
233-
{
234-
"Target": "ruby-app/Gemfile.lock",
235-
"Vulnerabilities": null
236-
},
237-
{
238-
"Target": "rust-app/Cargo.lock",
239-
"Vulnerabilities": null
240-
}
241-
]
202+
"Results": [
203+
{
204+
"Target": "alpine:latest (alpine 3.20.3)",
205+
"Class": "os-pkgs",
206+
"Type": "alpine",
207+
"Vulnerabilities": [
208+
{
209+
"VulnerabilityID": "CVE-2024-9143",
210+
"PkgID": "libcrypto3@3.3.2-r0",
211+
"PkgName": "libcrypto3",
212+
"PkgIdentifier": {
213+
"PURL": "pkg:apk/alpine/libcrypto3@3.3.2-r0?arch=aarch64\u0026distro=3.20.3",
214+
"UID": "f705555b49cd2259"
215+
},
216+
"InstalledVersion": "3.3.2-r0",
217+
"FixedVersion": "3.3.2-r1",
218+
"Status": "fixed",
219+
"Layer": {
220+
"DiffID": "sha256:651d9022c23486dfbd396c13db293af6845731cbd098a5f5606db4bc9f5573e8"
221+
},
222+
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2024-9143",
223+
"DataSource": {
224+
"ID": "alpine",
225+
"Name": "Alpine Secdb",
226+
"URL": "https://secdb.alpinelinux.org/"
227+
},
228+
"Title": "openssl: Low-level invalid GF(2^m) parameters lead to OOB memory access",
229+
"Description": "Issue summary: Use of the low-level GF(2^m) elliptic curve APIs with untrusted\nexplicit values for the field polynomial can lead to out-of-bounds memory reads\nor writes.\n\nImpact summary: Out of bound memory writes can lead to an application crash or\neven a possibility of a remote code execution, however, in all the protocols\ninvolving Elliptic Curve Cryptography that we're aware of, either only \"named\ncurves\" are supported, or, if explicit curve parameters are supported, they\nspecify an X9.62 encoding of binary (GF(2^m)) curves that can't represent\nproblematic input values. Thus the likelihood of existence of a vulnerable\napplication is low.\n\nIn particular, the X9.62 encoding is used for ECC keys in X.509 certificates,\nso problematic inputs cannot occur in the context of processing X.509\ncertificates. Any problematic use-cases would have to be using an \"exotic\"\ncurve encoding.\n\nThe affected APIs include: EC_GROUP_new_curve_GF2m(), EC_GROUP_new_from_params(),\nand various supporting BN_GF2m_*() functions.\n\nApplications working with \"exotic\" explicit binary (GF(2^m)) curve parameters,\nthat make it possible to represent invalid field polynomials with a zero\nconstant term, via the above or similar APIs, may terminate abruptly as a\nresult of reading or writing outside of array bounds. Remote code execution\ncannot easily be ruled out.\n\nThe FIPS modules in 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.",
230+
"Severity": "LOW",
231+
"CweIDs": [
232+
"CWE-787"
233+
],
234+
"VendorSeverity": {
235+
"amazon": 3,
236+
"redhat": 1,
237+
"ubuntu": 1
238+
},
239+
"CVSS": {
240+
"redhat": {
241+
"V3Vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L",
242+
"V3Score": 3.7
243+
}
244+
},
245+
"References": [
246+
"https://access.redhat.com/security/cve/CVE-2024-9143",
247+
"https://github.com/openssl/openssl/commit/72ae83ad214d2eef262461365a1975707f862712",
248+
"https://github.com/openssl/openssl/commit/bc7e04d7c8d509fb78fc0e285aa948fb0da04700",
249+
"https://github.com/openssl/openssl/commit/c0d3e4d32d2805f49bec30547f225bc4d092e1f4",
250+
"https://github.com/openssl/openssl/commit/fdf6723362ca51bd883295efe206cb5b1cfa5154",
251+
"https://github.openssl.org/openssl/extended-releases/commit/8efc0cbaa8ebba8e116f7b81a876a4123594d86a",
252+
"https://github.openssl.org/openssl/extended-releases/commit/9d576994cec2b7aa37a91740ea7e680810957e41",
253+
"https://nvd.nist.gov/vuln/detail/CVE-2024-9143",
254+
"https://openssl-library.org/news/secadv/20241016.txt",
255+
"https://www.cve.org/CVERecord?id=CVE-2024-9143"
256+
],
257+
"PublishedDate": "2024-10-16T17:15:18.13Z",
258+
"LastModifiedDate": "2024-11-08T16:35:21.58Z"
259+
},
260+
{
261+
"VulnerabilityID": "CVE-2024-9143",
262+
"PkgID": "libssl3@3.3.2-r0",
263+
"PkgName": "libssl3",
264+
"PkgIdentifier": {
265+
"PURL": "pkg:apk/alpine/libssl3@3.3.2-r0?arch=aarch64\u0026distro=3.20.3",
266+
"UID": "c4a39ef718e71832"
267+
},
268+
"InstalledVersion": "3.3.2-r0",
269+
"FixedVersion": "3.3.2-r1",
270+
"Status": "fixed",
271+
"Layer": {
272+
"DiffID": "sha256:651d9022c23486dfbd396c13db293af6845731cbd098a5f5606db4bc9f5573e8"
273+
},
274+
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2024-9143",
275+
"DataSource": {
276+
"ID": "alpine",
277+
"Name": "Alpine Secdb",
278+
"URL": "https://secdb.alpinelinux.org/"
279+
},
280+
"Title": "openssl: Low-level invalid GF(2^m) parameters lead to OOB memory access",
281+
"Description": "Issue summary: Use of the low-level GF(2^m) elliptic curve APIs with untrusted\nexplicit values for the field polynomial can lead to out-of-bounds memory reads\nor writes.\n\nImpact summary: Out of bound memory writes can lead to an application crash or\neven a possibility of a remote code execution, however, in all the protocols\ninvolving Elliptic Curve Cryptography that we're aware of, either only \"named\ncurves\" are supported, or, if explicit curve parameters are supported, they\nspecify an X9.62 encoding of binary (GF(2^m)) curves that can't represent\nproblematic input values. Thus the likelihood of existence of a vulnerable\napplication is low.\n\nIn particular, the X9.62 encoding is used for ECC keys in X.509 certificates,\nso problematic inputs cannot occur in the context of processing X.509\ncertificates. Any problematic use-cases would have to be using an \"exotic\"\ncurve encoding.\n\nThe affected APIs include: EC_GROUP_new_curve_GF2m(), EC_GROUP_new_from_params(),\nand various supporting BN_GF2m_*() functions.\n\nApplications working with \"exotic\" explicit binary (GF(2^m)) curve parameters,\nthat make it possible to represent invalid field polynomials with a zero\nconstant term, via the above or similar APIs, may terminate abruptly as a\nresult of reading or writing outside of array bounds. Remote code execution\ncannot easily be ruled out.\n\nThe FIPS modules in 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.",
282+
"Severity": "LOW",
283+
"CweIDs": [
284+
"CWE-787"
285+
],
286+
"VendorSeverity": {
287+
"amazon": 3,
288+
"redhat": 1,
289+
"ubuntu": 1
290+
},
291+
"CVSS": {
292+
"redhat": {
293+
"V3Vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L",
294+
"V3Score": 3.7
295+
}
296+
},
297+
"References": [
298+
"https://access.redhat.com/security/cve/CVE-2024-9143",
299+
"https://github.com/openssl/openssl/commit/72ae83ad214d2eef262461365a1975707f862712",
300+
"https://github.com/openssl/openssl/commit/bc7e04d7c8d509fb78fc0e285aa948fb0da04700",
301+
"https://github.com/openssl/openssl/commit/c0d3e4d32d2805f49bec30547f225bc4d092e1f4",
302+
"https://github.com/openssl/openssl/commit/fdf6723362ca51bd883295efe206cb5b1cfa5154",
303+
"https://github.openssl.org/openssl/extended-releases/commit/8efc0cbaa8ebba8e116f7b81a876a4123594d86a",
304+
"https://github.openssl.org/openssl/extended-releases/commit/9d576994cec2b7aa37a91740ea7e680810957e41",
305+
"https://nvd.nist.gov/vuln/detail/CVE-2024-9143",
306+
"https://openssl-library.org/news/secadv/20241016.txt",
307+
"https://www.cve.org/CVERecord?id=CVE-2024-9143"
308+
],
309+
"PublishedDate": "2024-10-16T17:15:18.13Z",
310+
"LastModifiedDate": "2024-11-08T16:35:21.58Z"
311+
}
312+
]
313+
}
314+
]
315+
}
316+
242317
```
243318

244319
</details>

0 commit comments

Comments
 (0)