Skip to content

ci: add Claudius AI code review workflow - #1499

Merged
lklimek merged 10 commits into
v1.8-devfrom
ci/claudius-review
Sep 22, 2026
Merged

lklimek merged 10 commits into
v1.8-devfrom
ci/claudius-review

Conversation

@lklimek

@lklimek lklimek commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR

Adds an opt-in automated AI code review to this repo's pull requests. Applying the claudius-review label 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-review label (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), using
lklimek/claudius-review-action.

  • Triggers on pull_request: [labeled, synchronize], gated on the claudius-review label being present and the PR not being a draft.
  • allowed_non_write_users: Claudius-Maginificent allow-lists the bot account that applies the trigger label, since it only holds triage (not write) access to this repo.
  • The claudius-review label was created on dashpay/tenderdash as part of this change.

Setup still required (repo admin, outside this token's access)

The workflow needs these to be configured on dashpay/tenderdash before 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:

  • Secret CLAUDE_CODE_OAUTH_TOKEN_LKLIMEK
  • Secret MEMCAN_API_KEY
  • Variable MEMCAN_URL
  • Variable CLAUDE_MODEL (optional, defaults to opus)

Testing

  • Validated the workflow YAML parses correctly.
  • No existing actionlint/yamllint tooling 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

  • Bots — thepastaclaw not yet — /skip-bots proceeds without the ones not yet reported
  • Self-review — address github-actions[bot] requested changes; github-actions left a review thread unresolved, then post /self-reviewed
  • Within your 5 open PRs
  • Build green
  • Approvals — you own every area touched; none needed

When every box is checked the PR Hygiene check passes and this can merge.

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
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: dashpay/tenderdash/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 15249e0a-e96d-4782-88ec-dff32374f6c8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

thepastaclaw commented Sep 22, 2026 •

Copy link
Copy Markdown

⚠️ DEGRADED — Queued for automated review — 16th in line, estimated start in ~15 h (commit 50cb95e)
Estimated review time once started: ~2.0 h (two-phase automated review; median of recent runs).
The primary review models are currently out of quota; this review will run on stand-in models and be marked as degraded.

  • Request priority review — click to move this review to the front of the queue.

@lklimek
lklimek requested a lite review from Copilot September 22, 2026 08:33
@lklimek
lklimek marked this pull request as ready for review September 22, 2026 08:33
@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Sep 22, 2026

Copilot AI 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.

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 High severity · 2 Medium severity

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.

lklimek and others added 2 commits September 22, 2026 08:44
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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +31 to +42
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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Comment on lines +40 to +41
memcan_url: ${{ vars.MEMCAN_URL }}
memcan_api_key: ${{ secrets.MEMCAN_API_KEY }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

@github-actions

Copy link
Copy Markdown

📊 View full HTML review report

lklimek and others added 3 commits September 22, 2026 09:42
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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread CONTRIBUTING.md Resolved
Comment thread CONTRIBUTING.md Resolved
Comment thread CONTRIBUTING.md Resolved
@github-actions

Copy link
Copy Markdown

📊 View full HTML review report

@github-actions
github-actions Bot removed the request for review from Claudius-Maginificent September 22, 2026 12:38
lklimek and others added 2 commits September 22, 2026 13:07
- 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]>
@lklimek

lklimek commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

/skip-bots /self-reviewed

@lklimek
lklimek merged commit e9a48ad into v1.8-dev Sep 22, 2026
24 of 25 checks passed
@lklimek
lklimek deleted the ci/claudius-review branch September 22, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-bots Waiting for the review bots to report on this head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants