ci(qodo): adopt reusable OSS pr-agent review lane - #33
Conversation
|
Running ultrareview automatically — New CI workflow grants write permissions, passes a production secret to a reusable workflow, and auto-engages on PRs — a subtle misconfig could leak the key or modify PRs, so we're running an ultrareview.. I'll post findings when complete. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 17 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
PR Summary by QodoCI: add OSS pr-agent workflow using wave-foundation reusable lane
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
I can't run this ultrareview because your workspace has reached its monthly review limit. cubic has reviewed 100,145 of the 100,000 allowed lines of code this month. Reviews resume on 4 September 2026 (in 22 days). Enable flex capacity to cover overages automatically and resume reviews now. Learn how flex capacity works. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
Code Review by Qodo
1. Unpinned workflow reference
|
| pr_agent: | ||
| uses: wave-av/wave-foundation/.github/workflows/reusable-pr-agent.yml@main | ||
| secrets: |
There was a problem hiding this comment.
1. Unpinned workflow reference 🐞 Bug ⛨ Security
The workflow calls the reusable workflow with the floating ref "@main", so future upstream changes can silently alter what executes here (including under this repo’s permissions/secrets). This undermines reviewability and increases supply-chain risk versus the SHA-pinned pattern used elsewhere in this repo.
Agent Prompt
### Issue description
The caller workflow references `wave-av/wave-foundation/.github/workflows/reusable-pr-agent.yml@main`, which is a mutable ref. This allows the executed workflow to change without a reviewed change in this repo.
### Issue Context
Other workflows in this repo pin reusable workflows/actions to specific commit SHAs for determinism and supply-chain hardening.
### Fix Focus Areas
- .github/workflows/pr-agent.yml[20-24]
- .github/workflows/issue-ops-triage.yml[15-22]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| pull_request: | ||
| types: [opened, reopened, ready_for_review, synchronize] | ||
| issue_comment: | ||
| types: [created] |
There was a problem hiding this comment.
2. Secret-bearing comment trigger 🐞 Bug ⛨ Security
The workflow is triggered by issue_comment (created) without any caller-side guard ensuring the comment is on a PR or that the actor is trusted, yet it forwards OPENAI_KEY into the called workflow. This allows any commenter to invoke a secret-enabled run (including on non-PR issues), increasing the chance of misuse if the callee processes attacker-controlled content.
Agent Prompt
### Issue description
`issue_comment` triggers run in the base repository context and this caller forwards `OPENAI_KEY` to the reusable workflow. Without a caller-side `if:` guard, any user can trigger the workflow by commenting, including on regular issues (not just PRs).
### Issue Context
Even if the reusable workflow includes its own checks, this caller currently provides no protection or scoping. The safest pattern is to restrict the event scope and actor trust at the caller boundary.
### Fix Focus Areas
- .github/workflows/pr-agent.yml[5-9]
- .github/workflows/pr-agent.yml[20-24]
### Suggested direction
- Add a job-level `if:` that requires PR context for `issue_comment` (e.g., `github.event.issue.pull_request != null`).
- Add a trust-tier check (e.g., `github.event.comment.author_association` in `OWNER|MEMBER|COLLABORATOR`).
- Consider not passing `OPENAI_KEY` for untrusted events, or splitting into separate jobs/workflows for trusted vs untrusted triggers.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| contents: read | ||
|
|
There was a problem hiding this comment.
3. Insufficient contents permission 🐞 Bug ≡ Correctness
The workflow grants contents: read, which prevents using the default GITHUB_TOKEN to push commits to branches; if the reusable pr-agent lane is expected to create committable fixes, it will be blocked or forced into a degraded mode. This should be aligned with the intended behavior and the trust model of the triggers.
Agent Prompt
### Issue description
The caller sets `permissions: contents: read`. If the reusable workflow tries to push commits ("committable suggestions"), those operations will fail when using `GITHUB_TOKEN`.
### Issue Context
Raising `contents` to `write` is only safe if the workflow is properly gated (especially for `issue_comment`). Alternatively, keep `contents: read` and ensure the lane only comments/reviews without pushing.
### Fix Focus Areas
- .github/workflows/pr-agent.yml[11-15]
- .github/workflows/pr-agent.yml[5-9]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Qodo Fixer✅ Merged (0) · ☑ Fixed (0) Process
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit f08ec1c. Configure here.
|
|
||
| concurrency: | ||
| group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number || github.ref }} | ||
| cancel-in-progress: true |
There was a problem hiding this comment.
Comments cancel in-progress reviews
High Severity
The concurrency group is shared across pull_request and issue_comment with cancel-in-progress enabled, so any new comment cancels an in-flight auto review. A non-command comment then no-ops, and the review never completes.
Reviewed by Cursor Bugbot for commit f08ec1c. Configure here.
| pull_request: | ||
| types: [opened, reopened, ready_for_review, synchronize] | ||
| issue_comment: | ||
| types: [created] |
There was a problem hiding this comment.
Untrusted comments invoke paid agent
Medium Severity
issue_comment starts this lane with OPENAI_KEY and write permissions for every comment on this public repository, including outsiders and non-PR issues. Untrusted users can invoke the agent and consume the org key.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f08ec1c. Configure here.




Fleet rollout of the OSS Qodo Merge lane (wave-foundation reusable workflow, OPENAI_KEY secret, auto review+improve with committable suggestions). Reference impl + rationale: wave-gateway#923 + qodo-trial memo. Auto-approve labeled, auto-merge armed.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
CI-only addition following the same reusable-workflow pattern as other fleet workflows; no application code or runtime behavior changes in this repo.
Overview
Adds a caller workflow at
.github/workflows/pr-agent.ymlso this repo runs the fleet-standard OSS Qodo Merge lane fromwave-av/wave-foundation(reusable-pr-agent.yml@main), wired with the repoOPENAI_KEYsecret.Triggers on PR lifecycle events (
opened,reopened,ready_for_review,synchronize) and new issue comments, with concurrency keyed to the PR/issue so in-flight runs cancel on updates. Grantsissues: write,pull-requests: write, andcontents: readfor automated review/improve behavior defined in the reusable workflow.Reviewed by Cursor Bugbot for commit f08ec1c. Bugbot is set up for automated code reviews on this repo. Configure here.