mirror of
https://github.com/securego/gosec.git
synced 2025-11-25 22:22:17 +02:00
Add the rule ID to issues (#188)
This commit is contained in:
committed by
Grant Murphy
parent
a0367559a7
commit
2115402409
@@ -33,7 +33,7 @@ func (w *weakRand) ID() string {
|
||||
func (w *weakRand) Match(n ast.Node, c *gas.Context) (*gas.Issue, error) {
|
||||
for _, funcName := range w.funcNames {
|
||||
if _, matched := gas.MatchCallByPackage(n, c, w.packagePath, funcName); matched {
|
||||
return gas.NewIssue(c, n, w.What, w.Severity, w.Confidence), nil
|
||||
return gas.NewIssue(c, n, w.ID(), w.What, w.Severity, w.Confidence), nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user