SAST: Resolve gosec G304

This commit is contained in:
kayos@tcp.direct 2024-06-20 21:59:47 -07:00
parent df5c936ed8
commit db0ec03dcd
No known key found for this signature in database
GPG Key ID: 4B841471B4BEE979
1 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,8 @@ var (
func writeConfig(target string) bool {
var f *os.File
var err error
if f, err = os.Create(target); err != nil {
f, err = os.Create(target) // #nosec G304 -- go home gosec, you're drunk
if err != nil {
println("failed to create config file: " + err.Error())
return false
}
@ -70,7 +71,7 @@ func main() {
var err error
var f *os.File
f, err = os.Open(resolvedConf)
f, err = os.Open(resolvedConf) // #nosec G304 go home gosec, you're drunk
if err == nil {
runningConfig, setupErr = config.Setup(f)
}