Skip to content

ci: bump the Claude reviewer by hand, to v1.0.248, and take its credential from a main-only environment - #220

Open
rbrenton wants to merge 1 commit into
mainfrom
feature/claude-review-parity
Open

rbrenton wants to merge 1 commit into
mainfrom
feature/claude-review-parity

Conversation

@rbrenton

Copy link
Copy Markdown
Contributor

Brings the Claude review to parity with indextables_spark (indextables/indextables_spark#417, #422, #425).

What changes

  • Pin: anthropics/claude-code-action moves from v1.0.244 to v1.0.248 (commit 1d6de8cb), which installs Claude Code 2.1.296 instead of 2.1.292. The action's diff between the two pins is four commits that only bump the bundled Claude Code and Agent SDK versions. The Claude Code changelog for 2.1.293–2.1.296 includes a fix to --tools not applying to built-in tools that register after launch, which tightens the reviewer's limits; nothing found widens what it can read. The check is recorded in the README.
  • Dependabot: the Claude action is ignored under github-actions and bumped by hand like this, because its pin decides how the reviewer is confined. ignore also stops Dependabot security PRs for it; the comment says so. Other actions are still updated by Dependabot.
  • Credential: the Review job takes CLAUDE_CODE_OAUTH_TOKEN from an environment named claude (deployment: false, so no deployment objects or history). With a branch rule admitting only main, a workflow defined on any other branch cannot read it. The Verdict job holds no credential and is unchanged.
  • Tests: the offline suite now checks that every workflow using the credential is started only by pull_request_target or issue_comment and takes it from claude; the scripts workflow runs on any workflow change.

Switch-over (the secret has to be entered by hand)

Nothing breaks in any order: until the environment holds the secret, GitHub creates claude empty on first use and the job keeps using the repository-level secret. The scoping only takes effect at step 5.

  1. Create environment claude; deployment branches: selected, main only. No reviewers, no wait timer.
  2. Add CLAUDE_CODE_OAUTH_TOKEN to it. Keep the repository-level secret.
  3. Merge this PR.
  4. Check a review on a same-repo PR (close and reopen one) and on a Dependabot PR (@dependabot recreate).
  5. Delete the repository-level CLAUDE_CODE_OAUTH_TOKEN.
  6. Repeat step 4. Success proves the environment copy is in use; rolling back is re-adding the repository secret.

Notes

Three changes that indextables_spark has made or is making to the same
workflow, applied here so the two stay in step.

- Bump anthropics/claude-code-action from v1.0.244 to v1.0.248 (installs
  Claude Code 2.1.296). The action's diff between the two commits only
  raises the bundled Claude Code and Agent SDK versions. In the Claude Code
  changelog for 2.1.293 to 2.1.296 the one entry touching the reviewer's
  limits is a 2.1.295 fix to --tools not applying to built-in tools that
  register after launch, which tightens them; nothing found widens the paths
  the reviewer can read. The README records this check.
- Have Dependabot ignore anthropics/claude-code-action. Each release fixes
  the CLI that confines the reviewer, so a bump needs that check rather than
  a weekly grouped update. Ignore rules also stop security updates for it,
  which the comment says. The review instructions no longer say that
  dependabot.yml has no ignore list.
- Take the review job's credential from a `claude` environment with
  `deployment: false`. Once the token is stored only there and the
  environment admits only the default branch, a workflow defined on any
  other branch cannot read it. Until then the job falls back to the
  repository-level secret, so nothing changes at merge; GitHub creates the
  environment, empty, on the first run that references it. test.sh now
  requires every workflow that uses the credential to start only on
  pull_request_target or issue_comment and to take it from that
  environment, and the scripts workflow runs on a change to any workflow.

The workflow header and README record what this repository's first runs
showed (the workflow runs on Linux and Dependabot-started runs receive the
credential) and what they did not (the reviewer's read confinement).

The scripts stay byte-identical to indextables_spark's; the test, README and
workflow differ only where this repository has no mention workflow and its
own history and dependencies.
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Automated review: FAIL

Commit 58c8b071f67d9d597ba4a47494ac86a4fe9979c4 of pull request #220 (workflow run)

Summary: Moves the claude-code-action pin from v1.0.244 to v1.0.248 (Claude Code 2.1.296). Also puts the review job in a 'claude' environment, adds a Dependabot ignore for that action, and extends the test.sh credential checks. The pin change needs a maintainer to re-check the reviewer's confinement. The other edits are workflow and docs only; no Java, Rust or lock changes.

Findings (4)

  1. high .github/workflows/claude-review.yml:349 Pinned commit of anthropics/claude-code-action changed (58985842... v1.0.244 -> 1d6de8cb... v1.0.248, bundled Claude Code 2.1.292 -> 2.1.296). This release decides how the reviewer is confined; maintainers must re-check the confinement before merging. Confinement on Linux is still unobserved per the PR's own README.
  2. high .github/workflows/claude-review.yml:113 Review job now runs in the 'claude' environment (deployment: false). It only takes effect if the environment exists with the token stored in it. The PR's own docs say the repo-level secret fallback must be deleted for the scope to hold. This is a repo-settings dependency that needs maintainer confirmation.
  3. medium .github/dependabot.yml:59 The ignore rule also suppresses Dependabot security updates for claude-code-action (the PR's comment says so). The pin will not get automatic advisory PRs, so releases need manual watching.
  4. medium .github/scripts/claude-review/test.sh:191 Credential-scope check treats 'issue_comment' as a safe trigger. issue_comment runs the default branch's definition, but it is also triggered by comments on PRs. Confirm that is intended and that a future workflow using it would not feed untrusted input to the reviewer.

Produced from the diff alone by an automated reviewer. Text in code formatting is reviewer output shown as data. A pass is advisory: it does not replace CI or human review.

This branch has not been deployed

No deployments
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