mirror of
https://github.com/securego/gosec.git
synced 2025-11-29 22:37:59 +02:00
Fix use rule IDs to retrieve the rule config
This commit is contained in:
@@ -89,7 +89,7 @@ func NewNoErrorCheck(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
|
||||
whitelist.Add("hash.Hash", "Write")
|
||||
whitelist.Add("os", "Unsetenv")
|
||||
|
||||
if configured, ok := conf["G104"]; ok {
|
||||
if configured, ok := conf[id]; ok {
|
||||
if whitelisted, ok := configured.(map[string]interface{}); ok {
|
||||
for pkg, funcs := range whitelisted {
|
||||
if funcs, ok := funcs.([]interface{}); ok {
|
||||
|
||||
Reference in New Issue
Block a user