Skip to content

Fix CI: bump toolchain to go 1.26.4 and migrate golangci-lint to v2 - #3

Merged
BinanIbrahim merged 1 commit into
mainfrom
fix/ci-toolchain-versions
Jun 24, 2026
Merged

Fix CI: bump toolchain to go 1.26.4 and migrate golangci-lint to v2#3
BinanIbrahim merged 1 commit into
mainfrom
fix/ci-toolchain-versions

Conversation

@BinanIbrahim

Copy link
Copy Markdown
Owner

Why

The Lint and Govulncheck CI jobs have been failing since the CI pipeline merged (run #27835083693 on main), because go.mod pinned an outdated go 1.26.1:

  • Lint — golangci-lint v1.62.2 (built with go1.23) refuses to run against a go1.26 target.
  • Govulncheck — 9 stdlib vulns, all Found in go1.26.1, Fixed in go1.26.2–1.26.4.

Changes

  • go.mod: go 1.26.11.26.4 — clears all 9 govulncheck findings.
  • .github/workflows/ci.yml: golangci-lint-action@v6@v9, version v1.62.2v2.12.2.
  • .golangci.yml: convert to the v2 schema; exclude gosec G204/G304 (this CLI intentionally shells out to docker and opens files by computed path).
  • Resolve real findings from enabling the linters on existing code:
    • errcheck — unchecked Close/RemoveAll/MkdirAll.
    • revive — package comments.
    • gosec G301 — dir perms 07550750.
    • Annotate the already-guarded Zip-Slip Join (G305) and the local docker save copy (G110) with //nolint + rationale.

Validation (local)

  • gofmt -s -l . — clean
  • go vet ./... — clean
  • go test -race -cover ./... — pass
  • golangci-lint run ./... (v2.12.2) — 0 issues
  • govulncheck ./...No vulnerabilities found

🤖 Generated with Claude Code

The CI Lint and Govulncheck jobs were failing because go.mod pinned an
outdated go 1.26.1:

- golangci-lint v1.62.2 (built with go1.23) refused to run against the
  go1.26 target.
- govulncheck reported 9 stdlib vulns all fixed in go1.26.2-1.26.4.

Changes:
- go.mod: go 1.26.1 -> 1.26.4 (clears all govulncheck findings).
- ci.yml: golangci-lint-action v6 -> v9, lint version v1.62.2 -> v2.12.2.
- .golangci.yml: convert to v2 schema; exclude gosec G204/G304 (this CLI
  intentionally shells out to docker and opens files by computed path).
- Resolve real findings surfaced by enabling the linters on existing code:
  errcheck (unchecked Close/RemoveAll/MkdirAll), revive (package comments),
  gosec G301 (dir perms 0755 -> 0750). Annotate the already-guarded
  Zip-Slip Join (G305) and the local docker-save copy (G110) with nolint.

Validated locally: gofmt, go vet, go test -race, golangci-lint run
(0 issues), and govulncheck (no vulnerabilities).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BinanIbrahim
BinanIbrahim merged commit ca9058a into main Jun 24, 2026
7 checks passed
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.

1 participant