Skip to content

Commit a871404

Browse files
ldezuudashr
authored andcommitted
gosec: disable G407 (golangci#4983)
1 parent 4ea5f46 commit a871404

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.golangci.next.reference.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,6 @@ linters-settings:
876876
- G404 # Insecure random number source (rand)
877877
- G405 # Detect the usage of DES or RC4
878878
- G406 # Detect the usage of MD4 or RIPEMD160
879-
- G407 # Detect the usage of hardcoded Initialization Vector(IV)/Nonce
880879
- G501 # Import blocklist: crypto/md5
881880
- G502 # Import blocklist: crypto/des
882881
- G503 # Import blocklist: crypto/rc4
@@ -922,7 +921,6 @@ linters-settings:
922921
- G404 # Insecure random number source (rand)
923922
- G405 # Detect the usage of DES or RC4
924923
- G406 # Detect the usage of MD4 or RIPEMD160
925-
- G407 # Detect the usage of hardcoded Initialization Vector(IV)/Nonce
926924
- G501 # Import blocklist: crypto/md5
927925
- G502 # Import blocklist: crypto/des
928926
- G503 # Import blocklist: crypto/rc4

jsonschema/golangci.next.jsonschema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@
155155
"G404",
156156
"G405",
157157
"G406",
158-
"G407",
159158
"G501",
160159
"G502",
161160
"G503",

pkg/golinters/gosec/gosec.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ func New(settings *config.GoSecSettings) *goanalysis.Linter {
3333
var ruleFilters []rules.RuleFilter
3434
var analyzerFilters []analyzers.AnalyzerFilter
3535
if settings != nil {
36+
// TODO(ldez) to remove when the problem will be fixed by gosec.
37+
// https://github.com/securego/gosec/issues/1211
38+
// https://github.com/securego/gosec/issues/1209
39+
settings.Excludes = append(settings.Excludes, "G407")
40+
3641
ruleFilters = createRuleFilters(settings.Includes, settings.Excludes)
3742
analyzerFilters = createAnalyzerFilters(settings.Includes, settings.Excludes)
3843
conf = toGosecConfig(settings)

0 commit comments

Comments
 (0)