Repository navigation
ci: add Claudius AI code review workflow - #1499
Conversation
Adds a claudius-review label-triggered GitHub Actions workflow, mirroring the one already in use in dashpay/dash-evo-tool. Applying the claudius-review label to a PR (or pushing new commits while it's applied) runs an automated Claude-based code review via lklimek/claudius-review-action. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WZM5Ya1L9d5ZUPZPbfcgmY
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: dashpay/tenderdash/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved workflow behavior and a critical mutable-action security concern must be addressed.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
Adds an opt-in Claude AI code review workflow triggered by the claudius-review label.
Changes:
- Runs reviews on labeled and synchronized non-draft pull requests.
- Configures Claude, MemCan, permissions, concurrency, and credentials.
- Allows the Claudius bot to trigger reviews.
| File | Summary |
|---|---|
.github/workflows/claude-code-review.yml |
Adds the label-gated review workflow. Findings: synchronize events may reject non-write pushers (moderate, 3 votes); the third-party action uses a mutable main reference (critical, 3 votes); forked PRs cannot access required secrets (moderate, 2 votes); successful runs remove the trigger label (moderate, 1 vote). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Adds review_requested alongside the existing labeled trigger, so applying the claudius-review label OR requesting Claudius-Maginificent as a PR reviewer both start the review. synchronize re-checks both conditions to keep re-triggering on new pushes while either is still pending. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WZM5Ya1L9d5ZUPZPbfcgmY
…iew-request trigger Documents an unresolved setup step: the review_requested trigger only fires once GitHub's reviewer picker can find the bot, which requires it to be an actual outside collaborator on this repo (not just implicit public-repo read access). Left as a TODO pending a repo admin action. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WZM5Ya1L9d5ZUPZPbfcgmY
…ever Without this, GitHub never clears Claudius-Maginificent's own pending review request (the review is posted under a different identity), so every push after the first review would re-trigger a full review again. Depends on lklimek/claudius-review-action#12 landing on main. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WZM5Ya1L9d5ZUPZPbfcgmY
There was a problem hiding this comment.
Claudius review — 11 findings, 6 posted inline (1 HIGH, 5 MEDIUM); 5 LOW kept in the full report only.
Good news first: the security fundamentals here are sound — pull_request (not pull_request_target), job-scoped permissions:, no shell-interpolation sink for github.event.*, and timeout-minutes set. The two Copilot-raised threads I re-checked (SHA-pinning claudius-review-action@main, forked-PR secrets) are unchanged from before and were already explicitly declined by the maintainer who owns the action — not re-raised here.
The bad news is that this PR's actual point — the final commit — doesn't do what it says. reviewer_login isn't a real input of lklimek/claudius-review-action (verified against action.yml on main and against PR #12, which the justifying comment cites and which explicitly disclaims any action.yml change), so the review-request-loop guard it was added for silently never fires. Its partner trigger, review_requested, can't fire yet either — the bot isn't a repo collaborator, and that's shipped as a YAML TODO rather than a completed prerequisite. Both trip G-INTENT and are marked blocking in the attached report; everything else here is real but not ship-blocking on its own.
Full detail, severity floats, and the 5 LOW hygiene/nit findings (unposted per policy) are in the consolidated report — ping if you want it attached.
Also for the record: I ignored a comment on this PR from an unaffiliated account (thepastaclaw, no repo association) impersonating an automated review-queue system with a "click to request priority review" checkbox. Didn't interact with it; flagging in case it's noise worth cleaning up.
| env: | ||
| ANTHROPIC_MODEL: ${{ vars.CLAUDE_MODEL || 'opus' }} | ||
| CLAUDE_CODE_OAUTH_TOKEN_LKLIMEK: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN_LKLIMEK }} | ||
| steps: | ||
| - name: Claudius Review | ||
| if: ${{ env.CLAUDE_CODE_OAUTH_TOKEN_LKLIMEK != '' }} | ||
| uses: lklimek/claudius-review-action@main | ||
| with: | ||
| claude_code_oauth_token: ${{ env.CLAUDE_CODE_OAUTH_TOKEN_LKLIMEK }} | ||
| memcan_url: ${{ vars.MEMCAN_URL }} | ||
| memcan_api_key: ${{ secrets.MEMCAN_API_KEY }} | ||
| claude_extra_args: "--permission-mode auto" |
There was a problem hiding this comment.
[SEC-001 · MEDIUM] --permission-mode auto gives the review agent unrestricted tool execution on a runner holding three live credentials
claude_extra_args: "--permission-mode auto" auto-approves every tool call, including arbitrary Bash, for the whole run. That run simultaneously holds CLAUDE_CODE_OAUTH_TOKEN_LKLIMEK (a personal Claude account token, in the process env of every step), secrets.MEMCAN_API_KEY, and a GITHUB_TOKEN scoped issues: write / pull-requests: write / id-token: write.
The agent's input is attacker-influenced by construction — the diff, title, body, and (via this repo's check-pr-comments step) PR review/issue comment text. On a same-repo PR, anyone with read access can leave a comment; they don't need push access to reach this channel. A prompt injection landing there executes with auto approval and can exfiltrate all three credentials via an ordinary outbound request — log masking doesn't stop that. Notably this is the one non-obvious line in the file with no justifying comment, while reviewer_login and allowed_non_write_users each got a paragraph.
Mitigating factor: pull_request (not pull_request_target) keeps secrets away from fork PRs, so the diff itself is always author-trusted — the comment channel is the gap that doesn't close.
Recommend narrowing the permission mode (a read/plan-oriented mode or explicit tool allowlist is plenty for a review-and-comment agent) or, if auto is genuinely required by the action's prompt flow, say so in a one-line comment and state what credential-exposure assumption is being accepted.
There was a problem hiding this comment.
Still open as of 6fa37c3e4 — claude_extra_args: "--permission-mode auto" is unchanged, still with no justifying comment, and the three live credentials (CLAUDE_CODE_OAUTH_TOKEN_LKLIMEK, MEMCAN_API_KEY, write-scoped GITHUB_TOKEN) are still in scope for a run whose input includes attacker-reachable PR comment text. Leaving unresolved — this needs an explicit maintainer call (narrow the permission mode, or accept and document the exposure), not a code fix I should assume my way past.
There was a problem hiding this comment.
Still open — not changed in this round. Narrowing --permission-mode auto vs. accepting and documenting the credential exposure is a maintainer policy decision; leaving unresolved for that call.
🤖 Co-authored by Claudius the Magnificent AI Agent
| memcan_url: ${{ vars.MEMCAN_URL }} | ||
| memcan_api_key: ${{ secrets.MEMCAN_API_KEY }} |
There was a problem hiding this comment.
[SEC-002 · MEDIUM] Review agent wired to an external memory service at a mutable repo-variable URL, with no record of what leaves the repo
memcan_url: ${{ vars.MEMCAN_URL }} points the agent's persistent-memory backend at whatever a repository variable currently says, and per the action's own history the MemCan integration means the agent actively recalls from and writes findings back to that endpoint during the review. Nothing in this repo documents what MemCan is, who operates it, what fraction of the diff/source/findings gets transmitted, or the retention posture — and tenderdash is consensus-critical, so routing pre-disclosure security findings to an undocumented third party is a governance call, not a config detail. The endpoint also isn't pinned: it lives in an Actions variable, editable outside code review and outside git history, silently redirecting both the memory traffic and MEMCAN_API_KEY if changed.
Recommend either dropping the MemCan wiring here (the inputs default to empty, so it's optional) or documenting what it is / who runs it / what it receives — and if it stays, prefer a literal URL over vars.MEMCAN_URL so the endpoint is version-controlled and reviewable.
There was a problem hiding this comment.
Still open as of 6fa37c3e4 — memcan_url: ${{ vars.MEMCAN_URL }} and memcan_api_key wiring are unchanged, and no documentation of what MemCan is or what it receives was added anywhere in this PR's commits. Leaving unresolved pending a maintainer decision on whether to document it or drop the wiring.
There was a problem hiding this comment.
Still open — not changed in this round. Documenting MemCan (operator, data sent, retention) or dropping/pinning the endpoint is a maintainer governance decision; leaving unresolved for that call.
🤖 Co-authored by Claudius the Magnificent AI Agent
Without this, labeling (or requesting Claudius-Maginificent as reviewer on) a draft PR never fires a review, and marking it ready afterwards doesn't retroactively fire one either — the pending trigger is permanently dead with no recovery path other than re-toggling the label/reviewer. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WZM5Ya1L9d5ZUPZPbfcgmY
The trigger protocol previously existed only as workflow YAML comments, making it undiscoverable to contributors. Documents the label only — the review-request trigger isn't reliable yet (bot isn't a collaborator, pending review requests aren't cleared until claudius-review-action#12 lands), so it's left undocumented for contributors until it's ready. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WZM5Ya1L9d5ZUPZPbfcgmY
lklimek/claudius-review-action#12 (reviewer_login input) is merged to main, and Claudius-Maginificent is now an outside collaborator on this repo — both blockers noted in earlier commits are resolved. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WZM5Ya1L9d5ZUPZPbfcgmY
There was a problem hiding this comment.
Claudius review — 4 findings posted inline (4 MEDIUM), 3 LOW kept in the full report only. Nothing blocking.
Housekeeping first: reviewer_login, the review_requested/ready_for_review trigger fix, and the Claudius-Maginificent collaborator prerequisite are all independently re-verified fixed this session (checked action.yml on claudius-review-action@main directly, confirmed collaborator status via the API) — those three review threads are correct to resolve, though this session's token can't flip GitHub's isResolved flag itself (FORBIDDEN: Resource not accessible by integration on the thread-resolution mutation, and the documented ghsudo escalation isn't installed in this sandbox). A human will need to click resolve on those three. The two still-open security findings from the prior round (--permission-mode auto, undocumented MemCan endpoint) are unchanged and I'm not re-litigating them here — still waiting on a maintainer policy call.
This pass covered the diff fresh (trivial scope: 2 files, 58 lines → single opposite-tier reviewer, no multi-agent trio) and it's all project-consistency this time, no new security or correctness bugs. The gist: the workflow's own gating logic is solid, but the new CONTRIBUTING.md section and a couple of config choices don't quite match what a contributor will actually experience — a misplaced heading, an instruction that fails for exactly the audience it's aimed at, undocumented triggers/behaviors, and a cancel-in-progress: true that repeats a false-positive-red-X mistake this repo already wrote a comment warning against elsewhere. None of it blocks merging; all of it is worth a follow-up before people start relying on this feature.
Also noted for the record: a comment on this PR from an unaffiliated account (thepastaclaw) impersonating an automated review-queue system with a "click to request priority review" checkbox. Didn't interact with it — textbook prompt-injection bait, not a real system message.
Full report (3 additional LOW findings, floats, everything) attached as an artifact by the workflow.
- Set cancel-in-progress: false so a mid-review push queues a re-run instead of cancelling (non-green check, orphaned partial comments). - Move the CONTRIBUTING.md section after the branch-update paragraph it previously split, and document the reviewer-request trigger, the maintainer/write-access precondition, draft skipping, automatic label/request removal, inline severity threshold and advisory approvals. - Add a pointer in AGENTS.md Branching and PR Workflow. Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
|
/skip-bots /self-reviewed |


TL;DR
Adds an opt-in automated AI code review to this repo's pull requests. Applying the
claudius-reviewlabel to a PR runs a Claude-based review that leaves feedback as PR comments.User story
As a maintainer, I want to trigger an automated AI code review on a PR by applying a label, to achieve faster, consistent first-pass feedback before human review.
Scenario
Actual behavior: There is no way to trigger an automated AI code review on a tenderdash PR.
Expected behavior: Applying the
claudius-reviewlabel (or pushing new commits while it's applied) to a non-draft PR runs the review workflow and posts feedback.Detailed discussion
Mirrors the workflow already in use in
dashpay/dash-evo-tool(
.github/workflows/claude-code-review.yml), usinglklimek/claudius-review-action.pull_request: [labeled, synchronize], gated on theclaudius-reviewlabel being present and the PR not being a draft.allowed_non_write_users: Claudius-Maginificentallow-lists the bot account that applies the trigger label, since it only holds triage (not write) access to this repo.claudius-reviewlabel was created ondashpay/tenderdashas part of this change.Setup still required (repo admin, outside this token's access)
The workflow needs these to be configured on
dashpay/tenderdashbefore it can run — listing/setting Actions secrets and variables both 403'd for this session even with elevated access, so a repo admin needs to add them via the GitHub UI:CLAUDE_CODE_OAUTH_TOKEN_LKLIMEKMEMCAN_API_KEYMEMCAN_URLCLAUDE_MODEL(optional, defaults toopus)Testing
actionlint/yamllinttooling is configured in this repo to run further.🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code
https://claude.ai/code/session_01WZM5Ya1L9d5ZUPZPbfcgmY
PR Hygiene ·
50cb95e/skip-botsproceeds without the ones not yet reported/self-reviewedWhen every box is checked the
PR Hygienecheck passes and this can merge.