1
0
mirror of https://github.com/securego/gosec.git synced 2025-06-14 23:45:03 +02:00

Allow excluding analyzers globally (#1180)

* This change does not exclude analyzers for inline comment
* Changed the expected issues count for G103, G109 samples for test. Previously G115 has been included in the issue count
* Show analyzers IDs(G115, G602) in gosec usage help
* See #1175
This commit is contained in:
Rahul Gadi
2024-08-20 04:43:40 -04:00
committed by GitHub
parent 18135b439c
commit 81cda2f91f
11 changed files with 301 additions and 26 deletions

View File

@ -111,10 +111,6 @@ var _ = Describe("gosec rules", func() {
runner("G114", testutils.SampleCodeG114)
})
It("should detect integer conversion overflow", func() {
runner("G115", testutils.SampleCodeG115)
})
It("should detect sql injection via format strings", func() {
runner("G201", testutils.SampleCodeG201)
})
@ -225,9 +221,5 @@ var _ = Describe("gosec rules", func() {
runner("G601", testutils.SampleCodeG601)
}
})
It("should detect out of bounds slice access", func() {
runner("G602", testutils.SampleCodeG602)
})
})
})