Skip to content

Pin third-party actions to commit SHAs (fixes 3 CodeQL unpinned-tag alerts) - #14

Merged
nicolasestrem merged 1 commit into
mainfrom
fix/codeql-security-alerts
Oct 19, 2026
Merged

nicolasestrem merged 1 commit into
mainfrom
fix/codeql-security-alerts

Conversation

@nicolasestrem

Copy link
Copy Markdown
Owner

Fixes the three open CodeQL actions/unpinned-tag alerts by pinning exactly the flagged third-party uses: refs to full 40-char commit SHAs (annotated tags peeled via refs/tags/<tag>{}). Human tags kept as trailing comments so Dependabot can still update the pins. No version bumps.

Per-alert mapping

CodeQL alert File:line Before After
#1 (medium) .github/workflows/opencode.yml:35 anomalyco/opencode/github@latest (moving tag — worst of the three) @77fc88c8ade8e5a620ebbe1197f3a572d29ae91a + # latest @ 2026-10-19
#2 (medium) .github/workflows/claude-code-review.yml:36 anthropics/claude-code-action@v1 @5eb090f3c3afd701a0672cd32981197ca27688f6 + # v1
#3 (medium) .github/workflows/claude.yml:35 anthropics/claude-code-action@v1 @5eb090f3c3afd701a0672cd32981197ca27688f6 + # v1

Verification

  • Tags dereferenced with git ls-remote ... 'refs/tags/v1' 'refs/tags/v1^{}' / refs/tags/latest{^}; both are annotated tags (tag object → peeled commit). Pins resolve as commits via gh api repos/.../commits/<sha>.
  • action.yml inspected at each pinned SHA:
    • anthropics/claude-code-action: nested uses: oven-sh/setup-bun@0c5077e… is already SHA-pinned; install is bun install --production from its own checked-out source; the one curl is a token-revocation DELETE, not an install. No mutable installs.
    • anomalyco/opencode/github: ⚠️ its own composite action.yml internally does curl …/releases/latest and curl -fsSL https://opencode.ai/install | bash at run time. Pinning the wrapper closes the flagged CodeQL alert (the uses: ref is no longer mutable) but is not full immutability — the caller cannot pin the action's internal install path. Longer-term options: vendor the action under .github/actions/, replace with explicit version-pinned install steps, or drop the workflow.
  • actionlint 1.7.7: exit 0 on all three workflows; YAML parse-validated.
  • Repo is a Windows-only WPF app; the dotnet suite was not run (Linux host, net8.0-windows), and the change touches no C#.

Alerts close when this reaches main and the next CodeQL analysis runs.

Pin the three refs CodeQL flagged as actions/unpinned-tag so workflows
no longer resolve mutable tags at run time:

- opencode.yml: anomalyco/opencode/github@latest (moving tag) pinned to
  77fc88c8ade8e5a620ebbe1197f3a572d29ae91a (peeled refs/tags/latest^{})
- claude.yml / claude-code-review.yml: anthropics/claude-code-action@v1
  pinned to 5eb090f3c3afd701a0672cd32981197ca27688f6 (peeled refs/tags/v1^{})

Human tags kept as trailing comments so Dependabot can still update pins.
Closes CodeQL alerts #1, #2, #3 once merged to main and re-analyzed.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T19:20:23.930096Z d33edd2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@nicolasestrem
nicolasestrem merged commit 4f64760 into main Oct 19, 2026
1 check passed
@nicolasestrem
nicolasestrem deleted the fix/codeql-security-alerts branch October 19, 2026 19:31
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