mirror of
https://github.com/securego/gosec.git
synced 2024-11-05 19:45:51 +00:00
22 lines
313 B
Go
22 lines
313 B
Go
|
package testutils
|
||
|
|
||
|
import "github.com/securego/gosec/v2"
|
||
|
|
||
|
var (
|
||
|
// SampleCodeG504 - Blocklisted import CGI
|
||
|
SampleCodeG504 = []CodeSample{
|
||
|
{[]string{`
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"net/http/cgi"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
cgi.Serve(http.FileServer(http.Dir("/usr/share/doc")))
|
||
|
}
|
||
|
`}, 1, gosec.NewConfig()},
|
||
|
}
|
||
|
)
|