mirror of
https://github.com/securego/gosec.git
synced 2025-11-23 22:15:04 +02:00
Detect use of net/http functions that have no support for setting timeouts (#842)
https://blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/ https://blog.cloudflare.com/exposing-go-on-the-internet/ Closes https://github.com/securego/gosec/issues/833
This commit is contained in:
@@ -102,6 +102,10 @@ var _ = Describe("gosec rules", func() {
|
||||
runner("G113", testutils.SampleCodeG113)
|
||||
})
|
||||
|
||||
It("should detect uses of net/http serve functions that have no support for setting timeouts", func() {
|
||||
runner("G114", testutils.SampleCodeG114)
|
||||
})
|
||||
|
||||
It("should detect sql injection via format strings", func() {
|
||||
runner("G201", testutils.SampleCodeG201)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user