fix: remove dead nolint:gosec suppressions added for a stale toolchain
All checks were successful
check / check (push) Successful in 1m42s

The 15 //nolint:gosec G703/G704 directives added in 13e9f2c suppressed
findings that only a stale local golangci-lint (v2.10.1) reports; the
repo's pinned golangci-lint:v2.12.2-alpine never raises gosec G703/G704
on these lines, so nolintlint correctly flagged every directive as an
unused suppression and failed the pinned lint build.

Verified with the authoritative docker build --target lint . using the
pinned image, and separately with a locally installed pinned v2.12.2
binary: both report 0 issues after removal.
This commit is contained in:
2026-08-09 00:50:49 +00:00
parent 13e9f2c072
commit 4f43725705
3 changed files with 10 additions and 15 deletions

View File

@@ -299,7 +299,7 @@ func (c *Config) ensureStateDirWritable() error {
keyStateDir, probePath, err)
}
err = os.Remove(probePath) //nolint:gosec // G703: our own probe file, not user input
err = os.Remove(probePath)
if err != nil {
return fmt.Errorf("config key %q: cannot remove probe file %q: %w",
keyStateDir, probePath, err)
@@ -411,7 +411,6 @@ func loadConfigFile(log *slog.Logger, appName string) (*smartconfig.Config, erro
for _, path := range configPaths {
cleanPath := filepath.Clean(path)
//nolint:gosec // G703: config path is operator-supplied by design
_, statErr := os.Stat(cleanPath)
if statErr == nil {
// A config file that exists but does not parse is a fatal