ci(qodo): adopt reusable OSS pr-agent review lane - #28
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 50 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 QodoAdopt wave-foundation reusable pr-agent (OSS Qodo Merge) review lane
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
|
||
| jobs: | ||
| pr_agent: | ||
| uses: wave-av/wave-foundation/.github/workflows/reusable-pr-agent.yml@main |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: HIGH
The workflow invokes a reusable workflow using a mutable ref (@main) while also granting write-scoped token permissions and passing OPENAI_KEY. This crosses a trust boundary without integrity pinning: any compromised or unintended upstream main change would execute here automatically under this repository’s credentials.
Impact: Upstream compromise or malicious change can lead to unauthorized PR/issue mutations and secret misuse from this repository’s CI context.
Reviewed by Cursor Security Reviewer for commit 15a0a72. Configure here.
Code Review by Qodo
1. Untrusted comment-triggered secret run
|
| on: | ||
| pull_request: | ||
| types: [opened, reopened, ready_for_review, synchronize] | ||
| issue_comment: | ||
| types: [created] |
There was a problem hiding this comment.
1. Untrusted comment-triggered secret run 🐞 Bug ⛨ Security
The workflow runs on issue_comment and forwards OPENAI_KEY with write-capable permissions, but has no guard restricting execution to PR comments and trusted actor associations. This creates a risky privilege boundary where untrusted commenters can invoke a privileged reusable workflow run with a sensitive secret available in its environment.
Agent Prompt
### Issue description
`.github/workflows/pr-agent.yml` triggers on `issue_comment` and passes `OPENAI_KEY` while granting write permissions. Without an explicit guard, any issue comment (including on non-PR issues) and potentially untrusted PR comment activity can invoke the privileged workflow run.
### Issue Context
This workflow is intended to act on PRs, but `issue_comment` is emitted for both Issues and PRs. The job should only run when the comment is on a PR **and** the commenter is trusted (e.g., MEMBER/OWNER/COLLABORATOR), or behind an explicit maintainer-only command pattern.
### Fix Focus Areas
- .github/workflows/pr-agent.yml[5-24]
### Suggested change
Add a job-level `if:` that:
1) ensures `issue_comment` is only accepted when `github.event.issue.pull_request` is present, and
2) restricts the actor association to trusted roles.
Example (adjust policy as desired):
```yaml
jobs:
pr_agent:
if: >-
github.event_name == 'pull_request' ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(fromJson('["MEMBER","OWNER","COLLABORATOR"]'), github.event.comment.author_association))
uses: ...
```
Optionally also restrict by comment content (e.g., only run when comment starts with `/pr-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.
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: Private reusable workflow cannot run
- Replaced the private wave-foundation reusable workflow call with an inlined qodo-ai/pr-agent job so the public repo can run review/improve.
Or push these changes by commenting:
@cursor push 460f413399
Preview (460f413399)
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,9 @@
-# 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 lane (cannot consume private wave-foundation reusable).
+# Engine: OSS Qodo Merge on our OPENAI_KEY (trial-independent).
+#
+# WHY INLINED: sdk-python 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 (same constraint documented in foundation-gate.yml).
name: pr-agent (OSS)
on:
pull_request:
@@ -19,6 +22,15 @@
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
+ 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"
+ pr_code_suggestions.commitable_code_suggestions: "true"You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 15a0a72. Configure here.
|
|
||
| jobs: | ||
| pr_agent: | ||
| uses: wave-av/wave-foundation/.github/workflows/reusable-pr-agent.yml@main |
There was a problem hiding this comment.
Private reusable workflow cannot run
High Severity
The pr_agent job calls reusable-pr-agent.yml in private wave-av/wave-foundation. This repository is public, and GitHub Actions cannot resolve a private reusable workflow from a public caller, so the job never starts and review plus improve comments will not run.
Reviewed by Cursor Bugbot for commit 15a0a72. Configure here.
ApprovabilityVerdict: Needs human review Unresolved review comments raise legitimate security concerns about the issue_comment trigger lacking guards to restrict execution to trusted actors, potentially allowing untrusted commenters to invoke a privileged workflow with access to OPENAI_KEY. 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 standard PR-bot permissions; no application or runtime code changes.
Overview
Adds a new GitHub Actions workflow that wires sdk-python into the fleet OSS Qodo Merge lane via the pinned wave-foundation reusable workflow (
reusable-pr-agent.ymlat SHA150ffae…).The caller runs on PR lifecycle events (
opened,reopened,ready_for_review,synchronize) and new issue comments, grants issues / pull-requests write plus contents read, and uses per-PR concurrency with cancel-in-progress. It forwardsOPENAI_KEYfrom repo secrets into the reusable job so review/improve runs on the org’s OpenAI key rather than a Qodo trial.Reviewed by Cursor Bugbot for commit 40229a8. Bugbot is set up for automated code reviews on this repo. Configure here.