mirror of
https://github.com/securego/gosec.git
synced 2025-07-03 00:27:05 +02:00
Refactor how ignored issues are tracked
Track ignored issues using file location instead of a AST node. There are issues linked to a different AST node than the original node used to start the scan. Signed-off-by: Cosmin Cojocar <gcojocar@adobe.com>
This commit is contained in:
committed by
Cosmin Cojocar
parent
f338a98bf3
commit
0ec6cd95d7
@ -53,9 +53,9 @@ func (p *TestPackage) write() error {
|
||||
return nil
|
||||
}
|
||||
for filename, content := range p.Files {
|
||||
if e := os.WriteFile(filename, []byte(content), 0o644); e != nil {
|
||||
if e := os.WriteFile(filename, []byte(content), 0o644); e != nil /* #nosec G306 */ {
|
||||
return e
|
||||
} //#nosec G306
|
||||
}
|
||||
}
|
||||
p.onDisk = true
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user