Files
gosec/taint
Leon Löchner e7eb24d806 fix(G705): eliminate false positive when guard type cannot be resolved (#1554)
* 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>
2026-02-28 09:04:39 +01:00
..