Skip to content

Commit aebba11

Browse files
committed
secureCodeBox#2689 Update all Trivy parser test files to match with the new version
Update snapshot test files. Add a 'Packages' attribute to each result entry to simulate the new Trivy scanner conventions. Set its value as an empty list, as this attribute isnt parsed by the Trivy parser and is only included to match the updated format in Trivy 0.56.0 (aquasecurity/trivy#6765). Signed-off-by: Boris Shek <[email protected]>
1 parent 55f08dc commit aebba11

9 files changed

+70829
-8283
lines changed

scanners/trivy/parser/__snapshots__/parser.test.js.snap

+41,599-4,743
Large diffs are not rendered by default.

scanners/trivy/parser/__testFiles__/juice-shop-v10.2.0.json

+14,256-1,930
Large diffs are not rendered by default.

scanners/trivy/parser/__testFiles__/juice-shop-v12.10.2-empty-results.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"SchemaVersion": 2,
3+
"CreatedAt": "2024-10-28T15:33:51.265546208Z",
34
"ArtifactName": "bkimminich/juice-shop:v12.10.2",
45
"ArtifactType": "container_image",
56
"Metadata": {
@@ -28,7 +29,8 @@
2829
"ImageConfig": {
2930
"architecture": "amd64",
3031
"created": "2021-10-12T21:23:22.113753293Z",
31-
"history": [{
32+
"history": [
33+
{
3234
"created": "2021-08-31T23:18:31.206789071Z",
3335
"created_by": "/bin/sh -c #(nop) ADD file:9d14b11183983923090d9e6d15cc51ee210466296e913bfefbfd580b3de59c95 in / "
3436
},

scanners/trivy/parser/__testFiles__/juice-shop-v12.10.2-no-results.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"SchemaVersion": 2,
3+
"CreatedAt": "2024-10-28T15:33:51.265546208Z",
34
"ArtifactName": "bkimminich/juice-shop:v12.10.2",
45
"ArtifactType": "container_image",
56
"Metadata": {
@@ -28,7 +29,8 @@
2829
"ImageConfig": {
2930
"architecture": "amd64",
3031
"created": "2021-10-12T21:23:22.113753293Z",
31-
"history": [{
32+
"history": [
33+
{
3234
"created": "2021-08-31T23:18:31.206789071Z",
3335
"created_by": "/bin/sh -c #(nop) ADD file:9d14b11183983923090d9e6d15cc51ee210466296e913bfefbfd580b3de59c95 in / "
3436
},

scanners/trivy/parser/__testFiles__/juice-shop-v12.10.2.json

+12,003-1,184
Large diffs are not rendered by default.

scanners/trivy/parser/__testFiles__/k8s-results_unexpected-attribute.json

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"Target": "docker.io/rancher/local-path-provisioner:v0.0.14 (alpine 3.12.0)",
1111
"Class": "os-pkgs",
1212
"Type": "alpine",
13+
"Packages": [],
1314
"Vulnerabilities": [
1415
{
1516
"VulnerabilityID": "CVE-2021-36159",
@@ -65,6 +66,7 @@
6566
"Target": "docker.io/rancher/local-path-provisioner:v0.0.14 (alpine 3.12.0)",
6667
"Class": "os-pkgs",
6768
"Type": "alpine",
69+
"Packages": [],
6870
"Secrets": [
6971
{
7072
"VulnerabilityID": "CVE-a-dummy-secret-finding"

0 commit comments

Comments
 (0)