Skip to content

Commit

Permalink
gosec: disable G407 (#4983)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Sep 4, 2024
1 parent dd069d5 commit bf4a66a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,6 @@ linters-settings:
- G404 # Insecure random number source (rand)
- G405 # Detect the usage of DES or RC4
- G406 # Detect the usage of MD4 or RIPEMD160
- G407 # Detect the usage of hardcoded Initialization Vector(IV)/Nonce
- G501 # Import blocklist: crypto/md5
- G502 # Import blocklist: crypto/des
- G503 # Import blocklist: crypto/rc4
Expand Down Expand Up @@ -922,7 +921,6 @@ linters-settings:
- G404 # Insecure random number source (rand)
- G405 # Detect the usage of DES or RC4
- G406 # Detect the usage of MD4 or RIPEMD160
- G407 # Detect the usage of hardcoded Initialization Vector(IV)/Nonce
- G501 # Import blocklist: crypto/md5
- G502 # Import blocklist: crypto/des
- G503 # Import blocklist: crypto/rc4
Expand Down
1 change: 0 additions & 1 deletion jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
"G404",
"G405",
"G406",
"G407",
"G501",
"G502",
"G503",
Expand Down
5 changes: 5 additions & 0 deletions pkg/golinters/gosec/gosec.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ func New(settings *config.GoSecSettings) *goanalysis.Linter {
var ruleFilters []rules.RuleFilter
var analyzerFilters []analyzers.AnalyzerFilter
if settings != nil {
// TODO(ldez) to remove when the problem will be fixed by gosec.
// https://github.com/securego/gosec/issues/1211
// https://github.com/securego/gosec/issues/1209
settings.Excludes = append(settings.Excludes, "G407")

ruleFilters = createRuleFilters(settings.Includes, settings.Excludes)
analyzerFilters = createAnalyzerFilters(settings.Includes, settings.Excludes)
conf = toGosecConfig(settings)
Expand Down

0 comments on commit bf4a66a

Please sign in to comment.