Skip to content

chore(deps): bump claude-code-action to v1.0.185, quote --allowedTools - #559

Open
wkoutre wants to merge 4 commits into
nextfrom
chore/sync-claude-code-action
Open

chore(deps): bump claude-code-action to v1.0.185, quote --allowedTools#559
wkoutre wants to merge 4 commits into
nextfrom
chore/sync-claude-code-action

Conversation

@wkoutre

@wkoutre wkoutre commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Maintenance pass on Claude Code Action workflows. Applies three classes of edit atomically:

Per-file changes

.github/workflows/_claude-code-review.yml

  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)
  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)

.github/workflows/_claude-docs-check.yml

  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)
  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)

.github/workflows/_claude-main.yml

  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)
  • Model bump: claude-opus-4-8claude-opus-5

.github/workflows/_claude-task-worker.yml

  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)
  • Model bump: claude-opus-4-8claude-opus-5
  • Model bump: claude-opus-4-8claude-opus-5

.github/workflows/_generate-pr-metadata.yml

  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)
  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)
  • Model bump: claude-opus-4-8claude-opus-5

.github/workflows/_update-action-versions-worker.yml

  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)

.github/workflows/dev-ai-newsletter.yml

  • SHA bump anthropics/claude-code-action: 787c5a0be7b93b (v1.0.183)
  • Model bump: claude-opus-4-8claude-opus-5

Opened by the sync-claude-code-action maintenance job. The job runs weekly and bumps SHAs + applies known migrations; review the diff before merging.

AI-Generated Description

Summary

Weekly sync-claude-code-action maintenance pass, plus the one code change the bump turned out to require. 7 workflow files, +15 / −15:

  • anthropics/claude-code-action: 787c5a0 (v1.0.133, pinned in chore(deps): bump claude-code-action to v1.0.133 and model versions #527) → 9db594c (v1.0.185) — all 10 pins in the repo. Release notes.
  • 5 --allowedTools values quoted (b19fb05) — v1.0.183 changed how claude_args is tokenized, which silently breaks every unquoted grant containing a space. Without this, the bump would have gone green and degraded.
    Two things about this diff that differ from the sync job's boilerplate:
  • The version target moved mid-branch. The branch bumped to v1.0.183 (6148481), and this week's run bumped again to v1.0.185 (6a54c3f) — pure SHA lines, nothing else. Net against next it is a single hop, 787c5a09db594c.
  • No model-ID lines. The claude-opus-4-8 → claude-opus-5 sweep landed independently as chore(workflows): update model references to claude-opus-5 #558 and this branch merged next in at fb70db5, so those edits are in the common ancestor. git diff against next contains zero model-ID changes. The ai-toolkit → c4820d6 bullet is likewise a no-op: this repo's own references resolve symbolically (@main, toolkit_ref: 'main'), so there is no SHA to move.

Why the quoting fix is load-bearing

v1.0.183 escapes ( and ) before handing claude_args to shell-quote tokenization. An unquoted grant containing a space therefore splits on whitespace, and because --allowedTools is variadic both halves are consumed as rules:

--allowedTools Read,Grep,Bash(git log:*),Bash(git diff:*)
  →  rule 1: "Read,Grep,Bash(git"
  →  rule 2: "log:*),Bash(git"
  →  rule 3: "diff:*)"

None of those match anything. The run stays green; the agent quietly loses the grants it was supposed to have and its git log / git diff calls start getting denied mid-run. Quoting keeps the value one token, matching the --system-prompt "$VAR" convention used two lines away in _claude-main.yml.
4 of the 5 sites were broken on their default path, not hypothetically:

File Line Site Space-containing grants
_claude-code-review.yml 1190 Review step ($ALLOWED_TOOLS) Bash(git log/diff/show/blame/rev-parse:*) — 5, from the default TOOLS array at L1092
_claude-code-review.yml 1730 Auto-fix claude_args (literal) Bash(npm run:*), Bash(npx nx:*), Bash(bun run:*)
_claude-docs-check.yml 686 Docs-check step (literal) Bash(git log:*), Bash(git diff:*), Bash(git show:*)
_generate-pr-metadata.yml 905 Generation step ($ALLOWED_TOOLS) Bash(git log/diff/show/rev-parse:*) — 4, from the default TOOLS array at L868
_claude-main.yml 412 Caller-supplied $INPUT_ALLOWED_TOOLS depends on the caller; allowed_tools defaults to ""
_claude-task-worker.yml:606 needed no change — its list was already quoted.

Changes

File Pins bumped --allowedTools quoted
.github/workflows/_claude-code-review.yml 2 (review L1222, auto-fix L1715) 2 (L1190, L1730)
.github/workflows/_claude-docs-check.yml 2 (check L710, auto-fix L1035) 1 (L686)
.github/workflows/_claude-main.yml 1 (L460) 1 (L412)
.github/workflows/_claude-task-worker.yml 1 (L580) — (already quoted)
.github/workflows/_generate-pr-metadata.yml 2 (quality gate L483, generation L940) 1 (L905)
.github/workflows/_update-action-versions-worker.yml 1 (L440)
.github/workflows/dev-ai-newsletter.yml 1 (L388)
No input contract, permission, prompt, or logic changed. No packages/plugins/ files touched → no plugin version bump applies.

Two --allowedTools-class sites left unquoted

  • _claude-docs-check.yml:1047 (auto-fix claude_args) — not broken: its only Bash grant is Bash(git:*), no space, nothing fragments. It is however now the only unquoted --allowedTools left, in the same file as L686 which was quoted. Adding a space-containing grant there later reintroduces the bug with no signal.
  • _claude-main.yml:417--disallowedTools $INPUT_DISALLOWED_TOOLS — still unquoted, and the parser change is flag-agnostic. disallowed_tools defaults to "", so no path in this repo is affected, but an external caller passing e.g. Bash(rm -rf:*) gets the same fragmentation. For a deny list that fails open, which inverts the severity relative to the allow-list case. This is the one residual gap worth deciding on before merge rather than after.

Verification

  • All 10 anthropics/claude-code-action pins are on 9db594c / v1.0.185. grep for 787c5a0, be7b93b, v1.0.133, and v1.0.183 across .yml, .md, and .ts returns nothing — no intermediate SHA left behind and nothing stale in the docs.
  • The 2 remaining unpinned mentions are intentional: the prompt doc string at _update-action-versions-worker.yml:274 and the grep/sed patterns in update-claude-code-action.yml that drive this job.
  • No pins under .github/actions/, .github/workflows/examples/, or the docs, so those 10 are the complete set.
  • This PR is its own live test of one broken site. generate-pr-title-description.yml:47 calls uses: ./.github/workflows/_generate-pr-metadata.yml, a local ref — so this title and description were generated by the patched workflow on 9db594c, and the git diff / git grep / git log reads behind the tables above resolved rather than being denied. That exercises L905, the site with 4 space-containing grants.
    Two things not checkable from this runner:
  • The 9db594cv1.0.185 mapping comes from the sync job; no network access to the upstream repo, so the SHA was not independently re-verified against the tag.
  • actionlint and a YAML parse-check were both blocked by this runner's command policy. The \" escapes are standard in both contexts they appear in (bash double-quoted strings for L1190/686/412/905, a YAML double-quoted scalar for L1730), but CI is the first real parse.

Test plan

  • CI green
  • _generate-pr-metadata.yml — exercised by this PR itself, patched, on 9db594c
  • _claude-docs-check.yml — also called locally (claude-docs-check.yml:66), so this PR live-exercises L686, the second demonstrably-broken site. A green docs-check is the confirmation.
  • _claude-main.yml — spot-check with an @claude mention on this PR (claude-code.yml:35, local ref). Note this does not cover L412 unless allowed_tools is passed.
  • _claude-code-review.ymlnot exercised here. Since refactor(ci): review ai-toolkit's own PRs with @uniswap/review-cli #556 ai-toolkit reviews its own PRs with @uniswap/review-cli, so its 2 pins and both quoting fixes (L1190, L1730) run only in consumer repos. L1190 is on the default review path, so validate against a consumer or Uniswap/ai-sandbox before this reaches them.
  • _update-action-versions-worker.yml / dev-ai-newsletter.yml — not triggered by a PR event; next scheduled or manual run is the real check.
  • Decide on _claude-main.yml:417 (--disallowedTools) — fix now or file it.

Opened by the sync-claude-code-action maintenance job. It runs weekly, bumps SHAs, and applies known migrations — review the diff before merging. The --allowedTools quoting commit was added by hand in response to review feedback; the job did not catch that the bump was breaking.

@wkoutre
wkoutre requested a review from a team as a code owner August 3, 2026 15:12
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-toolkit-slack-oauth-backend Ready Ready Preview Aug 5, 2026 6:28pm

Request Review

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

● Reviewed · against 6a54c3f · 2026-08-05 18:37 UTC · 4 reviews · view run ↗

Caution

Changes requested — two quoting issues in _claude-main.yml's caller-facing arg assembly.

Bumps anthropics/claude-code-action from v1.0.133 to v1.0.185 at all 10 pins and quotes the tool-list expansions the new argument parser would otherwise fragment.

Assessment

The pin is verified against the annotated tag, the v1.0.183→v1.0.185 source delta doesn't touch claude_args parsing, and the quoting fixes resolve correctly for every comma-separated site. What remains is confined to _claude-main.yml, and both issues land on external consumers rather than this repo: it's a reusable workflow other repos pin by SHA, and its allowed_tools/disallowed_tools inputs are the two caller-supplied values. The allow-side quoting now conflicts with the input shape this repo's own docs and examples publish; the deny side was never quoted at all and fails open when it fragments.

Must address

  • Quoting breaks the newline form of allowed_tools. REUSABLE_WORKFLOWS.md:356 and examples/07-claude-main-custom.yml:98 document allowed_tools: | as a YAML block; quoted, the block stays one token and .split(",") never splits it, so all grants — including Read and Grep, which worked unquoted — collapse into one rule that matches nothing. Normalize newlines to commas before quoting, or change the documented contract.
  • --disallowedTools still unquoted. Line 417 expands the caller-supplied deny list unquoted; a value like Bash(git push:*) fragments into rules that match nothing, so the deny silently stops applying — fail-open, with no error in the log. Quote it the same way as the --allowedTools line above it.

Suggestions

  • generate-pr-title-description.yml:52 still says # Use default model (claude-sonnet-5) while the inherited default is now claude-opus-5. The file is in this repo — line 48 calls _generate-pr-metadata.yml by local ref — not Uniswap/uniswap-ai. One-line comment fix.
Iteration history · 4 reviews
2026-08-05 18:37 UTC · 🚨 changes requested · 1 finding · 6a54c3f · run ↗
  • .github/workflows/_claude-main.yml:412 — warning · correctness
2026-08-03 17:37 UTC · 🚨 changes requested · 1 finding · b19fb05 · run ↗
  • .github/workflows/_claude-main.yml:412 — warning · dependency-upgrade
2026-08-03 16:46 UTC · 🚨 changes requested · 1 finding · fb70db5 · run ↗
  • .github/workflows/_claude-main.yml:460 — warning · dependency-upgrade
2026-08-03 15:24 UTC · 🚨 changes requested · 7 findings · 6148481 · run ↗
  • .github/workflows/_claude-code-review.yml:1715 — warning · dependency-upgrade
  • .github/workflows/_claude-code-review.yml:1222 — warning · dependency-upgrade
  • .github/workflows/_claude-docs-check.yml:710 — warning · dependency-upgrade
  • .github/workflows/_generate-pr-metadata.yml:940 — warning · dependency-upgrade
  • .github/workflows/_claude-task-worker.yml:95 — warning · correctness
  • .github/workflows/_claude-task-worker.yml:92 — info · documentation
  • .github/workflows/_generate-pr-metadata.yml:50 — info · correctness

Tip

Teach the reviewer. React 👍 on findings that helped, 👎 on false positives. Reply to push back or add context — we aggregate this weekly to tune the bot.

Comment @request-claude-review to re-run.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Check ✅

Verdict: Passed

All 7 changed files are under .github/workflows/; none touch packages/plugins/, so the mandatory plugin version-bump rule doesn't apply. Changes are mechanical CI maintenance (SHA/version bump + quoting a shell variable) with no stale doc references found.


Summary

PR #559 bumps anthropics/claude-code-action from v1.0.133 (SHA 787c5a0...) to v1.0.185 (SHA 9db594c...) across 6 workflow files, and quotes --allowedTools/$INPUT_ALLOWED_TOOLS argument lists in 4 files so they survive the action's stricter argument parser introduced in v1.0.183 (matching the pattern already fixed in commit b19fb05).

Scope check: All 7 changed files live in .github/workflows/ — none touch packages/plugins/, so the CRITICAL plugin-version-bump rule is not triggered.

CLAUDE.md check: .github/workflows/CLAUDE.md exists but only references a generic v1.0.29+ minimum requirement for plugin support — it doesn't pin or reference the specific v1.0.133/v1.0.185 versions, so nothing there is stale. A repo-wide grep for the old SHA/version string turned up zero remaining references, confirming the bump is self-contained.

README check: .github/workflows/README.md and .github/workflows/examples/CLAUDE.md were also checked; neither documents specific action version pins.

Changelog: Informational only per the task rules — no changelog entry exists for this kind of routine dependency maintenance, consistent with the prior identical commits (6a54c3f, 6148481) in this repo's history, which also didn't carry changelog entries.

No blocking issues found; verdict is PASS.

✨ No Documentation Updates Needed

All documentation appears to be up to date with the code changes.


🤖 Generated by Claude Documentation Validator | Mode: suggest

@github-actions github-actions Bot changed the title chore(deps): maintain Claude Code Action workflows (v1.0.183) chore(deps): bump claude-code-action to v1.0.183 and opus model IDs Aug 3, 2026
Comment thread .github/workflows/_claude-code-review.yml Outdated
Comment thread .github/workflows/_claude-code-review.yml Outdated
Comment thread .github/workflows/_claude-docs-check.yml Outdated
Comment thread .github/workflows/_generate-pr-metadata.yml Outdated
Comment thread .github/workflows/_claude-task-worker.yml
Comment thread .github/workflows/_claude-task-worker.yml
required: false
type: string
default: "claude-opus-4-8"
default: "claude-opus-5"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 info · correctnessgenerate-pr-title-description.yml:51 passes no model under the comment # Use default model (claude-sonnet-5), so it silently inherits this default and now runs title/description generation on Opus 5. The comment was already wrong before this bump; either fix the comment or pass an explicit model.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

⚠️ Changes requested — see full review in the sticky comment ↑

Comment thread .github/workflows/_claude-main.yml Outdated
…ter arg parser

v1.0.183 escapes () before shell-quote tokenization, so unquoted grants
containing a space (e.g. Bash(npm run:*)) now fragment into rules that
match nothing instead of being read as one token. Quote each affected
--allowedTools/--allowedTools expansion, matching the existing
--system-prompt "$VAR" convention already used in _claude-main.yml.

Addresses review feedback on PR #559.
@wkoutre

wkoutre commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@request-claude-review

Fixed. v1.0.183 now escapes () before shell-quote tokenization, so any unquoted --allowedTools/--allowedTools expansion containing a space inside parens (e.g. Bash(npm run:*)) fragments into rules that match nothing. Quoted the four flagged sites plus the docs-check suggestion, matching the existing --system-prompt "$INPUT_CUSTOM_INSTRUCTIONS" convention already used in _claude-main.yml:

  • _claude-code-review.yml:1190 (review-agent $ALLOWED_TOOLS expansion)
  • _claude-code-review.yml:1730 (auto-fix claude_args)
  • _generate-pr-metadata.yml:905 ($ALLOWED_TOOLS expansion)
  • _claude-main.yml:412 (caller-supplied allowed_tools input)
  • _claude-docs-check.yml:686 (read-only git grant, per the suggestion)

Left the generate-pr-title-description.yml:52 stale-comment suggestion alone since that file lives in Uniswap/uniswap-ai, not this repo.

# - npm run / npx nx / bun run: linters, formatters, type checkers
# Bash(node:*) is intentionally excluded — it permits arbitrary JS execution.
claude_args: "--model ${{ inputs.auto_fix_model || inputs.model }} --allowedTools Read,Edit,Write,Grep,Glob,Bash(git:*),Bash(npm run:*),Bash(npx nx:*),Bash(bun run:*),WebSearch,WebFetch"
claude_args: "--model ${{ inputs.auto_fix_model || inputs.model }} --allowedTools \"Read,Edit,Write,Grep,Glob,Bash(git:*),Bash(npm run:*),Bash(npx nx:*),Bash(bun run:*),WebSearch,WebFetch\""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semgrep identified an issue in your code:
Reusable workflow (on: workflow_call) uses bun run. Bun auto-loads bunfig.toml from CWD, and its preload array executes arbitrary code before the intended script. If the workflow checks out fork PR code, this enables RCE with access to the caller's secrets. Fix: set BUN_CONFIG_FILE=/dev/null in the job env.

To resolve this comment:

✨ Commit fix suggestion

Suggested change
claude_args: "--model ${{ inputs.auto_fix_model || inputs.model }} --allowedTools \"Read,Edit,Write,Grep,Glob,Bash(git:*),Bash(npm run:*),Bash(npx nx:*),Bash(bun run:*),WebSearch,WebFetch\""
claude_args: "--model ${{ inputs.auto_fix_model || inputs.model }} --allowedTools Read,Edit,Write,Grep,Glob,Bash(git:*),Bash(npm run:*),Bash(npx nx:*),WebSearch,WebFetch"
View step-by-step instructions
  1. Add BUN_CONFIG_FILE: /dev/null to the reusable workflow job env that contains the Claude step and any other bun run usage.
    This disables Bun's automatic loading of bunfig.toml from the checked-out working directory, so preload code in fork-controlled files does not execute.

  2. Place the setting at the job level so every step in that job inherits it, for example by updating the job to include env: { BUN_CONFIG_FILE: /dev/null } or:
    env:
    BUN_CONFIG_FILE: /dev/null

  3. Keep the existing claude_args only if the workflow still needs Bun-based commands.
    Alternatively, if no Bun command is actually required in this reusable workflow, remove Bash(bun run:*) from --allowedTools to reduce exposure further.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by bun-run-in-reusable-workflow.

You can view more details about this finding in the Semgrep AppSec Platform.

@github-actions github-actions Bot changed the title chore(deps): bump claude-code-action to v1.0.183 and opus model IDs chore(deps): bump claude-code-action to v1.0.183, quote --allowedTools Aug 3, 2026
# Add allowed tools (camelCase format)
if [[ -n "$INPUT_ALLOWED_TOOLS" ]]; then
ARGS="$ARGS--allowedTools $INPUT_ALLOWED_TOOLS"$'\n'
ARGS="$ARGS--allowedTools \"$INPUT_ALLOWED_TOOLS\""$'\n'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ warning · dependency-upgrade — the quoting fix stopped one line short: --disallowedTools $INPUT_DISALLOWED_TOOLS at line 417 is still unquoted, and disallowedTools is in the same ACCUMULATING_FLAGS set. A caller's Bash(git push:*) deny rule fragments into Bash(git / push:*) — matching no rule — so the tool they forbade becomes available with no error in the log. v1.0.133 over-denied here; v1.0.183 fails open. Apply the same quoting as this line: ARGS="$ARGS--disallowedTools \"$INPUT_DISALLOWED_TOOLS\""$'\n'.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Reviewing now · view run ↗

This comment will update when the review completes. Findings will appear in the sticky summary above.

@wkoutre

wkoutre commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed pin to v1.0.185 (9db594c), ai-toolkit c4820d6, models {"opus": "claude-opus-5", "sonnet": "claude-sonnet-5", "haiku": "claude-haiku-4-5-20251001"} on 2026-08-05.

@github-actions github-actions Bot changed the title chore(deps): bump claude-code-action to v1.0.183, quote --allowedTools chore(deps): bump claude-code-action to v1.0.185, quote --allowedTools Aug 5, 2026
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