Skip to content

Commit 551a46e

Browse files
authored
docs(go): add stdlib (aquasecurity#6580)
Signed-off-by: knqyf263 <[email protected]>
1 parent 261649b commit 551a46e

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

docs/docs/coverage/language/golang.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Go
22

3+
## Data Sources
4+
The data sources are listed [here](../../scanner/vulnerability.md#data-sources-1).
5+
Trivy uses Go Vulnerability Database for standard packages, such as `net/http`, and uses GitHub Advisory Database for third-party packages.
6+
37
## Features
48
Trivy supports two types of Go scanning, Go Modules and binaries built by Go.
59

@@ -12,10 +16,10 @@ The following scanners are supported.
1216

1317
The table below provides an outline of the features Trivy offers.
1418

15-
| Artifact | Offline[^1] | Dev dependencies | [Dependency graph][dependency-graph] |
16-
|----------|:-----------:|:-----------------|:----------------------------------:|
17-
| Modules || Include |[^2] |
18-
| Binaries || Exclude | - |
19+
| Artifact | Offline[^1] | Dev dependencies | [Dependency graph][dependency-graph] | Stdlib |
20+
|----------|:-----------:|:-----------------|:------------------------------------:|:------:|
21+
| Modules || Include | [^2] | - |
22+
| Binaries || Exclude | - |[^4] |
1923

2024
!!! note
2125
Trivy scans only dependencies of the Go project.
@@ -82,11 +86,12 @@ There are times when Go uses the `(devel)` version for modules/dependencies.
8286
- Dependencies replaced with local ones use the `(devel)` versions.
8387

8488
In the first case, Trivy will attempt to parse any `-ldflags` as a secondary source, and will leave the version
85-
empty if it cannot do so[^4]. For the second case, the version of such packages is empty.
89+
empty if it cannot do so[^5]. For the second case, the version of such packages is empty.
8690

8791
[^1]: It doesn't require the Internet access.
8892
[^2]: Need to download modules to local cache beforehand
8993
[^3]: See https://github.com/aquasecurity/trivy/issues/1837#issuecomment-1832523477
90-
[^4]: See https://github.com/golang/go/issues/63432#issuecomment-1751610604
94+
[^4]: Identify the Go version used to compile the binary and detect its vulnerabilities
95+
[^5]: See https://github.com/golang/go/issues/63432#issuecomment-1751610604
9196

9297
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

docs/docs/scanner/vulnerability.md

+2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ See [here](../coverage/language/index.md#supported-languages) for the supported
9191
| | [GitHub Advisory Database (npm)][nodejs-ghsa] || - |
9292
| Java | [GitHub Advisory Database (Maven)][java-ghsa] || - |
9393
| Go | [GitHub Advisory Database (Go)][go-ghsa] || - |
94+
| | [Go Vulnerability Database][go-vulndb] || - |
9495
| Rust | [Open Source Vulnerabilities (crates.io)][rust-osv] || - |
9596
| .NET | [GitHub Advisory Database (NuGet)][dotnet-ghsa] || - |
9697
| C/C++ | [GitLab Advisories Community][gitlab] || 1 month |
@@ -255,6 +256,7 @@ Total: 7 (UNKNOWN: 0, LOW: 1, MEDIUM: 1, HIGH: 3, CRITICAL: 2)
255256
[go-ghsa]: https://github.com/advisories?query=ecosystem%3Ago
256257
[swift-ghsa]: https://github.com/advisories?query=ecosystem%3Aswift
257258
259+
[go-vulndb]: https://pkg.go.dev/vuln/
258260
[php]: https://github.com/FriendsOfPHP/security-advisories
259261
[ruby]: https://github.com/rubysec/ruby-advisory-db
260262
[nodejs]: https://github.com/nodejs/security-wg

0 commit comments

Comments
 (0)