From c2462bb826de19e8489ef98d786177c47d52359d Mon Sep 17 00:00:00 2001 From: DmitriyLewen Date: Mon, 25 Mar 2024 15:15:32 +0600 Subject: [PATCH] test(integration): update golden files using `mage: test:updateGolden` --- .../busybox-with-lockfile.json.golden | 24 +++++++++---------- .../testdata/composer.lock.json.golden | 12 +++++----- integration/testdata/conan.json.golden | 8 +++---- integration/testdata/dotnet.json.golden | 12 +++++----- integration/testdata/gradle.json.golden | 24 +++++++++---------- integration/testdata/mix.lock.json.golden | 12 +++++----- integration/testdata/npm-with-dev.json.golden | 12 +++++----- integration/testdata/npm.json.golden | 12 +++++----- integration/testdata/nuget.json.golden | 12 +++++----- integration/testdata/pipenv.json.golden | 24 +++++++++---------- integration/testdata/pom.json.golden | 24 +++++++++---------- integration/testdata/swift.json.golden | 10 ++++---- integration/testdata/test-repo.json.golden | 20 +++++++++------- integration/testdata/yarn.json.golden | 12 +++++----- .../go.sum | 1 + 15 files changed, 112 insertions(+), 107 deletions(-) diff --git a/integration/testdata/busybox-with-lockfile.json.golden b/integration/testdata/busybox-with-lockfile.json.golden index 0e85c1cc3f19..cbbc29501e95 100644 --- a/integration/testdata/busybox-with-lockfile.json.golden +++ b/integration/testdata/busybox-with-lockfile.json.golden @@ -60,12 +60,6 @@ "PkgIdentifier": { "PURL": "pkg:cargo/ammonia@1.9.0" }, - "Locations": [ - { - "StartLine": 2, - "EndLine": 13 - } - ], "InstalledVersion": "1.9.0", "FixedVersion": "\u003e= 2.1.0", "Status": "fixed", @@ -75,6 +69,12 @@ }, "SeveritySource": "nvd", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-15542", + "Locations": [ + { + "StartLine": 2, + "EndLine": 13 + } + ], "DataSource": { "Name": "RustSec Advisory Database", "URL": "https://github.com/RustSec/advisory-db" @@ -111,12 +111,6 @@ "PkgIdentifier": { "PURL": "pkg:cargo/ammonia@1.9.0" }, - "Locations": [ - { - "StartLine": 2, - "EndLine": 13 - } - ], "InstalledVersion": "1.9.0", "FixedVersion": "\u003e= 3.1.0, \u003e= 2.1.3, \u003c 3.0.0", "Status": "fixed", @@ -126,6 +120,12 @@ }, "SeveritySource": "nvd", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2021-38193", + "Locations": [ + { + "StartLine": 2, + "EndLine": 13 + } + ], "DataSource": { "Name": "RustSec Advisory Database", "URL": "https://github.com/RustSec/advisory-db" diff --git a/integration/testdata/composer.lock.json.golden b/integration/testdata/composer.lock.json.golden index e5043b14671f..e5bc2e03549a 100644 --- a/integration/testdata/composer.lock.json.golden +++ b/integration/testdata/composer.lock.json.golden @@ -70,18 +70,18 @@ "PkgIdentifier": { "PURL": "pkg:composer/guzzlehttp/psr7@1.8.3" }, - "Locations": [ - { - "StartLine": 130, - "EndLine": 245 - } - ], "InstalledVersion": "1.8.3", "FixedVersion": "1.8.4", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-24775", + "Locations": [ + { + "StartLine": 130, + "EndLine": 245 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Composer", diff --git a/integration/testdata/conan.json.golden b/integration/testdata/conan.json.golden index 8027ff3787c8..8b3d6322888d 100644 --- a/integration/testdata/conan.json.golden +++ b/integration/testdata/conan.json.golden @@ -152,16 +152,16 @@ "PkgIdentifier": { "PURL": "pkg:conan/pcre@8.43" }, + "InstalledVersion": "8.43", + "FixedVersion": "8.45", + "Status": "fixed", + "Layer": {}, "Locations": [ { "StartLine": 26, "EndLine": 36 } ], - "InstalledVersion": "8.43", - "FixedVersion": "8.45", - "Status": "fixed", - "Layer": {}, "Severity": "UNKNOWN" } ] diff --git a/integration/testdata/dotnet.json.golden b/integration/testdata/dotnet.json.golden index a8f783b0287a..c1f80f5de8bf 100644 --- a/integration/testdata/dotnet.json.golden +++ b/integration/testdata/dotnet.json.golden @@ -43,18 +43,18 @@ "PkgIdentifier": { "PURL": "pkg:nuget/Newtonsoft.Json@9.0.1" }, - "Locations": [ - { - "StartLine": 8, - "EndLine": 14 - } - ], "InstalledVersion": "9.0.1", "FixedVersion": "13.0.1", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://github.com/advisories/GHSA-5crp-9r3c-p9vr", + "Locations": [ + { + "StartLine": 8, + "EndLine": 14 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Nuget", diff --git a/integration/testdata/gradle.json.golden b/integration/testdata/gradle.json.golden index af388b253ce6..86405f0b8be7 100644 --- a/integration/testdata/gradle.json.golden +++ b/integration/testdata/gradle.json.golden @@ -28,18 +28,18 @@ "PkgIdentifier": { "PURL": "pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.9.1" }, - "Locations": [ - { - "StartLine": 4, - "EndLine": 4 - } - ], "InstalledVersion": "2.9.1", "FixedVersion": "2.9.10.4", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2020-9548", + "Locations": [ + { + "StartLine": 4, + "EndLine": 4 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Maven", @@ -99,18 +99,18 @@ "PkgIdentifier": { "PURL": "pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.9.1" }, - "Locations": [ - { - "StartLine": 4, - "EndLine": 4 - } - ], "InstalledVersion": "2.9.1", "FixedVersion": "2.9.10.7", "Status": "fixed", "Layer": {}, "SeveritySource": "nvd", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2021-20190", + "Locations": [ + { + "StartLine": 4, + "EndLine": 4 + } + ], "DataSource": { "ID": "glad", "Name": "GitLab Advisory Database Community", diff --git a/integration/testdata/mix.lock.json.golden b/integration/testdata/mix.lock.json.golden index 1ab97c6450af..208a4338b57d 100644 --- a/integration/testdata/mix.lock.json.golden +++ b/integration/testdata/mix.lock.json.golden @@ -180,18 +180,18 @@ "PkgIdentifier": { "PURL": "pkg:hex/phoenix@1.6.13" }, - "Locations": [ - { - "StartLine": 4, - "EndLine": 4 - } - ], "InstalledVersion": "1.6.13", "FixedVersion": "1.6.14", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-42975", + "Locations": [ + { + "StartLine": 4, + "EndLine": 4 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Erlang", diff --git a/integration/testdata/npm-with-dev.json.golden b/integration/testdata/npm-with-dev.json.golden index b369fd769bda..73598d092999 100644 --- a/integration/testdata/npm-with-dev.json.golden +++ b/integration/testdata/npm-with-dev.json.golden @@ -282,18 +282,18 @@ "PkgIdentifier": { "PURL": "pkg:npm/jquery@3.3.9" }, - "Locations": [ - { - "StartLine": 11, - "EndLine": 15 - } - ], "InstalledVersion": "3.3.9", "FixedVersion": "3.4.0", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-11358", + "Locations": [ + { + "StartLine": 11, + "EndLine": 15 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Npm", diff --git a/integration/testdata/npm.json.golden b/integration/testdata/npm.json.golden index 542ee213f530..a2acb6bed1c7 100644 --- a/integration/testdata/npm.json.golden +++ b/integration/testdata/npm.json.golden @@ -262,18 +262,18 @@ "PkgIdentifier": { "PURL": "pkg:npm/jquery@3.3.9" }, - "Locations": [ - { - "StartLine": 11, - "EndLine": 15 - } - ], "InstalledVersion": "3.3.9", "FixedVersion": "3.4.0", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-11358", + "Locations": [ + { + "StartLine": 11, + "EndLine": 15 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Npm", diff --git a/integration/testdata/nuget.json.golden b/integration/testdata/nuget.json.golden index 7b3429cc5e83..c5c919505079 100644 --- a/integration/testdata/nuget.json.golden +++ b/integration/testdata/nuget.json.golden @@ -63,18 +63,18 @@ "PkgIdentifier": { "PURL": "pkg:nuget/Newtonsoft.Json@12.0.3" }, - "Locations": [ - { - "StartLine": 5, - "EndLine": 10 - } - ], "InstalledVersion": "12.0.3", "FixedVersion": "13.0.1", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://github.com/advisories/GHSA-5crp-9r3c-p9vr", + "Locations": [ + { + "StartLine": 5, + "EndLine": 10 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Nuget", diff --git a/integration/testdata/pipenv.json.golden b/integration/testdata/pipenv.json.golden index 8e9b426a5907..da7332e0eca7 100644 --- a/integration/testdata/pipenv.json.golden +++ b/integration/testdata/pipenv.json.golden @@ -43,18 +43,18 @@ "PkgIdentifier": { "PURL": "pkg:pypi/werkzeug@0.11.1" }, - "Locations": [ - { - "StartLine": 19, - "EndLine": 26 - } - ], "InstalledVersion": "0.11.1", "FixedVersion": "0.15.3", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-14806", + "Locations": [ + { + "StartLine": 19, + "EndLine": 26 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Pip", @@ -105,18 +105,18 @@ "PkgIdentifier": { "PURL": "pkg:pypi/werkzeug@0.11.1" }, - "Locations": [ - { - "StartLine": 19, - "EndLine": 26 - } - ], "InstalledVersion": "0.11.1", "FixedVersion": "0.11.6", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2020-28724", + "Locations": [ + { + "StartLine": 19, + "EndLine": 26 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Pip", diff --git a/integration/testdata/pom.json.golden b/integration/testdata/pom.json.golden index 705a178af69a..f638612eebbe 100644 --- a/integration/testdata/pom.json.golden +++ b/integration/testdata/pom.json.golden @@ -28,18 +28,18 @@ "PkgIdentifier": { "PURL": "pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.9.1" }, - "Locations": [ - { - "StartLine": 41, - "EndLine": 45 - } - ], "InstalledVersion": "2.9.1", "FixedVersion": "2.9.10.4", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2020-9548", + "Locations": [ + { + "StartLine": 41, + "EndLine": 45 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Maven", @@ -99,18 +99,18 @@ "PkgIdentifier": { "PURL": "pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.9.1" }, - "Locations": [ - { - "StartLine": 41, - "EndLine": 45 - } - ], "InstalledVersion": "2.9.1", "FixedVersion": "2.9.10.7", "Status": "fixed", "Layer": {}, "SeveritySource": "nvd", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2021-20190", + "Locations": [ + { + "StartLine": 41, + "EndLine": 45 + } + ], "DataSource": { "ID": "glad", "Name": "GitLab Advisory Database Community", diff --git a/integration/testdata/swift.json.golden b/integration/testdata/swift.json.golden index 8d587f2c59f7..9d12164d3046 100644 --- a/integration/testdata/swift.json.golden +++ b/integration/testdata/swift.json.golden @@ -60,17 +60,17 @@ "PkgIdentifier": { "PURL": "pkg:swift/github.com/apple/swift-nio@2.41.0" }, + "InstalledVersion": "2.41.0", + "FixedVersion": "2.29.1, 2.39.1, 2.42.0", + "Status": "fixed", + "Layer": {}, + "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-3215", "Locations": [ { "StartLine": 13, "EndLine": 21 } ], - "InstalledVersion": "2.41.0", - "FixedVersion": "2.29.1, 2.39.1, 2.42.0", - "Status": "fixed", - "Layer": {}, - "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-3215", "Title": "SwiftNIO vulnerable to Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')", "Description": "`NIOHTTP1` and projects using it for generating HTTP responses, including SwiftNIO, can be subject to a HTTP Response Injection attack...", "Severity": "MEDIUM", diff --git a/integration/testdata/test-repo.json.golden b/integration/testdata/test-repo.json.golden index 7a3e9cef7cd8..438a24738867 100644 --- a/integration/testdata/test-repo.json.golden +++ b/integration/testdata/test-repo.json.golden @@ -28,16 +28,18 @@ "PkgIdentifier": { "PURL": "pkg:cargo/ammonia@1.9.0" }, - "Locations": [{ - "StartLine": 2, - "EndLine": 13 - }], "InstalledVersion": "1.9.0", "FixedVersion": "\u003e= 2.1.0", "Status": "fixed", "Layer": {}, "SeveritySource": "nvd", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-15542", + "Locations": [ + { + "StartLine": 2, + "EndLine": 13 + } + ], "DataSource": { "Name": "RustSec Advisory Database", "URL": "https://github.com/RustSec/advisory-db" @@ -74,16 +76,18 @@ "PkgIdentifier": { "PURL": "pkg:cargo/ammonia@1.9.0" }, - "Locations": [{ - "StartLine": 2, - "EndLine": 13 - }], "InstalledVersion": "1.9.0", "FixedVersion": "\u003e= 3.1.0, \u003e= 2.1.3, \u003c 3.0.0", "Status": "fixed", "Layer": {}, "SeveritySource": "nvd", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2021-38193", + "Locations": [ + { + "StartLine": 2, + "EndLine": 13 + } + ], "DataSource": { "Name": "RustSec Advisory Database", "URL": "https://github.com/RustSec/advisory-db" diff --git a/integration/testdata/yarn.json.golden b/integration/testdata/yarn.json.golden index 7d0fe3ff8543..c74fbed2d7ce 100644 --- a/integration/testdata/yarn.json.golden +++ b/integration/testdata/yarn.json.golden @@ -48,18 +48,18 @@ "PkgIdentifier": { "PURL": "pkg:npm/jquery@3.2.1" }, - "Locations": [ - { - "StartLine": 10, - "EndLine": 13 - } - ], "InstalledVersion": "3.2.1", "FixedVersion": "3.4.0", "Status": "fixed", "Layer": {}, "SeveritySource": "ghsa", "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-11358", + "Locations": [ + { + "StartLine": 10, + "EndLine": 13 + } + ], "DataSource": { "ID": "ghsa", "Name": "GitHub Security Advisory Npm", diff --git a/pkg/dependency/parser/golang/mod/testdata/replaced-with-local-path-and-version-mismatch/go.sum b/pkg/dependency/parser/golang/mod/testdata/replaced-with-local-path-and-version-mismatch/go.sum index 3d1d7c0e3913..8a219a39d474 100644 --- a/pkg/dependency/parser/golang/mod/testdata/replaced-with-local-path-and-version-mismatch/go.sum +++ b/pkg/dependency/parser/golang/mod/testdata/replaced-with-local-path-and-version-mismatch/go.sum @@ -50,6 +50,7 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=