Files
codeql/go/ql/test/query-tests/Security/CWE-312/overrides.go
Owen Mansel-Chan 8a3bd8408b Fix test expectations for Cleartext Logging
One spurious alert was removed, one missing alert was added, and some
source locations changed.
2025-10-01 16:12:52 +01:00

16 lines
257 B
Go

package main
import "fmt"
type s struct{}
func (_ s) String() string {
password := "horsebatterystaplecorrect" // $ Source
return password
}
func overrideTest(x s, y fmt.Stringer) {
fmt.Println(x.String()) // $ Alert
fmt.Println(y.String()) // OK
}