From 2fc53132cecad61d72c2c747339edd0d4e6228ae Mon Sep 17 00:00:00 2001 From: Will Roden Date: Mon, 15 May 2023 15:08:26 -0500 Subject: [PATCH 1/2] fix g306 --- .golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yml b/.golangci.yml index d05aa30..dfa6581 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,6 +12,7 @@ issues: - "G302: Expect file permissions to be 0600 or less" - "G304: Potential file inclusion via variable" - "G204: Subprocess launched with a potential tainted input or cmd arguments" + - "G306: Expect WriteFile permissions to be 0600 or less" linters: enable: - gosec From d1874b40b9ae74e7b05de6e615bda88661e70913 Mon Sep 17 00:00:00 2001 From: Will Roden Date: Mon, 15 May 2023 15:09:07 -0500 Subject: [PATCH 2/2] remove redundant //nolint --- cmd/benchdiff/internal/benchdiff.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/benchdiff/internal/benchdiff.go b/cmd/benchdiff/internal/benchdiff.go index c74d934..5d4a46d 100644 --- a/cmd/benchdiff/internal/benchdiff.go +++ b/cmd/benchdiff/internal/benchdiff.go @@ -101,7 +101,7 @@ stderr: %s`, cmd.String(), exitErr.ExitCode(), bufStderr.String()) } func (c *Benchdiff) runBenchmark(ref, filename, extraArgs string, pause time.Duration, force bool) error { - cmd := exec.Command(c.BenchCmd, strings.Fields(c.BenchArgs+" "+extraArgs)...) //nolint:gosec // this is fine + cmd := exec.Command(c.BenchCmd, strings.Fields(c.BenchArgs+" "+extraArgs)...) stdlib := false if rootPath, err := runGitCmd(c.debug(), c.gitCmd(), c.Path, "rev-parse", "--show-toplevel"); err == nil {