mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
remove govulndb (#4783)
This commit is contained in:
@@ -65,7 +65,6 @@ Example: [Dockerfile](https://github.com/aquasecurity/trivy-ci-test/blob/main/Do
|
|||||||
| Java | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
| Java | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
||||||
| | [GitHub Advisory Database (Maven)][java-ghsa] | ✅ | - |
|
| | [GitHub Advisory Database (Maven)][java-ghsa] | ✅ | - |
|
||||||
| Go | [GitHub Advisory Database (Go)][go-ghsa] | ✅ | - |
|
| Go | [GitHub Advisory Database (Go)][go-ghsa] | ✅ | - |
|
||||||
| | [The Go Vulnerability Database][go] | ✅ | - |
|
|
||||||
| Rust | [Open Source Vulnerabilities (crates.io)][rust-osv] | ✅ | - |
|
| Rust | [Open Source Vulnerabilities (crates.io)][rust-osv] | ✅ | - |
|
||||||
| .NET | [GitHub Advisory Database (NuGet)][dotnet-ghsa] | ✅ | - |
|
| .NET | [GitHub Advisory Database (NuGet)][dotnet-ghsa] | ✅ | - |
|
||||||
| C/C++ | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
| C/C++ | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
||||||
@@ -88,7 +87,6 @@ Example: [Dockerfile](https://github.com/aquasecurity/trivy-ci-test/blob/main/Do
|
|||||||
[ruby]: https://github.com/rubysec/ruby-advisory-db
|
[ruby]: https://github.com/rubysec/ruby-advisory-db
|
||||||
[nodejs]: https://github.com/nodejs/security-wg
|
[nodejs]: https://github.com/nodejs/security-wg
|
||||||
[gitlab]: https://gitlab.com/gitlab-org/advisories-community
|
[gitlab]: https://gitlab.com/gitlab-org/advisories-community
|
||||||
[go]: https://github.com/golang/vulndb
|
|
||||||
|
|
||||||
[python-osv]: https://osv.dev/list?q=&ecosystem=PyPI
|
[python-osv]: https://osv.dev/list?q=&ecosystem=PyPI
|
||||||
[rust-osv]: https://osv.dev/list?q=&ecosystem=crates.io
|
[rust-osv]: https://osv.dev/list?q=&ecosystem=crates.io
|
||||||
@@ -40,6 +40,11 @@
|
|||||||
ID: "ghsa"
|
ID: "ghsa"
|
||||||
Name: "GitHub Security Advisory Erlang"
|
Name: "GitHub Security Advisory Erlang"
|
||||||
URL: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Aerlang"
|
URL: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Aerlang"
|
||||||
|
- key: "go::GitHub Security Advisory Go"
|
||||||
|
value:
|
||||||
|
ID: "ghsa"
|
||||||
|
Name: "GitHub Security Advisory Go"
|
||||||
|
URL: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
- key: Oracle Linux 8
|
- key: Oracle Linux 8
|
||||||
value:
|
value:
|
||||||
ID: "oracle-oval"
|
ID: "oracle-oval"
|
||||||
@@ -89,16 +94,6 @@
|
|||||||
ID: "debian"
|
ID: "debian"
|
||||||
Name: "Debian Security Tracker"
|
Name: "Debian Security Tracker"
|
||||||
URL: "https://salsa.debian.org/security-tracker-team/security-tracker"
|
URL: "https://salsa.debian.org/security-tracker-team/security-tracker"
|
||||||
- key: go::GitLab Advisory Database Community
|
|
||||||
value:
|
|
||||||
ID: "glad"
|
|
||||||
Name: "GitLab Advisory Database Community"
|
|
||||||
URL: "https://gitlab.com/gitlab-org/advisories-community"
|
|
||||||
- key: go::The Go Vulnerability Database
|
|
||||||
value:
|
|
||||||
ID: "go-vulndb"
|
|
||||||
Name: "The Go Vulnerability Database"
|
|
||||||
URL: "https://github.com/golang/vulndb"
|
|
||||||
- key: maven::GitLab Advisory Database Community
|
- key: maven::GitLab Advisory Database Community
|
||||||
value:
|
value:
|
||||||
ID: "glad"
|
ID: "glad"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
- bucket: go::The Go Vulnerability Database
|
- bucket: go::GitHub Security Advisory Go
|
||||||
pairs:
|
pairs:
|
||||||
- bucket: golang.org/x/text
|
- bucket: golang.org/x/text
|
||||||
pairs:
|
pairs:
|
||||||
@@ -8,8 +8,6 @@
|
|||||||
- "0.3.7"
|
- "0.3.7"
|
||||||
VulnerableVersions:
|
VulnerableVersions:
|
||||||
- ">= 0, < 0.3.7"
|
- ">= 0, < 0.3.7"
|
||||||
- bucket: go::GitLab Advisory Database Community
|
|
||||||
pairs:
|
|
||||||
- bucket: github.com/docker/distribution
|
- bucket: github.com/docker/distribution
|
||||||
pairs:
|
pairs:
|
||||||
- key: GMS-2022-20
|
- key: GMS-2022-20
|
||||||
24
integration/testdata/gomod-skip.json.golden
vendored
24
integration/testdata/gomod-skip.json.golden
vendored
@@ -28,9 +28,9 @@
|
|||||||
"FixedVersion": "v2.8.0",
|
"FixedVersion": "v2.8.0",
|
||||||
"Layer": {},
|
"Layer": {},
|
||||||
"DataSource": {
|
"DataSource": {
|
||||||
"ID": "glad",
|
"ID": "ghsa",
|
||||||
"Name": "GitLab Advisory Database Community",
|
"Name": "GitHub Security Advisory Go",
|
||||||
"URL": "https://gitlab.com/gitlab-org/advisories-community"
|
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
},
|
},
|
||||||
"Title": "OCI Manifest Type Confusion Issue",
|
"Title": "OCI Manifest Type Confusion Issue",
|
||||||
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
||||||
@@ -52,9 +52,9 @@
|
|||||||
"SeveritySource": "nvd",
|
"SeveritySource": "nvd",
|
||||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-23628",
|
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-23628",
|
||||||
"DataSource": {
|
"DataSource": {
|
||||||
"ID": "glad",
|
"ID": "ghsa",
|
||||||
"Name": "GitLab Advisory Database Community",
|
"Name": "GitHub Security Advisory Go",
|
||||||
"URL": "https://gitlab.com/gitlab-org/advisories-community"
|
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
},
|
},
|
||||||
"Title": "Incorrect Calculation",
|
"Title": "Incorrect Calculation",
|
||||||
"Description": "OPA is an open source, general-purpose policy engine. Under certain conditions, pretty-printing an abstract syntax tree (AST) that contains synthetic nodes could change the logic of some statements by reordering array literals. Example of policies impacted are those that parse and compare web paths. **All of these** three conditions have to be met to create an adverse effect: 1. An AST of Rego had to be **created programmatically** such that it ends up containing terms without a location (such as wildcard variables). 2. The AST had to be **pretty-printed** using the `github.com/open-policy-agent/opa/format` package. 3. The result of the pretty-printing had to be **parsed and evaluated again** via an OPA instance using the bundles, or the Golang packages. If any of these three conditions are not met, you are not affected. Notably, all three would be true if using **optimized bundles**, i.e. bundles created with `opa build -O=1` or higher. In that case, the optimizer would fulfil condition (1.), the result of that would be pretty-printed when writing the bundle to disk, fulfilling (2.). When the bundle was then used, we'd satisfy (3.). As a workaround users may disable optimization when creating bundles.",
|
"Description": "OPA is an open source, general-purpose policy engine. Under certain conditions, pretty-printing an abstract syntax tree (AST) that contains synthetic nodes could change the logic of some statements by reordering array literals. Example of policies impacted are those that parse and compare web paths. **All of these** three conditions have to be met to create an adverse effect: 1. An AST of Rego had to be **created programmatically** such that it ends up containing terms without a location (such as wildcard variables). 2. The AST had to be **pretty-printed** using the `github.com/open-policy-agent/opa/format` package. 3. The result of the pretty-printing had to be **parsed and evaluated again** via an OPA instance using the bundles, or the Golang packages. If any of these three conditions are not met, you are not affected. Notably, all three would be true if using **optimized bundles**, i.e. bundles created with `opa build -O=1` or higher. In that case, the optimizer would fulfil condition (1.), the result of that would be pretty-printed when writing the bundle to disk, fulfilling (2.). When the bundle was then used, we'd satisfy (3.). As a workaround users may disable optimization when creating bundles.",
|
||||||
@@ -90,9 +90,9 @@
|
|||||||
"Layer": {},
|
"Layer": {},
|
||||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2021-38561",
|
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2021-38561",
|
||||||
"DataSource": {
|
"DataSource": {
|
||||||
"ID": "go-vulndb",
|
"ID": "ghsa",
|
||||||
"Name": "The Go Vulnerability Database",
|
"Name": "GitHub Security Advisory Go",
|
||||||
"URL": "https://github.com/golang/vulndb"
|
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
},
|
},
|
||||||
"Description": "Due to improper index calculation, an incorrectly formatted language tag can cause Parse\nto panic via an out of bounds read. If Parse is used to process untrusted user inputs,\nthis may be used as a vector for a denial of service attack.\n",
|
"Description": "Due to improper index calculation, an incorrectly formatted language tag can cause Parse\nto panic via an out of bounds read. If Parse is used to process untrusted user inputs,\nthis may be used as a vector for a denial of service attack.\n",
|
||||||
"Severity": "UNKNOWN",
|
"Severity": "UNKNOWN",
|
||||||
@@ -117,9 +117,9 @@
|
|||||||
"FixedVersion": "v2.8.0",
|
"FixedVersion": "v2.8.0",
|
||||||
"Layer": {},
|
"Layer": {},
|
||||||
"DataSource": {
|
"DataSource": {
|
||||||
"ID": "glad",
|
"ID": "ghsa",
|
||||||
"Name": "GitLab Advisory Database Community",
|
"Name": "GitHub Security Advisory Go",
|
||||||
"URL": "https://gitlab.com/gitlab-org/advisories-community"
|
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
},
|
},
|
||||||
"Title": "OCI Manifest Type Confusion Issue",
|
"Title": "OCI Manifest Type Confusion Issue",
|
||||||
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
||||||
|
|||||||
30
integration/testdata/gomod.json.golden
vendored
30
integration/testdata/gomod.json.golden
vendored
@@ -28,9 +28,9 @@
|
|||||||
"FixedVersion": "v2.8.0",
|
"FixedVersion": "v2.8.0",
|
||||||
"Layer": {},
|
"Layer": {},
|
||||||
"DataSource": {
|
"DataSource": {
|
||||||
"ID": "glad",
|
"ID": "ghsa",
|
||||||
"Name": "GitLab Advisory Database Community",
|
"Name": "GitHub Security Advisory Go",
|
||||||
"URL": "https://gitlab.com/gitlab-org/advisories-community"
|
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
},
|
},
|
||||||
"Title": "OCI Manifest Type Confusion Issue",
|
"Title": "OCI Manifest Type Confusion Issue",
|
||||||
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
||||||
@@ -52,9 +52,9 @@
|
|||||||
"SeveritySource": "nvd",
|
"SeveritySource": "nvd",
|
||||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-23628",
|
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-23628",
|
||||||
"DataSource": {
|
"DataSource": {
|
||||||
"ID": "glad",
|
"ID": "ghsa",
|
||||||
"Name": "GitLab Advisory Database Community",
|
"Name": "GitHub Security Advisory Go",
|
||||||
"URL": "https://gitlab.com/gitlab-org/advisories-community"
|
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
},
|
},
|
||||||
"Title": "Incorrect Calculation",
|
"Title": "Incorrect Calculation",
|
||||||
"Description": "OPA is an open source, general-purpose policy engine. Under certain conditions, pretty-printing an abstract syntax tree (AST) that contains synthetic nodes could change the logic of some statements by reordering array literals. Example of policies impacted are those that parse and compare web paths. **All of these** three conditions have to be met to create an adverse effect: 1. An AST of Rego had to be **created programmatically** such that it ends up containing terms without a location (such as wildcard variables). 2. The AST had to be **pretty-printed** using the `github.com/open-policy-agent/opa/format` package. 3. The result of the pretty-printing had to be **parsed and evaluated again** via an OPA instance using the bundles, or the Golang packages. If any of these three conditions are not met, you are not affected. Notably, all three would be true if using **optimized bundles**, i.e. bundles created with `opa build -O=1` or higher. In that case, the optimizer would fulfil condition (1.), the result of that would be pretty-printed when writing the bundle to disk, fulfilling (2.). When the bundle was then used, we'd satisfy (3.). As a workaround users may disable optimization when creating bundles.",
|
"Description": "OPA is an open source, general-purpose policy engine. Under certain conditions, pretty-printing an abstract syntax tree (AST) that contains synthetic nodes could change the logic of some statements by reordering array literals. Example of policies impacted are those that parse and compare web paths. **All of these** three conditions have to be met to create an adverse effect: 1. An AST of Rego had to be **created programmatically** such that it ends up containing terms without a location (such as wildcard variables). 2. The AST had to be **pretty-printed** using the `github.com/open-policy-agent/opa/format` package. 3. The result of the pretty-printing had to be **parsed and evaluated again** via an OPA instance using the bundles, or the Golang packages. If any of these three conditions are not met, you are not affected. Notably, all three would be true if using **optimized bundles**, i.e. bundles created with `opa build -O=1` or higher. In that case, the optimizer would fulfil condition (1.), the result of that would be pretty-printed when writing the bundle to disk, fulfilling (2.). When the bundle was then used, we'd satisfy (3.). As a workaround users may disable optimization when creating bundles.",
|
||||||
@@ -90,9 +90,9 @@
|
|||||||
"Layer": {},
|
"Layer": {},
|
||||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2021-38561",
|
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2021-38561",
|
||||||
"DataSource": {
|
"DataSource": {
|
||||||
"ID": "go-vulndb",
|
"ID": "ghsa",
|
||||||
"Name": "The Go Vulnerability Database",
|
"Name": "GitHub Security Advisory Go",
|
||||||
"URL": "https://github.com/golang/vulndb"
|
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
},
|
},
|
||||||
"Description": "Due to improper index calculation, an incorrectly formatted language tag can cause Parse\nto panic via an out of bounds read. If Parse is used to process untrusted user inputs,\nthis may be used as a vector for a denial of service attack.\n",
|
"Description": "Due to improper index calculation, an incorrectly formatted language tag can cause Parse\nto panic via an out of bounds read. If Parse is used to process untrusted user inputs,\nthis may be used as a vector for a denial of service attack.\n",
|
||||||
"Severity": "UNKNOWN",
|
"Severity": "UNKNOWN",
|
||||||
@@ -117,9 +117,9 @@
|
|||||||
"FixedVersion": "v2.8.0",
|
"FixedVersion": "v2.8.0",
|
||||||
"Layer": {},
|
"Layer": {},
|
||||||
"DataSource": {
|
"DataSource": {
|
||||||
"ID": "glad",
|
"ID": "ghsa",
|
||||||
"Name": "GitLab Advisory Database Community",
|
"Name": "GitHub Security Advisory Go",
|
||||||
"URL": "https://gitlab.com/gitlab-org/advisories-community"
|
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
},
|
},
|
||||||
"Title": "OCI Manifest Type Confusion Issue",
|
"Title": "OCI Manifest Type Confusion Issue",
|
||||||
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
||||||
@@ -146,9 +146,9 @@
|
|||||||
"FixedVersion": "v2.8.0",
|
"FixedVersion": "v2.8.0",
|
||||||
"Layer": {},
|
"Layer": {},
|
||||||
"DataSource": {
|
"DataSource": {
|
||||||
"ID": "glad",
|
"ID": "ghsa",
|
||||||
"Name": "GitLab Advisory Database Community",
|
"Name": "GitHub Security Advisory Go",
|
||||||
"URL": "https://gitlab.com/gitlab-org/advisories-community"
|
"URL": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago"
|
||||||
},
|
},
|
||||||
"Title": "OCI Manifest Type Confusion Issue",
|
"Title": "OCI Manifest Type Confusion Issue",
|
||||||
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
"Description": "### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.",
|
||||||
|
|||||||
@@ -98,8 +98,7 @@ func (c Client) getVendorSeverity(vulnID string, vuln *dbTypes.Vulnerability, so
|
|||||||
}
|
}
|
||||||
|
|
||||||
// use severity from GitHub for all GHSA-xxx vulnerabilities
|
// use severity from GitHub for all GHSA-xxx vulnerabilities
|
||||||
// govuln doesn't have severity. Use severity from GitHub(for CVE-xxx vulns)
|
if strings.HasPrefix(vulnID, "GHSA-") {
|
||||||
if strings.HasPrefix(vulnID, "GHSA-") || source == vulnerability.GoVulnDB {
|
|
||||||
if vs, ok := vuln.VendorSeverity[vulnerability.GHSA]; ok {
|
if vs, ok := vuln.VendorSeverity[vulnerability.GHSA]; ok {
|
||||||
return vs.String(), vulnerability.GHSA
|
return vs.String(), vulnerability.GHSA
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,42 +270,6 @@ func TestClient_FillInfo(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "happy path. CVE-xxx from govuln. Severity gets from ghsa",
|
|
||||||
fixtures: []string{"testdata/fixtures/vulnerability.yaml"},
|
|
||||||
vulns: []types.DetectedVulnerability{
|
|
||||||
{
|
|
||||||
VulnerabilityID: "CVE-2022-0001",
|
|
||||||
DataSource: &dbTypes.DataSource{
|
|
||||||
ID: vulnerability.GoVulnDB,
|
|
||||||
Name: "The Go Vulnerability Database",
|
|
||||||
URL: "https://github.com/golang/vulndb",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
expectedVulnerabilities: []types.DetectedVulnerability{
|
|
||||||
{
|
|
||||||
VulnerabilityID: "CVE-2022-0001",
|
|
||||||
SeveritySource: vulnerability.GHSA,
|
|
||||||
Vulnerability: dbTypes.Vulnerability{
|
|
||||||
Title: "dos",
|
|
||||||
Description: "dos vulnerability",
|
|
||||||
Severity: dbTypes.SeverityHigh.String(),
|
|
||||||
References: []string{"http://example.com"},
|
|
||||||
VendorSeverity: map[dbTypes.SourceID]dbTypes.Severity{
|
|
||||||
"nvd": dbTypes.SeverityLow,
|
|
||||||
"ghsa": dbTypes.SeverityHigh,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
DataSource: &dbTypes.DataSource{
|
|
||||||
ID: vulnerability.GoVulnDB,
|
|
||||||
Name: "The Go Vulnerability Database",
|
|
||||||
URL: "https://github.com/golang/vulndb",
|
|
||||||
},
|
|
||||||
PrimaryURL: "https://avd.aquasec.com/nvd/cve-2022-0001",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "GetVulnerability returns an error",
|
name: "GetVulnerability returns an error",
|
||||||
fixtures: []string{"testdata/fixtures/sad.yaml"},
|
fixtures: []string{"testdata/fixtures/sad.yaml"},
|
||||||
|
|||||||
Reference in New Issue
Block a user