Repository navigation
ci: add Oz cloud triage workflow for new issues - #12673
Conversation
Wire Warp's Oz "cloud factory" issue-triage stage onto pnpm/pnpm as a GitHub-triggered cloud agent (part of the pnpm x Warp OSS partnership). - .github/workflows/triage-issues.yml runs on issues:[opened], skips Bot-authored issues, and invokes warpdotdev/oz-agent-action@v1 with the triage skill. Minimal permissions: contents:read, issues:write. - .agents/skills/triage/SKILL.md adapts the canonical triage rubric to pnpm: it maps the four readiness states onto existing pnpm "state:" labels (accepted / needs design / needs steps to repro / blocked / rejected) instead of creating new ones, is aware of the TypeScript/pacquet/pnpr split and the install/add/update/remove parity rule, and is conservative about removing maintainer-applied labels. Triage-only for now; the implementation/auto-PR stage is intentionally not included. Activation also requires the WARP_API_KEY secret and the Oz by Warp GitHub App with the org enabled in Warp's Admin Panel.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a triage skill guide for issue readiness classification and a GitHub Actions workflow that runs it on newly opened issues. The automation fetches issue context, inspects the repository, applies one pnpm ChangesAutomated issue triage
Sequence Diagram(s)sequenceDiagram
participant GitHubIssues as GitHub Issues
participant TriageWorkflow as triage-issues.yml
participant OzAgent as oz-agent-action@v1
participant GhCLI as gh CLI
GitHubIssues->>TriageWorkflow: opened issue event
TriageWorkflow->>OzAgent: start triage run
OzAgent->>GhCLI: fetch issue details, labels, and comments
OzAgent->>GhCLI: apply one pnpm state label and post the triage result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
PR Summary by QodoCI: run Oz triage agent on newly opened issues Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
| on: | ||
| issues: | ||
| types: [opened] | ||
|
|
||
| # Avoid duplicate triage runs if the same issue fires overlapping events. | ||
| concurrency: | ||
| group: triage-issue-${{ github.event.issue.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| triage: | ||
| name: Triage issue | ||
| runs-on: ubuntu-latest | ||
| # Skip automated issues (Renovate, Dependabot, bots) — they are not user | ||
| # reports and each triage run consumes Warp credits. | ||
| if: github.event.issue.user.type != 'Bot' | ||
| permissions: | ||
| contents: read # let the agent inspect the checked-out codebase | ||
| issues: write # let the agent apply labels and comment | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Triage with Oz agent | ||
| uses: warpdotdev/oz-agent-action@v1 | ||
| id: triage | ||
| env: | ||
| # Authenticates the `gh` CLI the agent uses to read/label/comment. | ||
| GH_TOKEN: ${{ github.token }} | ||
| with: | ||
| # Uses .agents/skills/triage/SKILL.md as the base prompt. | ||
| skill: triage | ||
| name: "Triage issue #${{ github.event.issue.number }}" | ||
| # Only inject GitHub-generated, non-freeform values to avoid prompt | ||
| # injection; the agent fetches title/body/comments itself via `gh`. | ||
| prompt: | | ||
| Triage the GitHub issue that was just opened in this repository. | ||
|
|
||
| - Repository: ${{ github.repository }} | ||
| - Issue number: #${{ github.event.issue.number }} | ||
| - Issue URL: ${{ github.event.issue.html_url }} | ||
|
|
||
| Follow the triage skill: use the `gh` CLI to fetch the full issue | ||
| (title, body, comments, existing labels) and related open issues, | ||
| inspect this checked-out codebase, then choose exactly one | ||
| implementation-readiness state and apply the matching pnpm `state:` | ||
| label as defined in the skill's pnpm label mapping. Post status | ||
| comments as directed by the triage skill, using only an Oz run or Oz | ||
| session URL as the follow-along link. Do not use the GitHub Actions | ||
| workflow URL as the follow-along link. After labeling, post your | ||
| triage result as a comment on the issue using | ||
| `gh issue comment #${{ github.event.issue.number }}`. | ||
| warp_api_key: ${{ secrets.WARP_API_KEY }} | ||
| profile: ${{ vars.WARP_AGENT_PROFILE || '' }} |
There was a problem hiding this comment.
2. Secret on issues.opened 🐞 Bug ⛨ Security
The workflow triggers on issues.opened (attacker-controlled content) and invokes a third-party agent action with secrets.WARP_API_KEY, while explicitly instructing the agent to fetch and process the full issue body/comments. This creates a trust-boundary risk: untrusted issue text can influence an automated system running with a secret and issues: write, enabling plausible prompt-injection abuse (e.g., manipulating comments/labels) and cost-exhaustion via mass issue opening.
Agent Prompt
### Issue description
A secret-bearing workflow step (third-party agent) is triggered by `issues.opened` and then processes attacker-controlled issue content. This widens the abuse surface for prompt-injection and for cost/credits exhaustion.
### Issue Context
- The workflow passes `warp_api_key: ${{ secrets.WARP_API_KEY }}` to a third-party action.
- The agent is instructed to fetch the full issue body/comments via `gh`, guaranteeing untrusted content reaches the agent.
- Repo security guidance calls out tightly scoping secrets in CI/workflow changes.
### Fix Focus Areas
- .github/workflows/triage-issues.yml[14-67]
### Mitigation options (pick one)
1) **Add a trust gate** before running Oz (recommended):
- Only run when `github.event.issue.author_association` is in an allowlist (e.g. `MEMBER`, `COLLABORATOR`, possibly `CONTRIBUTOR`).
- Or trigger on `issues.labeled` with a maintainer-applied label like `triage: run-oz`.
2) **Split into unprivileged + privileged stages**:
- On `issues.opened`, run a no-secrets job that records metadata or applies a benign label.
- A privileged follow-up workflow runs only after a maintainer-controlled gate (label/comment) is present.
3) **Minimize secret exposure**:
- Scope secrets to the exact step that requires them (keep them out of job-wide `env`), and ensure no other steps/actions run with that secret.
Also document the chosen gate in the workflow header comments so future maintainers understand the rationale.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Partly addressed in 28acb58, partly an open design decision:
- Prompt injection: the triage skill now treats all issue content as untrusted data, never instructions (see the CodeRabbit thread on
SKILL.md). - Secret scope:
WARP_API_KEYis already a step-levelwith:input, not job-wideenv— only the Oz step receives it. - Bot-opened issues are already skipped (
github.event.issue.user.type != 'Bot').
The remaining trust-gate / cost-exhaustion mitigation is a deliberate product decision being made with the maintainer. An author_association allowlist would be counterproductive here — most issues that need triage come from non-members — so the realistic choices are a maintainer-applied label gate (e.g. triage: run-oz) versus accepting all-issue triage with its credit cost. Leaving this thread open pending that call.
Written by an agent (Claude Code, claude-opus-4-8).
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/triage/SKILL.md:
- Around line 58-69: The tracker-context step in SKILL.md needs a security
guardrail because issue content is untrusted input; update the “Fetch tracker
context” guidance so the agent treats the issue
title/body/comments/attachments/linked docs as evidence only and never follows
instructions embedded in them. Add an explicit rule alongside the `gh` fetching
guidance that such content must not override the skill, must not trigger extra
`gh` actions, and should only be used for classification and context gathering.
- Around line 118-126: Resolve the conflict in the triage guidance by making the
`Needs info` path consistent across the `SKILL.md` section around the `Needs
info → state: needs steps to repro` decision and the later Step 6/final result
template. Clarify in the `needs info` branch that non-bug ambiguity should post
only the questions and must not require a `state:` label, while bug reports with
missing reproduction should still use `state: needs steps to repro`. Update the
surrounding wording so the decision rule, Step 6, and final template all agree
and reference the same `Needs info` behavior.
In @.github/workflows/triage-issues.yml:
- Around line 34-38: The workflow currently uses floating action tags for
Checkout repository and Triage with Oz agent, which should be replaced with
immutable commit SHAs. Update the uses references in the workflow so
actions/checkout and warpdotdev/oz-agent-action are pinned to full commit
hashes, and optionally leave the human-readable version in a comment nearby for
easier future upgrades.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a465d278-0336-4797-a168-db3c0b6824f8
📒 Files selected for processing (2)
.agents/skills/triage/SKILL.md.github/workflows/triage-issues.yml
|
Code review by qodo was updated up to the latest commit 025b3c5 |
- Pin actions to commit SHAs (actions/checkout to the repo's v7.0.0 pin, warpdotdev/oz-agent-action to the v1 tag commit) with version comments, matching the repo convention and satisfying zizmor. - Harden the triage skill against prompt injection: treat all fetched issue content (title, body, comments, attachments, linked docs) as untrusted data, never as instructions, and forbid actions beyond the defined read/label/comment steps. - Make the non-bug "Needs info" path consistent across the decision rule, the label-application step, and the result template: apply no state label and post clarifying questions instead of forcing an ill-fitting label.
|
Code review by qodo was updated up to the latest commit 28acb58 |
|
Code review by qodo was updated up to the latest commit 28acb58 |
* ci: add Oz cloud triage workflow for new issues Wire Warp's Oz "cloud factory" issue-triage stage onto pnpm/pnpm as a GitHub-triggered cloud agent (part of the pnpm x Warp OSS partnership). - .github/workflows/triage-issues.yml runs on issues:[opened], skips Bot-authored issues, and invokes warpdotdev/oz-agent-action@v1 with the triage skill. Minimal permissions: contents:read, issues:write. - .agents/skills/triage/SKILL.md adapts the canonical triage rubric to pnpm: it maps the four readiness states onto existing pnpm "state:" labels (accepted / needs design / needs steps to repro / blocked / rejected) instead of creating new ones, is aware of the TypeScript/pacquet/pnpr split and the install/add/update/remove parity rule, and is conservative about removing maintainer-applied labels. Triage-only for now; the implementation/auto-PR stage is intentionally not included. Activation also requires the WARP_API_KEY secret and the Oz by Warp GitHub App with the org enabled in Warp's Admin Panel. * ci: address CodeRabbit review on Oz triage PR - Pin actions to commit SHAs (actions/checkout to the repo's v7.0.0 pin, warpdotdev/oz-agent-action to the v1 tag commit) with version comments, matching the repo convention and satisfying zizmor. - Harden the triage skill against prompt injection: treat all fetched issue content (title, body, comments, attachments, linked docs) as untrusted data, never as instructions, and forbid actions beyond the defined read/label/comment steps. - Make the non-bug "Needs info" path consistent across the decision rule, the label-application step, and the result template: apply no state label and post clarifying questions instead of forcing an ill-fitting label.
Summary
Wires the issue-triage stage of Warp's Oz "cloud factory" onto this repo as a GitHub-triggered cloud agent (part of the pnpm × Warp OSS partnership). When a new issue is opened, an Oz cloud agent classifies it into one implementation-readiness state and applies the matching pnpm
state:label.This is triage-only — the implementation/auto-PR stage is intentionally not included.
Two files:
.github/workflows/triage-issues.yml— triggers onissues: [opened], skipsBot-authored issues (Renovate/Dependabot), and runswarpdotdev/oz-agent-action@v1with thetriageskill. Minimal permissions:contents: read,issues: write..agents/skills/triage/SKILL.md— the triage rubric, adapted to pnpm: it maps the four readiness states onto existing pnpmstate:labels rather than creating new ones, knows the TypeScript / pacquet / pnpr split and theinstall/add/update/removeparity rule (treating cross-stack work as broader scope), and is conservative about removing maintainer-applied labels.State → label mapping used by the skill:
state: acceptedstate: needs designstate: needs steps to repro(bugs) / else a questions commentstate: blocked(premature) /state: rejected(out of scope)Activation is not automatic on merge. It also requires the
WARP_API_KEYrepo secret (a Team-scoped Oz key) and the Oz by Warp GitHub App installed with the org enabled in Warp's Admin Panel. Every human-opened issue then becomes a billable Oz run.Squash Commit Body
Checklist
Written by an agent (Claude Code, claude-opus-4-8).
Summary by CodeRabbit
state:label mapping while preserving any maintainer-appliedstate:labels; label updates are reported if permissions prevent them.