Skip to content

fix(ci): pin the third-party action, drop the credentials and the unused token - #9

Merged
shenzhaoyan merged 1 commit into
mainfrom
aikido/2026-09-23
Sep 23, 2026
Merged

shenzhaoyan merged 1 commit into
mainfrom
aikido/2026-09-23

Conversation

@shenzhaoyan

Copy link
Copy Markdown
Contributor

The two Aikido findings on this repo, both on .github/workflows/go.yml, plus two things the same read turned up.

  • persist-credentials: false on checkout (prio 30). Nothing here pushes, tags or opens a PR, so the token checkout writes into .git/config by default is only an extra thing for a later step — or for the dependency code go test runs — to find.
  • golangci/golangci-lint-action@v9 pinned to ba0d7d2 (prio 70). v9 resolves to that exact commit today, and it is also what v9.3.0 points at, so CI runs the same bytes; the tag is movable, the pin is not. actions/* stay on tags — they are governed by GitHub itself and the rule exempts them.
  • actions/setup-go@v4 -> v5. v4 runs on the node16 action runtime, which GitHub has removed; actionlint reports it as "too old to run on GitHub Actions". Same inputs (go-version-file + cache), so this is a runtime bump. actions/checkout v4 -> v5 at the same time, matching the rest of the fleet.
  • Dropped id-token: write from the top-level permissions. It had no consumer: nothing in this workflow does OIDC to a cloud provider, so every step was being handed a token it could mint cloud credentials with, for nothing.

Verified: actionlint reports zero issues (it flagged setup-go@v4 before), no duplicate keys, go build, go vet, golangci-lint run at the v2.13.2 the workflow pins (0 issues) and go test -short -p=1 -count=1 all pass.

A full OSV pass over the 54-module graph returns one hit, golang.org/x/crypto 0.57.0 / GO-2026-5932. No action: that advisory is the "openpgp is unmaintained" notice, which has no fixed version at all (introduced: 0, no fix event), and this module reaches x/crypto through gorm.io/driver/sqlserver -> go-mssqldb -> ntlm -> x/crypto/md4, not openpgp. govulncheck, which resolves symbols rather than modules, reports nothing.

…sed token

The two Aikido findings on this repo, both on .github/workflows/go.yml, plus two
things the same read turned up.

- `persist-credentials: false` on checkout (prio 30). Nothing here pushes, tags
  or opens a PR, so the token checkout writes into .git/config by default is
  only an extra thing for a later step — or for the dependency code `go test`
  runs — to find.
- `golangci/golangci-lint-action@v9` pinned to ba0d7d2 (prio 70). `v9` resolves
  to that exact commit today, and it is also what v9.3.0 points at, so CI runs
  the same bytes; the tag is movable, the pin is not. actions/* stay on tags —
  they are governed by GitHub itself and the rule exempts them.
- `actions/setup-go@v4` -> v5. v4 runs on the node16 action runtime, which
  GitHub has removed; actionlint reports it as "too old to run on GitHub
  Actions". Same inputs (go-version-file + cache), so this is a runtime bump.
  actions/checkout v4 -> v5 at the same time, matching the rest of the fleet.
- Dropped `id-token: write` from the top-level permissions. It had no consumer:
  nothing in this workflow does OIDC to a cloud provider, so every step was
  being handed a token it could mint cloud credentials with, for nothing.

Verified: actionlint reports zero issues (it flagged setup-go@v4 before), no
duplicate keys, `go build`, `go vet`, `golangci-lint run` at the v2.13.2 the
workflow pins (0 issues) and `go test -short -p=1 -count=1` all pass.

A full OSV pass over the 54-module graph returns one hit, golang.org/x/crypto
0.57.0 / GO-2026-5932. No action: that advisory is the "openpgp is unmaintained"
notice, which has no fixed version at all (introduced: 0, no fix event), and
this module reaches x/crypto through gorm.io/driver/sqlserver -> go-mssqldb ->
ntlm -> x/crypto/md4, not openpgp. govulncheck, which resolves symbols rather
than modules, reports nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 23, 2026 02:33
@shenzhaoyan
shenzhaoyan requested a review from molon September 23, 2026 02:34

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 review overview

🟢 Approval recommended

The reviewed changes have no unresolved blocking issues.

Review effort: Lite
Findings: None

What changed in this PR

Updates the Go CI workflow to reduce credential exposure, modernize action runtimes, and pin the third-party linter action.

Changes:

  • Removes unused OIDC permissions and checkout credential persistence.
  • Upgrades checkout and setup-go to v5.
  • Pins golangci-lint to an immutable commit SHA.
File Description
.github/​workflows/​go.yml Applies CI security and action-version hardening.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@shenzhaoyan
shenzhaoyan merged commit 44392ef into main Sep 23, 2026
2 checks passed
@shenzhaoyan
shenzhaoyan deleted the aikido/2026-09-23 branch September 23, 2026 02:49
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