mirror of
https://github.com/securego/gosec.git
synced 2025-11-29 22:37:59 +02:00
Add the rule ID to issues (#188)
This commit is contained in:
committed by
Grant Murphy
parent
a0367559a7
commit
2115402409
@@ -34,7 +34,7 @@ func (t *badTempFile) ID() string {
|
||||
func (t *badTempFile) Match(n ast.Node, c *gas.Context) (gi *gas.Issue, err error) {
|
||||
if node := t.calls.ContainsCallExpr(n, c); node != nil {
|
||||
if arg, e := gas.GetString(node.Args[0]); t.args.MatchString(arg) && e == nil {
|
||||
return gas.NewIssue(c, n, t.What, t.Severity, t.Confidence), nil
|
||||
return gas.NewIssue(c, n, t.ID(), t.What, t.Severity, t.Confidence), nil
|
||||
}
|
||||
}
|
||||
return nil, nil
|
||||
|
||||
Reference in New Issue
Block a user