mirror of
https://github.com/ivuorinen/f2b.git
synced 2026-03-18 10:02:08 +00:00
fix(security): suppress gosec false positives G703 and G118 (#136)
This commit is contained in:
@@ -58,6 +58,7 @@ func setupBenchmarkLogEnvironment(b *testing.B, source string) func() {
|
||||
|
||||
tempDir := b.TempDir()
|
||||
dest := filepath.Join(tempDir, "fail2ban.log")
|
||||
// #nosec G703 -- dest is constructed from b.TempDir() and a literal string, not user input
|
||||
if err := os.WriteFile(dest, data, 0o600); err != nil {
|
||||
b.Fatalf("failed to create benchmark log file: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user