Questions tagged [gosec]
The gosec tag has no usage guidance.
4
questions
-1
votes
1
answer
17
views
gosec linter: G101: Potential hardcoded credentials
I get this message from the gosec linter:
foo/cloud.go:34:2: G101: Potential hardcoded credentials (gosec)
fooAPIKeyENVVar = "Foo_API_KEY"
How to disable this warning?
0
votes
0
answers
39
views
In gosec can I exclude all the Confidence:LOWs?
When I scan my code with Gosec, I want to be able to exclude the confidence:LOW results from being shown. I need that because I am using GitHub actions and I set it up in a way to block the PR if ...
2
votes
2
answers
2k
views
How can I disable "TLS InsecureSkipVerify may be true" error
I have a code like this:
if cfg.GetRedisTLS() {
clientOpts.TLSConfig = &tls.Config{
MinVersion: tls.VersionTLS12,
//nolint:gosec // need insecure TLS option for testing and ...
1
vote
2
answers
2k
views
GoLang untaint URL variable to fix gosec warning G107
If I run gosec on the below fragment I get a tainted URL warning: G107 (CWE-88): Potential HTTP request made with variable url (Confidence: MEDIUM, Severity: MEDIUM)
I figured I should use the 'url' ...