main carries a set of open gosec findings (≈10 as of the 2026-07-07 survey) that keep make check red. Clear them.
Definition of done
make check (golangci-lint) reports 0gosec findings.
Every fix is behavior-preserving. Where a finding is a genuine false positive, use a narrowly-scoped //nolint:gosec // G### <reason> with a real justification rather than a blanket disable.
Existing tests remain green; no functional behavior change.
Scope guard: if the actual finding count is much larger than expected (more than ~30) or any fix would require a real behavior change, STOP and report on the issue instead of forcing it — so it can be split.
The finishing commit's title must end with (closes #N) referencing this issue.
`main` carries a set of open `gosec` findings (≈10 as of the 2026-07-07 survey) that keep `make check` red. Clear them.
## Definition of done
1. `make check` (golangci-lint) reports **0** `gosec` findings.
2. Every fix is behavior-preserving. Where a finding is a genuine false positive, use a narrowly-scoped `//nolint:gosec // G### <reason>` with a real justification rather than a blanket disable.
3. Existing tests remain green; no functional behavior change.
4. Scope guard: if the actual finding count is much larger than expected (more than ~30) or any fix would require a real behavior change, STOP and report on the issue instead of forcing it — so it can be split.
The finishing commit's title must end with ` (closes #N)` referencing this issue.
Dispatching this now, per the definition of done in the issue body. Additional direction:
Branch fix/gosec-findings from current main.
First, run make check and enumerate the actual gosec findings in a comment on the PR (count, rule IDs, locations) before fixing — this documents the scope-guard check from the issue body.
Fix each finding individually; a //nolint:gosec // G### <reason> is acceptable only for genuine false positives with a real justification. No blanket suppressions, no linter config changes.
One logical change per commit; make check green before each commit.
Open a PR against main whose body contains closes #47, and end the finishing commit's title with (closes #47).
Note: PR #46 (refactor/extract-signature) is in flight and touches internal/imgcache/internal/signature. Base on main as it is; if a finding is in code being moved by #46, fix it in main's current layout anyway — any conflict gets resolved at merge time.
Progress notes and questions go in comments on the PR once it exists.
Dispatching this now, per the definition of done in the issue body. Additional direction:
- Branch `fix/gosec-findings` from current `main`.
- First, run `make check` and enumerate the actual gosec findings in a comment on the PR (count, rule IDs, locations) before fixing — this documents the scope-guard check from the issue body.
- Fix each finding individually; a `//nolint:gosec // G### <reason>` is acceptable only for genuine false positives with a real justification. No blanket suppressions, no linter config changes.
- One logical change per commit; `make check` green before each commit.
- Open a PR against `main` whose body contains `closes #47`, and end the finishing commit's title with ` (closes #47)`.
- Note: PR #46 (`refactor/extract-signature`) is in flight and touches `internal/imgcache`/`internal/signature`. Base on `main` as it is; if a finding is in code being moved by #46, fix it in `main`'s current layout anyway — any conflict gets resolved at merge time.
- Progress notes and questions go in comments on the PR once it exists.
Scope update from a fresh make check run (golangci-lint 2.12.2): the "≈10 findings" figure in the issue body is stale. Current state is exactly 2 gosec findings, both G124 (http.Cookie missing or insecure Secure/HttpOnly/SameSite attributes):
internal/session/session.go:84
internal/session/session.go:128
All tests pass; these two findings are the only thing keeping make check red. Well within the scope guard.
Additional direction for the fix:
This is a security bug in production code (session cookies without HttpOnly/Secure/SameSite), so per repo rules: write a failing test FIRST asserting the cookies carry the correct attributes, commit it, then fix until green — do not //nolint these; they are genuine findings, and the fix is to set the attributes properly.
SameSite should be Lax or stricter; HttpOnly true; Secure true. If Secure: true would break any documented plain-HTTP dev flow, note the reasoning in the PR body rather than weakening the cookie.
Update TODO.md in the finishing commit per its Workflow section (move Next Step to Completed Steps, promote the next Future Step, and correct the stale "10 findings" status text).
Scope update from a fresh `make check` run (golangci-lint 2.12.2): the "≈10 findings" figure in the issue body is stale. Current state is exactly **2** gosec findings, both `G124` (http.Cookie missing or insecure `Secure`/`HttpOnly`/`SameSite` attributes):
- `internal/session/session.go:84`
- `internal/session/session.go:128`
All tests pass; these two findings are the only thing keeping `make check` red. Well within the scope guard.
Additional direction for the fix:
- This is a security bug in production code (session cookies without `HttpOnly`/`Secure`/`SameSite`), so per repo rules: write a failing test FIRST asserting the cookies carry the correct attributes, commit it, then fix until green — do not `//nolint` these; they are genuine findings, and the fix is to set the attributes properly.
- `SameSite` should be `Lax` or stricter; `HttpOnly` true; `Secure` true. If `Secure: true` would break any documented plain-HTTP dev flow, note the reasoning in the PR body rather than weakening the cookie.
- Update `TODO.md` in the finishing commit per its Workflow section (move Next Step to Completed Steps, promote the next Future Step, and correct the stale "10 findings" status text).
Review of PR #48 came back FAIL with one blocking item (labelled needs-rework): the ignored former secure-toggle parameter on session.NewManager must be removed in this PR rather than deferred — pre-1.0, everything updates in one pass. Full rework direction is in the review comment on the PR: #48 (comment). The mechanical call-site updates in internal/session/session_test.go (call shape only, assertions unchanged) are reviewer-directed; the accompanying TODO.md P1 deferral entry gets dropped in the same commit.
Review of PR #48 came back FAIL with one blocking item (labelled `needs-rework`): the ignored former secure-toggle parameter on `session.NewManager` must be removed in this PR rather than deferred — pre-1.0, everything updates in one pass. Full rework direction is in the review comment on the PR: https://git.eeqj.de/sneak/pixa/pulls/48#issuecomment-43557. The mechanical call-site updates in `internal/session/session_test.go` (call shape only, assertions unchanged) are reviewer-directed; the accompanying TODO.md P1 deferral entry gets dropped in the same commit.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
maincarries a set of opengosecfindings (≈10 as of the 2026-07-07 survey) that keepmake checkred. Clear them.Definition of done
make check(golangci-lint) reports 0gosecfindings.//nolint:gosec // G### <reason>with a real justification rather than a blanket disable.The finishing commit's title must end with
(closes #N)referencing this issue.Dispatching this now, per the definition of done in the issue body. Additional direction:
fix/gosec-findingsfrom currentmain.make checkand enumerate the actual gosec findings in a comment on the PR (count, rule IDs, locations) before fixing — this documents the scope-guard check from the issue body.//nolint:gosec // G### <reason>is acceptable only for genuine false positives with a real justification. No blanket suppressions, no linter config changes.make checkgreen before each commit.mainwhose body containscloses #47, and end the finishing commit's title with(closes #47).refactor/extract-signature) is in flight and touchesinternal/imgcache/internal/signature. Base onmainas it is; if a finding is in code being moved by #46, fix it inmain's current layout anyway — any conflict gets resolved at merge time.Scope update from a fresh
make checkrun (golangci-lint 2.12.2): the "≈10 findings" figure in the issue body is stale. Current state is exactly 2 gosec findings, bothG124(http.Cookie missing or insecureSecure/HttpOnly/SameSiteattributes):internal/session/session.go:84internal/session/session.go:128All tests pass; these two findings are the only thing keeping
make checkred. Well within the scope guard.Additional direction for the fix:
HttpOnly/Secure/SameSite), so per repo rules: write a failing test FIRST asserting the cookies carry the correct attributes, commit it, then fix until green — do not//nolintthese; they are genuine findings, and the fix is to set the attributes properly.SameSiteshould beLaxor stricter;HttpOnlytrue;Securetrue. IfSecure: truewould break any documented plain-HTTP dev flow, note the reasoning in the PR body rather than weakening the cookie.TODO.mdin the finishing commit per its Workflow section (move Next Step to Completed Steps, promote the next Future Step, and correct the stale "10 findings" status text).Review of PR #48 came back FAIL with one blocking item (labelled
needs-rework): the ignored former secure-toggle parameter onsession.NewManagermust be removed in this PR rather than deferred — pre-1.0, everything updates in one pass. Full rework direction is in the review comment on the PR: #48 (comment). The mechanical call-site updates ininternal/session/session_test.go(call shape only, assertions unchanged) are reviewer-directed; the accompanying TODO.md P1 deferral entry gets dropped in the same commit.