gosec: add G602 analyzer (#4906)
This commit is contained in:
parent
15529a9d74
commit
ca0b09e5e3
@ -874,7 +874,6 @@ linters-settings:
|
|||||||
- G504 # Import blocklist: net/http/cgi
|
- G504 # Import blocklist: net/http/cgi
|
||||||
- G505 # Import blocklist: crypto/sha1
|
- G505 # Import blocklist: crypto/sha1
|
||||||
- G601 # Implicit memory aliasing of items from a range statement
|
- G601 # Implicit memory aliasing of items from a range statement
|
||||||
- G602 # Slice access out of bounds
|
|
||||||
|
|
||||||
# To specify a set of rules to explicitly exclude.
|
# To specify a set of rules to explicitly exclude.
|
||||||
# Available rules: https://github.com/securego/gosec#available-rules
|
# Available rules: https://github.com/securego/gosec#available-rules
|
||||||
@ -914,7 +913,6 @@ linters-settings:
|
|||||||
- G504 # Import blocklist: net/http/cgi
|
- G504 # Import blocklist: net/http/cgi
|
||||||
- G505 # Import blocklist: crypto/sha1
|
- G505 # Import blocklist: crypto/sha1
|
||||||
- G601 # Implicit memory aliasing of items from a range statement
|
- G601 # Implicit memory aliasing of items from a range statement
|
||||||
- G602 # Slice access out of bounds
|
|
||||||
|
|
||||||
# Exclude generated files
|
# Exclude generated files
|
||||||
# Default: false
|
# Default: false
|
||||||
|
@ -874,7 +874,6 @@ linters-settings:
|
|||||||
- G504 # Import blocklist: net/http/cgi
|
- G504 # Import blocklist: net/http/cgi
|
||||||
- G505 # Import blocklist: crypto/sha1
|
- G505 # Import blocklist: crypto/sha1
|
||||||
- G601 # Implicit memory aliasing of items from a range statement
|
- G601 # Implicit memory aliasing of items from a range statement
|
||||||
- G602 # Slice access out of bounds
|
|
||||||
|
|
||||||
# To specify a set of rules to explicitly exclude.
|
# To specify a set of rules to explicitly exclude.
|
||||||
# Available rules: https://github.com/securego/gosec#available-rules
|
# Available rules: https://github.com/securego/gosec#available-rules
|
||||||
@ -914,7 +913,6 @@ linters-settings:
|
|||||||
- G504 # Import blocklist: net/http/cgi
|
- G504 # Import blocklist: net/http/cgi
|
||||||
- G505 # Import blocklist: crypto/sha1
|
- G505 # Import blocklist: crypto/sha1
|
||||||
- G601 # Implicit memory aliasing of items from a range statement
|
- G601 # Implicit memory aliasing of items from a range statement
|
||||||
- G602 # Slice access out of bounds
|
|
||||||
|
|
||||||
# Exclude generated files
|
# Exclude generated files
|
||||||
# Default: false
|
# Default: false
|
||||||
|
@ -157,8 +157,7 @@
|
|||||||
"G503",
|
"G503",
|
||||||
"G504",
|
"G504",
|
||||||
"G505",
|
"G505",
|
||||||
"G601",
|
"G601"
|
||||||
"G602"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"govet-analyzers": {
|
"govet-analyzers": {
|
||||||
|
@ -157,8 +157,7 @@
|
|||||||
"G503",
|
"G503",
|
||||||
"G504",
|
"G504",
|
||||||
"G505",
|
"G505",
|
||||||
"G601",
|
"G601"
|
||||||
"G602"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"govet-analyzers": {
|
"govet-analyzers": {
|
||||||
|
@ -77,6 +77,7 @@ func runGoSec(lintCtx *linter.Context, pass *analysis.Pass, settings *config.GoS
|
|||||||
}
|
}
|
||||||
|
|
||||||
analyzer.CheckRules(pkg)
|
analyzer.CheckRules(pkg)
|
||||||
|
analyzer.CheckAnalyzers(pkg)
|
||||||
|
|
||||||
secIssues, _, _ := analyzer.Report()
|
secIssues, _, _ := analyzer.Report()
|
||||||
if len(secIssues) == 0 {
|
if len(secIssues) == 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user