1
1
# Go
2
2
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
+
3
7
## Features
4
8
Trivy supports two types of Go scanning, Go Modules and binaries built by Go.
5
9
@@ -12,10 +16,10 @@ The following scanners are supported.
12
16
13
17
The table below provides an outline of the features Trivy offers.
14
18
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 ] |
19
23
20
24
!!! note
21
25
Trivy scans only dependencies of the Go project.
@@ -82,11 +86,12 @@ There are times when Go uses the `(devel)` version for modules/dependencies.
82
86
- Dependencies replaced with local ones use the ` (devel) ` versions.
83
87
84
88
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.
86
90
87
91
[ ^ 1 ] : It doesn't require the Internet access.
88
92
[ ^ 2 ] : Need to download modules to local cache beforehand
89
93
[ ^ 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
91
96
92
97
[ dependency-graph ] : ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
0 commit comments