ci(qodo): adopt reusable OSS pr-agent review lane - #24
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 49 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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Public repo cannot call private workflow
- Inlined the OSS Qodo pr-agent job so this public repo no longer calls the private wave-foundation reusable workflow (same 0-jobs failure mode as foundation-gate).
Or push these changes by commenting:
@cursor push 4216f82dd6
Preview (4216f82dd6)
diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml
--- a/.github/workflows/pr-agent.yml
+++ b/.github/workflows/pr-agent.yml
@@ -1,6 +1,10 @@
-# pr-agent (OSS) caller — adopts the wave-foundation reusable lane.
-# Engine: OSS Qodo Merge on our OPENAI_KEY (trial-independent). SSOT:
-# wave-foundation/.github/workflows/reusable-pr-agent.yml
+# pr-agent (OSS) — inlined Qodo Merge lane (OPENAI_KEY, trial-independent).
+#
+# WHY INLINED: this repo is PUBLIC; wave-av/wave-foundation is PRIVATE. GitHub Actions does
+# NOT permit a public repo to consume a private repo's reusable workflow — the call fails in
+# 0s with 0 jobs (workflow_run never starts). This mirrors the intent of
+# wave-foundation/.github/workflows/reusable-pr-agent.yml (auto review+improve with
+# committable suggestions). Keep in sync when the foundation lane changes.
name: pr-agent (OSS)
on:
pull_request:
@@ -19,6 +23,21 @@
jobs:
pr_agent:
- uses: wave-av/wave-foundation/.github/workflows/reusable-pr-agent.yml@main
- secrets:
- OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
+ if: ${{ github.event.sender.type != 'Bot' }}
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ pull-requests: write
+ contents: write
+ name: Run pr agent on every pull request, respond to user comments
+ steps:
+ - name: PR Agent action step
+ id: pragent
+ uses: qodo-ai/pr-agent@f6af7d77554ff8d26adffded077e6461329e92fa # v0.42.0
+ env:
+ OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ github_action_config.auto_review: "true"
+ github_action_config.auto_improve: "true"
+ github_action_config.handle_push_trigger: "true"
+ pr_code_suggestions.commitable_code_suggestions: "true"You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit f946618. Configure here.
|
|
||
| jobs: | ||
| pr_agent: | ||
| uses: wave-av/wave-foundation/.github/workflows/reusable-pr-agent.yml@main |
There was a problem hiding this comment.
Public repo cannot call private workflow
High Severity
This public repo calls wave-av/wave-foundation/.github/workflows/reusable-pr-agent.yml, but GitHub Actions cannot consume a private reusable workflow from a public repository. The job fails immediately with zero jobs, so the Qodo review lane never runs.
Reviewed by Cursor Bugbot for commit f946618. Configure here.
PR Summary by QodoAdopt wave-foundation reusable OSS pr-agent review workflow
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
| pr_agent: | ||
| uses: wave-av/wave-foundation/.github/workflows/reusable-pr-agent.yml@main | ||
| secrets: | ||
| OPENAI_KEY: ${{ secrets.OPENAI_KEY }} |
There was a problem hiding this comment.
🔴 New review automation workflow can never run in this public repository
The new automation is wired to a helper workflow that lives in a private repository (uses: wave-av/wave-foundation/...@main at .github/workflows/pr-agent.yml:22), which this public repository is not permitted to load, so the automation silently does nothing on every pull request.
Impact: The PR review bot never comments; runs finish instantly with no jobs and no error visible to authors.
Why the cross-repo call fails: public repo consuming a private reusable workflow
.github/workflows/foundation-gate.yml:1-10 documents this exact constraint for this repo: "this repo is PUBLIC; wave-av/wave-foundation is PRIVATE. GitHub Actions does NOT permit a public repo to consume a private repo's reusable workflow — the call fails in 0s with 0 jobs". That is why checks.yml was inlined as .github/workflows/_checks.yml. The new pr-agent.yml reintroduces the private cross-repo uses: pattern, so it will hit the same failure mode. Options: inline the lane locally (as done for the gate), or make the reusable workflow's repo public/internal.
Was this helpful? React with 👍 or 👎 to provide feedback.
| issue_comment: | ||
| types: [created] |
There was a problem hiding this comment.
🔍 issue_comment trigger fires on plain issues too, with no guard
The issue_comment: [created] trigger fires for comments on regular issues, not just pull requests. There is no if: condition (e.g. github.event.issue.pull_request) to limit the job to PR comments, so every comment on any issue in this repo starts a run of the reusable lane. Whether that is harmless depends entirely on guards inside wave-av/wave-foundation/.github/workflows/reusable-pr-agent.yml@150ffae, which is not visible in this repo — worth confirming that the reusable workflow itself short-circuits non-PR comments (and bot-authored comments), otherwise consider adding the guard here.
Was this helpful? React with 👍 or 👎 to provide feedback.
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| contents: read |
There was a problem hiding this comment.
🔍 Caller permissions rely on the reusable workflow's needs matching
Top-level permissions (issues/pull-requests write, contents read) are the effective ceiling for the called workflow; unlike .github/workflows/issue-ops-triage.yml:13-15 no job-level permissions block is declared here. This works only if the reusable lane needs no additional scopes (e.g. contents: write for suggested-commit features). Worth verifying against wave-foundation/.github/workflows/reusable-pr-agent.yml.
Was this helpful? React with 👍 or 👎 to provide feedback.
Code Review by Qodo
1. Ungated secret-backed comment runs
|
| secrets: | ||
| OPENAI_KEY: ${{ secrets.OPENAI_KEY }} |
There was a problem hiding this comment.
2. Ungated secret-backed comment runs 🐞 Bug ⛨ Security
Any issue_comment creation triggers this workflow and supplies OPENAI_KEY to the called job, with no caller-side gating on comment content or author trust. This enables unauthorized triggering of secret-backed runs (cost/abuse risk) and increases the blast radius if the called workflow mishandles untrusted inputs.
Agent Prompt
### Issue description
The workflow triggers on every `issue_comment` and passes `OPENAI_KEY` into the reusable workflow without any restrictions. This allows untrusted users (anyone who can comment) to trigger secret-backed runs.
### Issue Context
Even if the reusable workflow has internal checks, caller-side gating is a key defense-in-depth control because the secret is being provided by the caller.
### Fix Focus Areas
- .github/workflows/pr-agent.yml[8-9]
- .github/workflows/pr-agent.yml[20-24]
### Suggested change
Add a job-level `if:` (or split workflows) to restrict execution to intended, trusted invocations, e.g.:
- Only run on PR comments: `github.event.issue.pull_request != null`
- Only run on an explicit command prefix in the comment body (e.g. `/pr-agent`)
- Only allow trusted actors: `github.event.comment.author_association` in `OWNER|MEMBER|COLLABORATOR`
Optionally, avoid providing `OPENAI_KEY` on comment-triggered runs unless the above checks pass.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| issue_comment: | ||
| types: [created] |
There was a problem hiding this comment.
3. Triggers on issue comments 🐞 Bug ➹ Performance
issue_comment events fire for both PRs and regular issues, and this workflow has no filter to ensure it only runs for pull request comments. As a result, ordinary issue comments will also invoke the PR-agent lane, creating unnecessary runs and noise.
Agent Prompt
### Issue description
The workflow runs for comments on non-PR issues as well as PRs.
### Issue Context
`on: issue_comment` includes both issue and PR comments; PR comments are those where `github.event.issue.pull_request` is non-null.
### Fix Focus Areas
- .github/workflows/pr-agent.yml[8-9]
- .github/workflows/pr-agent.yml[20-24]
### Suggested change
Add a job-level condition such as:
- `if: github.event_name != 'issue_comment' || github.event.issue.pull_request != null`
Or split into separate workflows so only PR comments trigger the agent.
ⓘ 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.
Risk: medium. Left a non-blocking comment and did not approve; no reviewers were assigned. Cursor Bugbot reported an unresolved high-severity finding (this public repo cannot call the private reusable workflow), so human review is needed.
Sent by Cursor Approval Agent: Pull Request Router and Approver
ApprovabilityVerdict: Needs human review Multiple reviewers have identified that this workflow cannot run (public repo calling private reusable workflow) and raised security concerns about ungated secret access on issue_comment triggers. These substantive issues warrant human review before merging. You can customize Macroscope's approvability policy. Learn more. |





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 with no application code changes; requires OPENAI_KEY to be configured in repo secrets for the job to succeed.
Overview
Adds
.github/workflows/pr-agent.yml, a caller workflow that delegates PR review to the fleet wave-foundation reusablereusable-pr-agent.ymllane (pinned at commit150ffae24f63e207ab81430fa64cb2b1e5c01546), using OSS Qodo Merge with the repoOPENAI_KEYsecret.Triggers on PR lifecycle events (
opened,reopened,ready_for_review,synchronize) and new issue comments; grants issues and pull-requests write plus contents read, with per-PR/issue concurrency and cancel-in-progress so overlapping runs don’t stack.Reviewed by Cursor Bugbot for commit 64315de. Bugbot is set up for automated code reviews on this repo. Configure here.