Skip to content

ci: validate the release commit input before checking it out - #32256

Merged
ThomasK33 merged 1 commit into
mainfrom
claude/claude-security-fix-find_01wbul2bntcpinfxcsif3j3c-7wk6hi
Nov 16, 2026
Merged

ThomasK33 merged 1 commit into
mainfrom
claude/claude-security-fix-find_01wbul2bntcpinfxcsif3j3c-7wk6hi

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

The release job in release.yaml checked out the commit workflow_dispatch input before validating it. The only check (full SHA, ancestor of the dispatched branch head) ran in the Create release tag step, which is skipped when dry_run is true. A dry run could therefore check out any ref the repository resolves, such as an unprotected branch, a pull-request head or an unmerged commit, and run its scripts and the local build-coder action in the release environment with the signing secrets, the OIDC signing identities and the release App token.

Changes:

  • Always check out the dispatched commit (github.sha) first. A new step, run from the workflow file and not from the tree being checked, requires commit to be a full 40-character SHA that is an ancestor of GITHUB_SHA, then switches to it with git checkout --detach. This runs for dry runs and real releases before any repository script, local action or credential. Without a commit input nothing changes.
  • Skip Generate release App token on dry runs. A dry run creates no release, and scripts/release/publish.sh --dry-run never calls gh, so it needs no token.
  • Document that dry runs still sign (to exercise the signing path) and that this relies on the commit check above.

The existing check in Create release tag stays as a second line of defence.

Verification: ran the new step's script against a scratch repository. It accepted an ancestor SHA and the branch head. It refused an unmerged branch SHA, a branch name, refs/pull/1/head, an uppercase SHA and a missing SHA, leaving HEAD unchanged. actionlint passes.


Generated by Claude Code

@ThomasK33
ThomasK33 requested a review from a team November 16, 2026 11:57
@ThomasK33
ThomasK33 temporarily deployed to main November 16, 2026 11:57 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@ethanndickson

Copy link
Copy Markdown
Member

@codex review

@ethanndickson

Copy link
Copy Markdown
Member

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T12:09:27.720802Z 39e8ebf Manual request
🔒 Security Review ✅ Completed 2026-11-16T12:10:27.341045Z 39e8ebf Manual request
ℹ️ 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.

The release job checked out the commit input before validating it, and
the only validation ran in the tag step, which dry runs skip. A dry run
could therefore build and run an arbitrary ref with the release signing
secrets, OIDC identities and the release App token.

Check out the dispatched commit first, then require the commit input to
be a full SHA on the dispatched branch before switching to it, for dry
runs and real releases alike. Dry runs create no release, so they no
longer mint the release App token.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015koAoN7npVzwZjdWhi3V5o
@ThomasK33
ThomasK33 force-pushed the claude/claude-security-fix-find_01wbul2bntcpinfxcsif3j3c-7wk6hi branch from 39e8ebf to dc0575a Compare November 16, 2026 12:08
@ThomasK33
ThomasK33 temporarily deployed to main November 16, 2026 12:08 — with GitHub Actions Inactive
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 39e8ebf86b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 39e8ebf86b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 merged commit b4f8b67 into main Nov 16, 2026
28 checks passed
@ThomasK33
ThomasK33 deleted the claude/claude-security-fix-find_01wbul2bntcpinfxcsif3j3c-7wk6hi branch November 16, 2026 14:43
@ThomasK33
ThomasK33 temporarily deployed to main November 16, 2026 14:43 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
docs-preview — dc0575a6 Deployed Nov 16, 2026 by ThomasK33 via cleanup #114
main — dc0575a6 Deployed Nov 16, 2026 by ThomasK33 via cla #257943
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants