docs(go): describe which go.mod directive sets the stdlib version (#11583)

Co-authored-by: Wilson Santos <4579566+wils0ns@users.noreply.github.com>
This commit is contained in:
Wilson SantosandWilson Santos authored and GitHub committed 2026-11-09 09:54:57 +00:00
1 parent c22582a1a2
commit 63e2f3817c
1 file changed
+1 -1
+1 -1
View File
@@ -87,7 +87,7 @@ Moreover, when scanning the Trivy project, which happens to use Docker, Docker's
Detecting the version of Go used in the project can be tricky.
The go.mod file include hints that allows Trivy to guess the Go version but it eventually depends on the Go tool version in the build environment.
Since this strategy is not fully deterministic and accurate, it is enabled only in [--detection-priority comprehensive][detection-priority] mode.
When enabled, Trivy detects stdlib version as the minimum between the `go` and the `toolchain` directives in the `go.mod` file.
When enabled, Trivy detects the stdlib version from the `toolchain` directive in the `go.mod` file, or from the `go` directive when there is no `toolchain` directive.
To obtain reproducible scan results Trivy doesn't check the locally installed version of `Go`.
!!! note