mirror of
https://github.com/securego/gosec.git
synced 2026-06-20 00:15:59 +02:00
* fix(G705): eliminate false positive when guard type cannot be resolved
A guard cannot be satisfied when its type cannot be resolved.
Otherwise gosec fires for code like:
```go
package main
import (
"fmt"
"os"
)
func main() {
fmt.Fprint(os.Stdout, os.Args[1])
}
```
In this case the guard type `http.ResponseWriter` cannot be resolved, all guards (1)
are satisfied and we have a false gosec warning.
Signed-off-by: leonnicolas <leonloechner@gmx.de>
* remove the http package from example
---------
Signed-off-by: leonnicolas <leonloechner@gmx.de>