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

G107 - SSRF (#236)

* Initial SSRF Rule

* Added Selector evaluation

* Added source code tests

* Fixed spacing issues

* Fixed Spacingv2

* Removed resty test
This commit is contained in:
cschoenduve-splunk
2018-09-03 23:55:03 -07:00
committed by Cosmin Cojocar
parent 63b25c147f
commit 419c9292c8
6 changed files with 149 additions and 4 deletions

View File

@@ -71,6 +71,10 @@ var _ = Describe("gosec rules", func() {
runner("G106", testutils.SampleCodeG106)
})
It("should detect ssrf via http requests with variable url", func() {
runner("G107", testutils.SampleCodeG107)
})
It("should detect sql injection via format strings", func() {
runner("G201", testutils.SampleCodeG201)
})