mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
fix(go): Do not trim v prefix from versions in Go Mod Analyzer (#7733)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
This commit is contained in:
committed by
GitHub
parent
78827768a6
commit
e872ec006c
@@ -11,7 +11,7 @@
|
||||
{
|
||||
"@id": "pkg:golang/github.com/testdata/testdata",
|
||||
"subcomponents": [
|
||||
{ "@id": "pkg:golang/github.com/open-policy-agent/opa@0.35.0" }
|
||||
{ "@id": "pkg:golang/github.com/open-policy-agent/opa@v0.35.0" }
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
24
integration/testdata/gomod-skip.json.golden
vendored
24
integration/testdata/gomod-skip.json.golden
vendored
@@ -26,10 +26,10 @@
|
||||
"PkgID": "github.com/docker/distribution@v2.7.1+incompatible",
|
||||
"PkgName": "github.com/docker/distribution",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@2.7.1%2Bincompatible",
|
||||
"UID": "de19cd663ca047a8"
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@v2.7.1%2Bincompatible",
|
||||
"UID": "9d949a7b01249e68"
|
||||
},
|
||||
"InstalledVersion": "2.7.1+incompatible",
|
||||
"InstalledVersion": "v2.7.1+incompatible",
|
||||
"FixedVersion": "v2.8.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -53,10 +53,10 @@
|
||||
"PkgID": "github.com/open-policy-agent/opa@v0.35.0",
|
||||
"PkgName": "github.com/open-policy-agent/opa",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/open-policy-agent/opa@0.35.0",
|
||||
"UID": "6b685002e082ffc5"
|
||||
"PURL": "pkg:golang/github.com/open-policy-agent/opa@v0.35.0",
|
||||
"UID": "e89e2b0d8977e2a"
|
||||
},
|
||||
"InstalledVersion": "0.35.0",
|
||||
"InstalledVersion": "v0.35.0",
|
||||
"FixedVersion": "0.37.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -100,10 +100,10 @@
|
||||
"PkgID": "golang.org/x/text@v0.3.6",
|
||||
"PkgName": "golang.org/x/text",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/golang.org/x/text@0.3.6",
|
||||
"UID": "825dc613c0f39d45"
|
||||
"PURL": "pkg:golang/golang.org/x/text@v0.3.6",
|
||||
"UID": "3050088ce9eb2ce4"
|
||||
},
|
||||
"InstalledVersion": "0.3.6",
|
||||
"InstalledVersion": "v0.3.6",
|
||||
"FixedVersion": "0.3.7",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -133,10 +133,10 @@
|
||||
"PkgID": "github.com/docker/distribution@v2.7.1+incompatible",
|
||||
"PkgName": "github.com/docker/distribution",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@2.7.1%2Bincompatible",
|
||||
"UID": "94376dc37054a7e8"
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@v2.7.1%2Bincompatible",
|
||||
"UID": "2f7f0fa81860b8f1"
|
||||
},
|
||||
"InstalledVersion": "2.7.1+incompatible",
|
||||
"InstalledVersion": "v2.7.1+incompatible",
|
||||
"FixedVersion": "v2.8.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
|
||||
24
integration/testdata/gomod-vex.json.golden
vendored
24
integration/testdata/gomod-vex.json.golden
vendored
@@ -26,10 +26,10 @@
|
||||
"PkgID": "github.com/docker/distribution@v2.7.1+incompatible",
|
||||
"PkgName": "github.com/docker/distribution",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@2.7.1%2Bincompatible",
|
||||
"UID": "de19cd663ca047a8"
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@v2.7.1%2Bincompatible",
|
||||
"UID": "9d949a7b01249e68"
|
||||
},
|
||||
"InstalledVersion": "2.7.1+incompatible",
|
||||
"InstalledVersion": "v2.7.1+incompatible",
|
||||
"FixedVersion": "v2.8.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -53,10 +53,10 @@
|
||||
"PkgID": "golang.org/x/text@v0.3.6",
|
||||
"PkgName": "golang.org/x/text",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/golang.org/x/text@0.3.6",
|
||||
"UID": "825dc613c0f39d45"
|
||||
"PURL": "pkg:golang/golang.org/x/text@v0.3.6",
|
||||
"UID": "3050088ce9eb2ce4"
|
||||
},
|
||||
"InstalledVersion": "0.3.6",
|
||||
"InstalledVersion": "v0.3.6",
|
||||
"FixedVersion": "0.3.7",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -86,10 +86,10 @@
|
||||
"PkgID": "github.com/docker/distribution@v2.7.1+incompatible",
|
||||
"PkgName": "github.com/docker/distribution",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@2.7.1%2Bincompatible",
|
||||
"UID": "94376dc37054a7e8"
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@v2.7.1%2Bincompatible",
|
||||
"UID": "2f7f0fa81860b8f1"
|
||||
},
|
||||
"InstalledVersion": "2.7.1+incompatible",
|
||||
"InstalledVersion": "v2.7.1+incompatible",
|
||||
"FixedVersion": "v2.8.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -120,10 +120,10 @@
|
||||
"PkgID": "github.com/docker/distribution@v2.7.1+incompatible",
|
||||
"PkgName": "github.com/docker/distribution",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@2.7.1%2Bincompatible",
|
||||
"UID": "94306cdcf85fb50a"
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@v2.7.1%2Bincompatible",
|
||||
"UID": "3ad40723ed2fce22"
|
||||
},
|
||||
"InstalledVersion": "2.7.1+incompatible",
|
||||
"InstalledVersion": "v2.7.1+incompatible",
|
||||
"FixedVersion": "v2.8.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
|
||||
30
integration/testdata/gomod.json.golden
vendored
30
integration/testdata/gomod.json.golden
vendored
@@ -26,10 +26,10 @@
|
||||
"PkgID": "github.com/docker/distribution@v2.7.1+incompatible",
|
||||
"PkgName": "github.com/docker/distribution",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@2.7.1%2Bincompatible",
|
||||
"UID": "de19cd663ca047a8"
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@v2.7.1%2Bincompatible",
|
||||
"UID": "9d949a7b01249e68"
|
||||
},
|
||||
"InstalledVersion": "2.7.1+incompatible",
|
||||
"InstalledVersion": "v2.7.1+incompatible",
|
||||
"FixedVersion": "v2.8.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -53,10 +53,10 @@
|
||||
"PkgID": "github.com/open-policy-agent/opa@v0.35.0",
|
||||
"PkgName": "github.com/open-policy-agent/opa",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/open-policy-agent/opa@0.35.0",
|
||||
"UID": "6b685002e082ffc5"
|
||||
"PURL": "pkg:golang/github.com/open-policy-agent/opa@v0.35.0",
|
||||
"UID": "e89e2b0d8977e2a"
|
||||
},
|
||||
"InstalledVersion": "0.35.0",
|
||||
"InstalledVersion": "v0.35.0",
|
||||
"FixedVersion": "0.37.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -100,10 +100,10 @@
|
||||
"PkgID": "golang.org/x/text@v0.3.6",
|
||||
"PkgName": "golang.org/x/text",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/golang.org/x/text@0.3.6",
|
||||
"UID": "825dc613c0f39d45"
|
||||
"PURL": "pkg:golang/golang.org/x/text@v0.3.6",
|
||||
"UID": "3050088ce9eb2ce4"
|
||||
},
|
||||
"InstalledVersion": "0.3.6",
|
||||
"InstalledVersion": "v0.3.6",
|
||||
"FixedVersion": "0.3.7",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -133,10 +133,10 @@
|
||||
"PkgID": "github.com/docker/distribution@v2.7.1+incompatible",
|
||||
"PkgName": "github.com/docker/distribution",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@2.7.1%2Bincompatible",
|
||||
"UID": "94376dc37054a7e8"
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@v2.7.1%2Bincompatible",
|
||||
"UID": "2f7f0fa81860b8f1"
|
||||
},
|
||||
"InstalledVersion": "2.7.1+incompatible",
|
||||
"InstalledVersion": "v2.7.1+incompatible",
|
||||
"FixedVersion": "v2.8.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
@@ -167,10 +167,10 @@
|
||||
"PkgID": "github.com/docker/distribution@v2.7.1+incompatible",
|
||||
"PkgName": "github.com/docker/distribution",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@2.7.1%2Bincompatible",
|
||||
"UID": "94306cdcf85fb50a"
|
||||
"PURL": "pkg:golang/github.com/docker/distribution@v2.7.1%2Bincompatible",
|
||||
"UID": "3ad40723ed2fce22"
|
||||
},
|
||||
"InstalledVersion": "2.7.1+incompatible",
|
||||
"InstalledVersion": "v2.7.1+incompatible",
|
||||
"FixedVersion": "v2.8.0",
|
||||
"Status": "fixed",
|
||||
"Layer": {},
|
||||
|
||||
Reference in New Issue
Block a user