mirror of
https://github.com/securego/gosec.git
synced 2025-02-03 13:01:53 +02:00
Improve specitivity of error message for GenDecl
This commit is contained in:
parent
1e736c8838
commit
d1303fee0b
@ -64,7 +64,7 @@ func (r *Credentials) matchGenDecl(decl *ast.GenDecl, ctx *gas.Context) (*gas.Is
|
||||
index = len(valueSpec.Values) - 1
|
||||
}
|
||||
if rhs, ok := valueSpec.Values[index].(*ast.BasicLit); ok && rhs.Kind == token.STRING {
|
||||
return gas.NewIssue(ctx, decl, r.What, r.Severity, r.Confidence), nil
|
||||
return gas.NewIssue(ctx, valueSpec, r.What, r.Severity, r.Confidence), nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user