gosec linter: G101: 潜在的硬编码凭据

huangapple go评论103阅读模式
英文:

gosec linter: G101: Potential hardcoded credentials

问题

我从gosec linter收到了这条消息:

foo/cloud.go:34:2: G101: Potential hardcoded credentials (gosec)
        fooAPIKeyENVVar = "Foo_API_KEY"

如何禁用这个警告?

英文:

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?

答案1

得分: 2

这使得警告被跳过:

fooAPIKeyENVVar = "Foo_API_KEY" // #nosec G101
英文:

This make the warning to get skipped:

fooAPIKeyENVVar = "Foo_API_KEY" // #nosec G101

huangapple
  • 本文由 发表于 2023年1月20日 17:32:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/75182126.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定