# ponytail-sec > A security plugin for AI coding agents: the smallest change that ruins an attacker's day. A laser-focused security engineer sitting next to you while you code. It keeps your attack surface small (less code, fewer dependencies, tighter controls) and finds the one fix that breaks the attack chain. Open source, MIT license. Runs in Claude Code and Antigravity CLI; Cursor support is coming. Created by Andy Pitcher (https://github.com/andypitcher), a product security engineer in open-source cloud native, and maintained with its contributors. Inspired by the Ponytail plugin. ponytail-sec lists findings and fixes nothing: it never applies changes, runs untrusted code or touches production. Findings that are static guesses come with a "prove it at runtime first" note. ## Commands - `/ponytail-sec` (companion): run it after you write code. It reads only what changed (your uncommitted diff, the commits on your branch, or the files you name), runs three passes, reports up to 3 material findings with a fix and a break-risk each, and ends with one verdict: "Ship blocked. Fix before merging." or "Locked down. Ship." - `/ponytail-sec-audit` (audit): scans the whole repo with the same three passes and no cap on findings. Saves report.md, findings.json and meta.json under .ponytail-sec/, compares each scan with the last (resolved, recurring, regression), and ends with an offer to triage. - `/ponytail-sec-triage` (triage): the final gate. Reads repo security context (SECURITY.md, threat model, manifests, published advisories), asks up to 5 skippable questions, builds one evidence bundle per finding for a fresh read-only agent, runs only commands the user approves, and writes one .triage.md report per finding with an OpenVEX status (affected, not_affected, under_investigation). ## Three passes, in order 1. Code: does this code need to exist at all? YAGNI, stdlib first, remove over refactor. Fewer lines, smaller attack surface. 2. Dependencies: does this dependency need to exist? Fewer dependencies, fewer ways in for a supply-chain attack. Preference: remove > stdlib > vendor or fork > immutable pin > keep floating. Checked against the registry page and OpenSSF Scorecard. 3. Security: which one change breaks the kill chain? Four stages: 1 Trust, 2 Authz, 3 Exec, 4 Data. Ranked by attacker leverage removed divided by lines changed. ## Vulnerability or hardening - Vulnerability: behaviour contradicts the documented contract. Rated by severity and a CVSS 4.0 score (CVSS-B from the audit; triage may rescore to CVSS-BT or CVSS-BTE with cited context). - Hardening: behaviour matches the contract, but a control is missing or too loose. Rated by efficacy (High, Medium, Low: how much attacker leverage the fix removes) and a CWE. Never given a CVSS score. - Every finding also has a break-risk (Low, Medium, High): how likely the fix is to break something. ## Install - Claude Code: `/plugin marketplace add andypitcher/ponytail-sec` then `/plugin install ponytail-sec@ponytail-sec` - Antigravity CLI: `agy plugin install https://github.com/andypitcher/ponytail-sec` ## Links - [Source code and README](https://github.com/andypitcher/ponytail-sec) - [Companion example: a new service with 3 issues](https://github.com/andypitcher/ponytail-sec/blob/main/examples/companion-diagnostic-service.md) - [Companion example: a risky new dependency](https://github.com/andypitcher/ponytail-sec/blob/main/examples/companion-jexl-dep.md) - [Audit example: full audit with persisted findings](https://github.com/andypitcher/ponytail-sec/blob/main/examples/audit-controller-scan.md) - [Triage example: walkthrough](https://github.com/andypitcher/ponytail-sec/blob/main/examples/triage-controller-scan.md) - [Triage example: hardening reclassified as a vulnerability](https://github.com/andypitcher/ponytail-sec/blob/main/examples/triage-reclassification.md) - [Security policy](https://github.com/andypitcher/ponytail-sec/blob/main/SECURITY.md)