Skip to content
Security
Command

/scan-diff

Scan only the changed files in a single commit or PR/MR for newly introduced vulnerabilities (fast incremental check, not a full pipeline run)

From plugin
vantage
46 skills29 agents6 commands
> /plugin marketplace add tinoimammp/vantage-security-agent
> /plugin install vantage@vantage

Command definition

scan-diff.md
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:**

  • `$ARGUMENTS` empty -> use `HEAD`.
  • `$ARGUMENTS` looks like a commit hash and `git rev-parse` resolves it ->

treat as a commit.

  • `$ARGUMENTS` is a bare number or `#<number>` -> treat as a PR/MR: try

`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.

  • Nothing resolves -> stop, don't guess.

2. **Get the changed files + diff:**

  • Commit: `git diff --name-only <hash>^..<hash>` for the file list,

`git show <hash> -- <files>` for the actual diff.

  • PR/MR: the `gh pr diff`/`glab mr diff` output already is the diff;

derive the changed-file list from its `diff --git a/... b/...` headers.

  • Drop deletions and anything matching

`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 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).

Read more
@tinoimammp
Ships withvantage

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.

41 skill29 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
4
Star history of tinoimammp/vantage-security-agent on GitHub, a chart by star-history.com

Other commands on vantage.

fix-diff

fix-diff

Command

Apply a code-level fix for a finding from /vantage:scan-diff's commit/PR/MR scan — modifies the target repository's source code

@tinoimammp@tinoimammpInstall Command
fix-issue

fix-issue

Command

Apply a code-level fix for one validated finding by id (e.g. F-001) — modifies the target repository's source code

@tinoimammp@tinoimammpInstall Command
fix

fix

Command

Apply code-level fixes for ALL validated findings, one at a time — modifies the target repository's source code

@tinoimammp@tinoimammpInstall Command
scan-mobile

scan-mobile

Command

Run the full mobile SAST pipeline (phases 01-06) against this repository — Android, iOS, React Native, or Flutter

@tinoimammp@tinoimammpInstall Command

More commands from other plugins.

deslop-reborn

deslop-reborn

Command

One iteration of the IronClaw Reborn de-slop loop — take ONE Reborn crate, fan out parallel review sub-agents (thermo-nuclear…

@nearai@nearaiInstall Command
audit

audit

Command

Audit a file, directory, or whole repo for insecure default configuration: fallback secrets, default credentials, fail-open…

@trailofbits@trailofbitsInstall Command
arsenal

arsenal

Command

Show which external bug-bounty tools are installed on this machine and print install hints for the missing ones. Curated from…

@awarexone@awarexoneInstall Command