-
Notifications
You must be signed in to change notification settings - Fork 0
feat: initial WAVE agent plugin (review + vuln-scan skills) #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # wave-cursor-plugin | ||
|
|
||
| WAVE agent plugin for Cursor (Agent Plugins open standard): review-plane and | ||
| vuln-scan skills. Secret-free by design — callers supply their own | ||
| `REVIEW_PLANE_KEY`. | ||
|
|
||
| ## Contents | ||
|
|
||
| - `plugin.json` — Agent Plugins manifest | ||
| - `skills/wave-review/` — multi-reviewer verdicts via the WAVE review plane | ||
| (MCP `review`/`summarize_review` or REST `POST /v1/review`) | ||
| - `skills/wave-vuln-scan/` — the armed scan pattern (Semgrep sweep + validated | ||
| tracing + persistent finding memory) | ||
|
|
||
| ## Test locally | ||
|
|
||
| Copy this repo to `~/.cursor/plugins/local/wave-cursor-plugin` and reload the | ||
| window (or Developer: Reload Window). Confirm the skills appear under Customize. | ||
|
|
||
| ## Publish | ||
|
|
||
| Marketplace submission is manual review at cursor.com/marketplace/publish. | ||
| Requires the repo public + a human submitter. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", | ||
| "name": "wave-cursor-plugin", | ||
| "description": "WAVE review plane for Cursor: multi-reviewer code verdicts and the armed vuln-scan pattern", | ||
| "version": "0.1.0", | ||
| "author": { "name": "WAVE Online, LLC", "url": "https://wave.online" }, | ||
| "homepage": "https://github.com/wave-av/wave-cursor-plugin", | ||
| "repository": "https://github.com/wave-av/wave-cursor-plugin", | ||
| "license": "Apache-2.0" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| name: wave-review | ||
| description: "Get a multi-reviewer verdict on a repo or PR from WAVE's review plane (correctness, security, cross-file, design). Use for second-opinion reviews, pre-merge gates, or auditing agent-generated code." | ||
| --- | ||
|
|
||
| # WAVE Review | ||
|
|
||
| Call WAVE's review plane for a synthesized multi-reviewer verdict. No secrets in this plugin — the caller supplies their own `REVIEW_PLANE_KEY` (a tenant key from the plane's onboarding). | ||
|
|
||
| ## Via MCP (preferred) | ||
|
|
||
| If the `wave-review` MCP server is configured (URL `https://review.wave.online/mcp`, | ||
| header `Authorization: Bearer <REVIEW_PLANE_KEY>`), call: | ||
|
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Require the configured MCP endpoint to match Prompt for AI agents |
||
|
|
||
| - `review` with `{ "repo": "owner/name" }` → verdict list (reviewer, verdict, evidence, price_cents) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Specific pull requests cannot be selected For a specific PR, Learn moreBoth documented transports send only an Example: A user requests review of PR #12 while PR #13 is also open in Recommended fix: Add the review service's supported PR selector to both the MCP and REST examples. If the service currently accepts only Was this helpful? React with 👍 or 👎 to provide feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift Document the PR-selection limitation for repo-only requests.
🤖 Prompt for AI Agents |
||
| - `summarize_review` with the verdict list → one-paragraph synthesis | ||
|
|
||
| ## Via REST (fallback) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: When used as a pre-merge gate, this playbook never defines behavior if the review plane is unreachable, authentication fails, or the calls return an empty/error result — so the agent can silently proceed without a verdict (fail-open) on a security gate. Add an explicit branch: if MCP and REST both fail or return an error/empty verdict list, abort and surface the failure rather than continuing as if the repo passed. Prompt for AI agents |
||
|
|
||
| `POST https://review.wave.online/v1/review` with header | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The REST fallback cannot complete the flow the skill documents. The MCP path does Prompt for AI agents |
||
| `Authorization: Bearer <REVIEW_PLANE_KEY>` and JSON body `{ "repo": "owner/name" }`. | ||
|
|
||
| ## Reading the verdict | ||
|
|
||
| - Weight overlapping findings across reviewers more heavily. | ||
| - A finding with file:line evidence outranks a general observation. | ||
| - Cost note: each verdict returns `price_cents` (metered per reviewer that ran). | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,35 @@ | ||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||
| name: wave-vuln-scan | ||||||||||||||||||||||||||||||
| description: "Run the armed vulnerability-scan pattern: Semgrep MCP sweep plus validated manual tracing with persistent finding memory. Use for scheduled security reviews or pre-release audits." | ||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # WAVE Vuln Scan | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| The scan pattern WAVE runs daily on its own money paths. Two passes, then memory. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## Pass 1 — Semgrep MCP sweep | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| If a Semgrep MCP server is available (`security_check`, `semgrep_scan`), sweep | ||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Pass 1 only runs "If a Semgrep MCP server is available," and the doc never says what to do when it isn't. Since Pass 2 requires candidates ("For every candidate"), an unavailable MCP server silently yields an empty review even though the description promises "scheduled security reviews or pre-release audits." A scheduled audit that fails to run a sweep must fail loud: require the agent to state the sweep was skipped and not present an uncrawled repo as clean. Prompt for AI agents
Suggested change
|
||||||||||||||||||||||||||||||
| the target repo first. Treat hits as CANDIDATES, not findings. | ||||||||||||||||||||||||||||||
|
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Missing Semgrep skips the scan Without Semgrep MCP, Learn moreThe Semgrep sweep is explicitly optional, but validated tracing is defined only for candidates from that sweep. No instruction creates candidates when the MCP server is absent. An agent following the workflow can therefore skip both analysis passes while presenting the task as completed. Example: Cursor has no Semgrep MCP configured. Pass 1 is skipped, the candidate set stays empty, and “for every candidate” executes zero times instead of manually auditing the repository. Recommended fix: Define a manual candidate-discovery fallback when Semgrep is unavailable or fails. Then apply the same exploitability tracing and reporting requirements to candidates from either source. Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## Pass 2 — validated tracing | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| For every candidate, verify exploitability with concrete code tracing. Every | ||||||||||||||||||||||||||||||
|
Comment on lines
+12
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: If no Semgrep MCP server is available, the workflow produces no candidates and performs no manual scan, falsely indicating complete vulnerability coverage. [incomplete implementation] Assessment: 🟠 Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** skills/wave-vuln-scan/SKILL.md
**Line:** 12:17
**Comment:**
*Incomplete Implementation: If no Semgrep MCP server is available, the workflow produces no candidates and performs no manual scan, falsely indicating complete vulnerability coverage.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix |
||||||||||||||||||||||||||||||
| reported issue must include: | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - who the attacker is | ||||||||||||||||||||||||||||||
| - what input they control | ||||||||||||||||||||||||||||||
| - how they reach the vulnerable code | ||||||||||||||||||||||||||||||
| - what impact they gain | ||||||||||||||||||||||||||||||
| - one primary file path (line details go in evidence, not the location) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Do not report speculative concerns, isolated unsafe-looking APIs without a real | ||||||||||||||||||||||||||||||
| attack path, or low-signal best-practice notes. Do not open a PR from this | ||||||||||||||||||||||||||||||
| workflow unless explicitly asked. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## Finding memory (dedup across runs) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Keep `{repo}---flagged-vulnerabilities.json` (100 findings max per file, | ||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Prompt for AI agents |
||||||||||||||||||||||||||||||
| `-1`, `-2` overflow). Before scanning, read existing files and never | ||||||||||||||||||||||||||||||
| re-report a present finding. After scanning, append only genuinely new | ||||||||||||||||||||||||||||||
|
Comment on lines
+32
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The finding memory is append-only with no lifecycle: once a vulnerability is recorded it is never re-reported, even if it is later fixed and reintroduced. On the daily schedule this skill advertises, a regressed vulnerability is silently dropped from every future report. Add a status field (open/fixed) and only suppress re-reporting while an identical finding is open, so fixes and regressions are reflected in later runs. Prompt for AI agents
Suggested change
|
||||||||||||||||||||||||||||||
| validated findings. Never create staging/date-based scratch files. | ||||||||||||||||||||||||||||||
|
Comment on lines
+32
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Edge Case: Finding-memory filename derived from
|
||||||||||||||||||||||||||||||
| `-1`, `-2` overflow). Before scanning, read existing files and never | |
| re-report a present finding. After scanning, append only genuinely new | |
| validated findings. Never create staging/date-based scratch files. | |
| Keep `{repo}---flagged-vulnerabilities.json` (100 findings max per file, | |
| `-1`, `-2` overflow). Take a per-repo lock before reading; write new findings to a temp file and atomically rename it over the existing file so the store is never half-written. Before scanning, read existing files and never | |
| re-report a present finding. After scanning, append only genuinely new | |
| validated findings. Never create staging/date-based scratch files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The -1/-2 naming does not define how to discover higher overflow shards before deduplication. Enumerate and read every matching numbered memory shard before scanning.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/wave-vuln-scan/SKILL.md, line 32:
<comment>The `-1`/`-2` naming does not define how to discover higher overflow shards before deduplication. Enumerate and read every matching numbered memory shard before scanning.</comment>
<file context>
@@ -0,0 +1,35 @@
+
+## Finding memory (dedup across runs)
+
+Keep `{repo}---flagged-vulnerabilities.json` (100 findings max per file,
+`-1`, `-2` overflow). Before scanning, read existing files and never
+re-report a present finding. After scanning, append only genuinely new
</file context>
| Keep `{repo}---flagged-vulnerabilities.json` (100 findings max per file, | |
| `-1`, `-2` overflow). Before scanning, read existing files and never | |
| re-report a present finding. After scanning, append only genuinely new | |
| validated findings. Never create staging/date-based scratch files. | |
| Keep `{repo}---flagged-vulnerabilities.json` with 100 findings max per file; use numbered `-N` overflow shards. | |
| Before scanning, discover and read the base file and every matching numbered shard before deduplication, then never re-report a present finding. | |
| After scanning, append only genuinely new validated findings. Never create staging/date-based scratch files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Preferred MCP requires separate setup
The package has no
mcp.json, so installation cannot configure the documentedwave-reviewserver. Reviewers must verify that marketplace users receive separate setup guidance.Was this helpful? React with 👍 or 👎 to provide feedback.