fix-diff
Apply a code-level fix for a finding from /vantage:scan-diff's commit/PR/MR scan — modifies the target repository's source code
Scan only the changed files in a single commit or PR/MR for newly introduced vulnerabilities (fast incremental check, not a full pipeline run)
> /plugin marketplace add tinoimammp/vantage-security-agent > /plugin install vantage@vantage
How it fires
How this command gets triggered: by you, by Claude, or both.
/scan-diffContext preview
What this command does when you run it.
Scan only the changed files in a single commit or PR/MR for newly introduced vulnerabilities (fast incremental check, not a full pipeline run)
description: Scan only the changed files in a single commit or PR/MR for newly introduced vulnerabilities (fast incremental check, not a full pipeline run) argument-hint: "[commit hash | PR/MR number, defaults to HEAD]" allowed-tools: Bash(git diff:*), Bash(git show:*), Bash(git rev-parse:*), Bash(gh pr diff:*), Bash(glab mr diff:*), Task, Read, Glob, Write
Scan only the changed files in `$ARGUMENTS` — a commit hash, a bare PR/MR number (e.g. `42` or `#42`), or empty (defaults to `HEAD`) — for vulnerabilities that change itself introduced. Fast, incremental check, not the full `/vantage:scan-web`/`scan-mobile` pipeline. Same SAST-only rule applies: read the diff and resulting file content, never run the application. `Bash` here is scoped to read-only git/PR history commands only — never used to build, run, or test the target app.
All output for this run lives under **one self-contained root**, `artifacts/commit-scans/<id>/` (`<id>` = the commit hash, or `pr-<number>`/`mr-<number>`) — never touching the main pipeline's `artifacts/findings/`, `artifacts/poc/`, or `artifacts/reports/` paths. These accumulate across runs by design — this command doesn't prune old ones; delete a specific `artifacts/commit-scans/<id>/` folder yourself whenever you no longer need it.
1. **Resolve what to diff:**
treat as a commit.
`gh pr diff <number>` first (GitHub); if `gh` isn't available or errors, try `glab mr diff <number>` (GitLab). If neither works, stop and tell the user to pass an explicit commit hash instead.
2. **Get the changed files + diff:**
`git show <hash> -- <files>` for the actual diff.
derive the changed-file list from its `diff --git a/... b/...` headers.
`scope.json.analysis_scope.exclude_paths` if `scope.json` exists. If zero source files remain, stop and report "nothing to scan." 3. Read `platform` from `./.vantage/artifacts/recon/scope.json` if it exists (default `web`). Don't auto-generate a full `scope.json` for this fast path. 4. Dispatch the platform's 10 testing agents (see `${CLAUDE_PLUGIN_ROOT}/workflow/orchestration.md` Platform Routing for the list) as parallel Task calls. Override their normal input for this run: instead of reading `artifacts/mapping/attack-surface.json`, give each agent the diff from step 2 directly in its dispatch prompt and instruct it to analyze **only the changed/added lines** — pre-existing unchanged code in the same file was already covered by a full scan and is out of scope here. Each agent writes its own file at `artifacts/commit-scans/<id>/raw-findings.<agent-name>.json`. 5. Dispatch `validator-agent` the same way, reading + writing inside `artifacts/commit-scans/<id>/` (`validated-findings.json`). 6. For every `validated:true` Medium-Critical finding, dispatch `poc-agent` the same way, writing to `artifacts/commit-scans/<id>/poc/<finding-id>.md` — same PoC contract as the full pipeline (code evidence + manual test steps a human runs later). **Do not** dispatch `report-agent` or generate a `report.md` for this fast path — that's the one full-pipeline artifact this command skips. 7. Report directly in chat: what was resolved (commit hash, or PR/MR number plus its head commit — this is the `<commit-scan-id>` used below), which agents ran, candidate count, the validated findings (severity, file:line, one-line description), and a pointer to each one's PoC file for manual test steps. 8. To fix one of these findings, tell the user to run `/vantage:fix-diff <commit-scan-id> <finding-id>` — a separate command, not part of this one. Never dispatch `fix-agent` from inside this command.
**Do not** treat a clean result ("0 candidates") as proof the change is safe — this only checked the diff, not the whole attack surface (e.g. a new call site into an already-vulnerable existing function elsewhere in the repo).
AI SAST framework for web & mobile apps, shipped as a Claude Code plugin. Agents read your source code and produce a validated, evidence-backed vulnerability report — no running the app, no network requests.
Repo: tinoimammp/vantage-security-agent
Apply a code-level fix for a finding from /vantage:scan-diff's commit/PR/MR scan — modifies the target repository's source code
Apply a code-level fix for one validated finding by id (e.g. F-001) — modifies the target repository's source code
Apply code-level fixes for ALL validated findings, one at a time — modifies the target repository's source code
Run the full mobile SAST pipeline (phases 01-06) against this repository — Android, iOS, React Native, or Flutter
Run the full web SAST pipeline (phases 01-06) against this repository