From fbc5b6871aaf9b5db9cf74c961e0ba92220834c0 Mon Sep 17 00:00:00 2001 From: Ben Browning Date: Wed, 1 Apr 2026 14:26:01 +0000 Subject: [PATCH 1/3] Update GitHub Actions and golangci-lint to fix Node.js 20 deprecation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Node.js 20 will be removed from GitHub Actions runners on September 16, 2026. Update all actions to Node.js 24-compatible versions: - actions/checkout v4 → v6 - actions/setup-go v5 → v6 - golangci/golangci-lint-action v6 → v9 - actions/upload-artifact v4 → v7 - actions/download-artifact v4 → v8 Migrate golangci-lint from v1 to v2: add version field to config, remove gosimple (merged into staticcheck) and typecheck (now built-in) linters. Update pre-commit hook to golangci-lint v2.11.4. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 26 +++++++++++++------------- .github/workflows/release.yml | 24 ++++++++++++------------ .golangci.yml | 4 ++-- .pre-commit-config.yaml | 2 +- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ff1a1e..ec4011f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,16 +14,16 @@ jobs: name: Lint runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version: "1.23" - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v9 with: - version: v1.62 + version: v2.11 - name: Check formatting run: | @@ -39,9 +39,9 @@ jobs: runs-on: ubuntu-22.04 needs: lint steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version: "1.23" @@ -49,7 +49,7 @@ jobs: run: go test -short -race -coverprofile=coverage.out ./... - name: Upload coverage - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: coverage path: coverage.out @@ -59,9 +59,9 @@ jobs: runs-on: ubuntu-22.04 needs: unit-tests steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version: "1.23" @@ -80,9 +80,9 @@ jobs: - goos: linux goarch: arm64 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version: "1.23" @@ -94,7 +94,7 @@ jobs: run: go build -ldflags="-s -w" -o bin/paude-proxy-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/paude-proxy/ - name: Upload binary - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: paude-proxy-${{ matrix.goos }}-${{ matrix.goarch }} path: bin/paude-proxy-${{ matrix.goos }}-${{ matrix.goarch }} @@ -104,7 +104,7 @@ jobs: runs-on: ubuntu-22.04 needs: lint steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Build container image run: podman build -t paude-proxy:test . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8282ee..4bc3b94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,25 +12,25 @@ jobs: name: Lint runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version: "1.23" - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v9 with: - version: v1.62 + version: v2.11 test: name: Test runs-on: ubuntu-22.04 needs: lint steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version: "1.23" @@ -53,9 +53,9 @@ jobs: - goos: darwin goarch: arm64 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version: "1.23" @@ -69,7 +69,7 @@ jobs: go build -ldflags="-s -w" -o dist/paude-proxy-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/paude-proxy/ - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: paude-proxy-${{ matrix.goos }}-${{ matrix.goarch }} path: dist/paude-proxy-${{ matrix.goos }}-${{ matrix.goarch }} @@ -79,7 +79,7 @@ jobs: runs-on: ubuntu-22.04 needs: test steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up QEMU for multi-arch builds run: sudo apt-get update && sudo apt-get install -y qemu-user-static @@ -124,12 +124,12 @@ jobs: runs-on: ubuntu-22.04 needs: [build-binaries, publish-containers] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - name: Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: dist merge-multiple: true diff --git a/.golangci.yml b/.golangci.yml index 264e642..2786491 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,3 +1,5 @@ +version: "2" + run: timeout: 5m go: "1.23" @@ -8,9 +10,7 @@ linters: - govet - staticcheck - unused - - gosimple - ineffassign - - typecheck - gofmt - goimports - misspell diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6667f18..49f326d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,6 +15,6 @@ repos: pass_filenames: false - repo: https://github.com/golangci/golangci-lint - rev: v1.62.2 + rev: v2.11.4 hooks: - id: golangci-lint From 876e9904d538cd4924599f5808347b13de9a3491 Mon Sep 17 00:00:00 2001 From: Ben Browning Date: Wed, 1 Apr 2026 14:28:42 +0000 Subject: [PATCH 2/3] Fix golangci-lint v2 config: move formatters and remove deprecated options - Move gofmt and goimports from linters to formatters section (v2 requirement) - Replace top-level linters-settings with formatters.settings - Remove issues.exclude-use-default (not valid in v2) Co-Authored-By: Claude Opus 4.6 --- .golangci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 2786491..2e4badc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,15 +11,14 @@ linters: - staticcheck - unused - ineffassign - - gofmt - - goimports - misspell - gosec - unconvert -linters-settings: - gofmt: - simplify: true - -issues: - exclude-use-default: true +formatters: + enable: + - gofmt + - goimports + settings: + gofmt: + simplify: true From f3e7396bc43bfb6f8e79994117bc1542e3e4c3ec Mon Sep 17 00:00:00 2001 From: Ben Browning Date: Wed, 1 Apr 2026 14:31:19 +0000 Subject: [PATCH 3/3] Fix golangci-lint v2 config: add exclusion presets and gosec rule exclusions The v1 exclude-use-default option suppressed common false positives. Restore equivalent behavior in v2 with exclusion presets, and exclude gosec rules that are false positives for this project (dummy credentials, config-driven file paths, logging config values). Co-Authored-By: Claude Opus 4.6 --- .golangci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 2e4badc..f864719 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,6 +14,21 @@ linters: - misspell - gosec - unconvert + settings: + gosec: + excludes: + - G101 # False positive: dummy/placeholder credentials are intentional + - G104 # Unhandled errors in deferred Close() calls + - G117 # False positive: dummy token fields are intentional + - G301 # Directory permissions 0755 is appropriate for CA dir + - G302 # File permissions 0644 is appropriate for log files + - G703 # False positive: file paths from config, not user input + - G706 # False positive: logging config values, not user input + exclusions: + presets: + - comments + - std-error-handling + - common-false-positives formatters: enable: