Skip to content

ci: go 1.26, golangci-lint v2.12, address new gosec findings#300

Open
paskal wants to merge 5 commits into
masterfrom
ci/go-1.26-golangci-2.12
Open

ci: go 1.26, golangci-lint v2.12, address new gosec findings#300
paskal wants to merge 5 commits into
masterfrom
ci/go-1.26-golangci-2.12

Conversation

@paskal

@paskal paskal commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

CI pinned go 1.24 while all three modules require 1.25 since #297, which made the example build fail on every dependabot PR until toolchain auto-download kicked in, and golangci-lint v2.6.2 panics on the go 1.26 stdlib.

Changes:

  • CI: go 1.24 → 1.26, golangci-lint v2.6.2 → v2.12.2, golangci-lint-action v7 → v9 (v8/v9 have no breaking config changes, node runtime only), --config= form for args
  • push triggers: explicit branches: ["**"] / tags: ["**"] instead of empty keys flagged by actionlint
  • remaining actions to current majors: checkout v4 → v7, codeql-action v3 (deprecated) → v4; quoted $GITHUB_WORKSPACE in run scripts, actionlint now fully clean (start-mongoDB@v0.2 is already latest)
  • gosec findings new in v2.12, both v1 and v2 modules:
    • dev/test avatar endpoints (dev_provider.go, custom_server.go) now set Content-Type: image/png before writing the generated identicon
    • false positives suppressed with reasons: token/jwt.go cookies (Secure/SameSite come from service config, XSRF cookie is JS-readable by design), provider/providers.go oauth endpoint urls flagged as hardcoded credentials (G101), provider/apple.go redirect to the fixed apple auth endpoint (G710), avatar/localfs.go store-generated paths (G703)
    • gosec excluded in _test.go files via .golangci.yml
  • gofmt on avatar/avatar_test.go (pre-existing comment alignment drift)

Both modules lint clean with v2.12.2, tests pass with -race, example builds. go fix ./... produced no changes.

paskal added 4 commits July 10, 2026 08:17
- set image/png content type on generated avatar endpoints
- suppress false positives with reasons: config-driven cookie attrs,
  oauth endpoint urls flagged as credentials, fixed-host apple redirect,
  store-generated avatar paths
- exclude gosec in test files via config
- mirror apple redirect nolint to v2 to keep modules in sync
- set explicit branches/tags match-all on push triggers, actionlint
  flags the empty form
- use --config= form for golangci-lint-action v9 args
@paskal
paskal requested a review from umputun as a code owner July 10, 2026 07:50
@paskal
paskal requested a review from Copilot July 10, 2026 07:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 29077894154

Coverage increased (+0.009%) to 85.454%

Details

  • Coverage increased (+0.009%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (12 of 13 lines covered, 92.31%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
provider/providers.go 3 2 66.67%
Total (6 files) 13 12 92.31%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3561
Covered Lines: 3043
Line Coverage: 85.45%
Coverage Strength: 8.38 hits per line

💛 - Coveralls

@coveralls

coveralls commented Jul 10, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29079091071

Coverage increased (+0.009%) to 85.454%

Details

  • Coverage increased (+0.009%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (12 of 13 lines covered, 92.31%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
provider/providers.go 3 2 66.67%
Total (6 files) 13 12 92.31%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3561
Covered Lines: 3043
Line Coverage: 85.45%
Coverage Strength: 8.38 hits per line

💛 - Coveralls

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.

3 participants