security-diff-scan

Reviews Git diffs, commits, and pull requests for security regressions through phased scans.

Updated May 4, 2026
One-click install
npx skills add https://github.com/antstanley/skills --skill security-diff-scan-antstanley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-diff-scan
Source: https://github.com/antstanley/skills/tree/main/plugins/security/skills/security-diff-scan
Command: npx skills add https://github.com/antstanley/skills --skill security-diff-scan-antstanley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Reviewing pull requests, commits, and working-tree patches for security regressions is error-prone when done ad hoc, and a scan against the wrong base silently reviews the wrong code. This Skill orchestrates a rigorous, multi-phase security review of any Git-backed change set with a sealed, machine-readable scan contract. ## Core Features & Use Cases - Phased Scan Pipeline: Runs threat modeling, finding discovery, validation, and attack-path analysis as distinct sequential phases, each with ledger receipts and completion criteria. - Precise Diff Targeting: Resolves PRs, commits, branch ranges, and local patches against pinned base/head revisions, generating deterministic review worklists from changed files. - Sealed Audit Artifacts: Produces a canonical JSON scan contract, per-finding vulnerability write-ups, a hardening portfolio, and a generated markdown report with SARIF-compatible outputs. - Use Case: Before merging a pull request that touches authentication middleware, run a diff scan to discover candidate vulnerabilities introduced by the change, validate each one, analyze attack paths, and receive a sealed report with remediation guidance. ## Quick Start Ask the assistant to run a security diff scan on the current pull request or a specific commit range in your repository.

Frequently Asked Questions about security-diff-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a security review on a pull request before merging?

Invoke the diff scan with the PR reference; it resolves the pull request locally using gh pr view and gh pr diff or an explicit revision range. The scan then runs threat modeling, discovery, validation, and attack-path analysis against the changed code and produces a final report.

What types of Git changes can a diff security scan cover?

The scan covers uncommitted working-tree changes against HEAD, single commits against their parent, branch comparisons via merge-base ranges, and locally resolved pull requests. The base and head revisions are pinned before any analysis begins.

Does a diff scan review the whole repository or only changed files?

Discovery, validation, and attack-path analysis stay anchored to changed files and directly supporting files. Only the threat-model phase is repository-scoped by default, and sibling instances are included only when the diff makes them newly vulnerable.

What happens if the diff base is ambiguous in a security scan?

The scan stops and asks you to pin the base rather than guessing, because scanning against the wrong base silently reviews the wrong code. This applies when a repository has staged and unstaged work plus unmerged branches.

What output does the security diff scan produce?

It produces a sealed canonical JSON scan contract, a generated markdown report, per-finding vulnerability write-ups with PoC files, and a hardening portfolio with remediation proposals. Derived reports are linked from the contract but not sealed.