1
0
mirror of https://github.com/securego/gosec.git synced 2025-12-01 22:41:54 +02:00

Adds directory traversal for Http.Dir("/")

This commit is contained in:
Calin Capitanu
2022-03-06 10:58:47 +01:00
committed by GitHub
parent 26f10e0a7a
commit 48bbf96b56
7 changed files with 98 additions and 4 deletions

View File

@@ -90,6 +90,10 @@ var _ = Describe("gosec rules", func() {
runner("G110", testutils.SampleCodeG110)
})
It("should detect potential directory traversal", func() {
runner("G111", testutils.SampleCodeG111)
})
It("should detect sql injection via format strings", func() {
runner("G201", testutils.SampleCodeG201)
})