diff --git a/.lint-go.yaml b/.lint-go.yaml index ef0f9b8..847d3d4 100644 --- a/.lint-go.yaml +++ b/.lint-go.yaml @@ -90,8 +90,7 @@ golangci: - gocognit # 1 - revive # 1 - path: ^git/commits\.go$ - linters: # 16 findings - - gosec # 8 + linters: # 8 findings - varnamelen # 3 - gochecknoglobals # 2 - goconst # 2 diff --git a/git/commits.go b/git/commits.go index d1ebffa..0d1a62b 100644 --- a/git/commits.go +++ b/git/commits.go @@ -384,5 +384,8 @@ func ended(ctx context.Context, err error) error { func command(ctx context.Context, args ...string) *exec.Cmd { slog.DebugContext(ctx, "running git", "cmd", "git "+strings.Join(args, " ")) + // #nosec G204 -- the program is git; its arguments are this file's own subcommands, commits git named, and the + // range the operator gave, by --range or by their CI's variables (TRAVIS_COMMIT_RANGE, TRAVIS_COMMIT, GITHUB_SHA), + // which is theirs to give as it would be to git return exec.CommandContext(ctx, "git", args...) }