Skip to content

chore(lint): enable gosec and remediate findings#18

Merged
rsclarke merged 1 commit intomainfrom
chore/13-enable-gosec-lint
Mar 18, 2026
Merged

chore(lint): enable gosec and remediate findings#18
rsclarke merged 1 commit intomainfrom
chore/13-enable-gosec-lint

Conversation

@rsclarke
Copy link
Copy Markdown
Owner

Summary

This PR enables gosec in golangci-lint and remediates all current security findings so the security linter runs cleanly in CI. The issue requested that gosec be active and that existing findings be fixed or explicitly justified; this change set satisfies that by fixing each reported finding in code and tests.

Changes

  • Enable gosec in .golangci.yml by removing it from disabled linters and adding it to enabled linters.
  • Handle db.Close() errors during initialization failure paths in storage.go.
  • Replace lock polling jitter from math/rand with a crypto/rand-based helper in storage.go.
  • Update tests to handle Close() and Unlock() errors instead of discarding them.
  • Run and pass full CI checks locally via task ci.

Closes #13

Enable gosec in golangci-lint configuration and resolve all reported findings in storage and tests.

Closes #13
@rsclarke rsclarke merged commit 321ba2e into main Mar 18, 2026
1 check passed
@rsclarke rsclarke deleted the chore/13-enable-gosec-lint branch March 18, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable golangci-lint: gosec

1 participant