From 1e1fc91d158706e3bca507a749c72070c361aade Mon Sep 17 00:00:00 2001 From: Cosmin Cojocar Date: Wed, 22 May 2024 10:17:50 +0200 Subject: [PATCH] Update the README with some details related to Go version used by the rules Signed-off-by: Cosmin Cojocar --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7063302..9d5ed3f 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,12 @@ You can also configure the hard-coded credentials rule `G101` with additional pa } ``` +#### Go version + +Some rules require a specific Go version which is retrieved from the Go module file present in the project. If this version cannot be found, it will fallback to Go runtime version. + +The Go module version is parsed using the `go list` command which in some cases might lead to performance degradation. In this situation, the go module version can be easily disabled by setting the environment variable `GOSECNOMODVERSION=on`. + ### Dependencies gosec will fetch automatically the dependencies of the code which is being analyzed when go module is turned on (e.g.`GO111MODULE=on`). If this is not the case,