Skip to content

Commit ca0b09e

Browse files
authored
gosec: add G602 analyzer (#4906)
1 parent 15529a9 commit ca0b09e

File tree

5 files changed

+3
-8
lines changed

5 files changed

+3
-8
lines changed

.golangci.next.reference.yml

-2
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,6 @@ linters-settings:
874874
- G504 # Import blocklist: net/http/cgi
875875
- G505 # Import blocklist: crypto/sha1
876876
- G601 # Implicit memory aliasing of items from a range statement
877-
- G602 # Slice access out of bounds
878877

879878
# To specify a set of rules to explicitly exclude.
880879
# Available rules: https://github.com/securego/gosec#available-rules
@@ -914,7 +913,6 @@ linters-settings:
914913
- G504 # Import blocklist: net/http/cgi
915914
- G505 # Import blocklist: crypto/sha1
916915
- G601 # Implicit memory aliasing of items from a range statement
917-
- G602 # Slice access out of bounds
918916

919917
# Exclude generated files
920918
# Default: false

.golangci.reference.yml

-2
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,6 @@ linters-settings:
874874
- G504 # Import blocklist: net/http/cgi
875875
- G505 # Import blocklist: crypto/sha1
876876
- G601 # Implicit memory aliasing of items from a range statement
877-
- G602 # Slice access out of bounds
878877

879878
# To specify a set of rules to explicitly exclude.
880879
# Available rules: https://github.com/securego/gosec#available-rules
@@ -914,7 +913,6 @@ linters-settings:
914913
- G504 # Import blocklist: net/http/cgi
915914
- G505 # Import blocklist: crypto/sha1
916915
- G601 # Implicit memory aliasing of items from a range statement
917-
- G602 # Slice access out of bounds
918916

919917
# Exclude generated files
920918
# Default: false

jsonschema/golangci.jsonschema.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@
157157
"G503",
158158
"G504",
159159
"G505",
160-
"G601",
161-
"G602"
160+
"G601"
162161
]
163162
},
164163
"govet-analyzers": {

jsonschema/golangci.next.jsonschema.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@
157157
"G503",
158158
"G504",
159159
"G505",
160-
"G601",
161-
"G602"
160+
"G601"
162161
]
163162
},
164163
"govet-analyzers": {

pkg/golinters/gosec/gosec.go

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func runGoSec(lintCtx *linter.Context, pass *analysis.Pass, settings *config.GoS
7777
}
7878

7979
analyzer.CheckRules(pkg)
80+
analyzer.CheckAnalyzers(pkg)
8081

8182
secIssues, _, _ := analyzer.Report()
8283
if len(secIssues) == 0 {

0 commit comments

Comments
 (0)