1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-23 22:15:04 +02:00

Add a rule to detect the usage of ssh InsecureIgnoreHostKey function

This commit is contained in:
Cosmin Cojocar
2018-02-06 16:56:26 +01:00
parent 8b87505d97
commit d3c3cd6419
4 changed files with 61 additions and 0 deletions

View File

@@ -65,6 +65,10 @@ var _ = Describe("gas rules", func() {
runner("G105", testutils.SampleCodeG105)
})
It("should detect of ssh.InsecureIgnoreHostKey function", func() {
runner("G106", testutils.SampleCodeG106)
})
It("should detect sql injection via format strings", func() {
runner("G201", testutils.SampleCodeG201)
})