ponytail-sec
The smallest change that ruins an attacker's day.
ponytail-sec.dev
Laser-focused security review. Instead of flooding you with findings, it hunts
the one dropped capability, the one readOnlyRootFilesystem: true, the one
narrowed RBAC verb that kills a link in the attack chain. Butterfly effect
for defense: tiny diffs, outsized reduction in attacker leverage.
A Claude Code and Antigravity CLI plugin: /ponytail-sec for your
current diff, /ponytail-sec-audit for the whole repo, and
/ponytail-sec-triage to review findings with context.
Same dependency lens as ponytail:
"Do I actually need this dep?" Fewer dependencies = smaller supply-chain
attack surface. Prefer remove over keep.
Before / After
# before — process runs as root, can write anywhere, keeps default capabilities
containers:
- name: controller
image: ghcr.io/example/controller:latest
# after — pin the image, remove root, confine runtime behavior
containers:
- name: controller
image: ghcr.io/example/controller:v1.2.3@sha256:3b7c4e9a1f2d8c6b5a0e9d4c3b2a1908f7e6d5c4b3a2918070605040302010aa
securityContext:
runAsNonRoot: true
readOnlyRootFilesystem: true
seccompProfile:
type: RuntimeDefault
seLinuxOptions:
type: container_t
capabilities:
drop: ["ALL"]
One diff. One closed kill-chain link.
Install
Claude Code
Latest:
/plugin marketplace add andypitcher/ponytail-sec
/plugin install ponytail-sec@ponytail-sec
Pinned to a version:
/plugin marketplace add andypitcher/[email protected]
/plugin install ponytail-sec@ponytail-sec
Antigravity CLI
Latest:
agy plugin install https://github.com/andypitcher/ponytail-sec
For development/local testing:
agy plugin install .
How it works
Three passes, in order:
1. Code review Does this code need to exist at all?
Apply the ponytail lens first: YAGNI, stdlib first,
remove over refactor. Fewer lines = smaller attack surface.
2. Dependency Does this dependency need to exist?
Every dep is supply-chain surface. For each one, ask:
a. Does stdlib or the platform already do this? → remove the dep
b. Is it maintained by a single person, or has a
low OpenSSF Scorecard / no recent commits? → fork or vendor
c. Does it bring more than it costs? → keep, pin immutably
Prefer: remove > stdlib > vendor > immutable pin > keep floating.
3. Security Four stages, top-to-bottom. Stage 1 break voids all below.
findings Two classes, same table, ranked together:
· vulnerability — behaviour contradicts the documented
contract: privesc, auth bypass, injection, path
traversal, hardcoded secrets (tagged secret).
Rated by severity and a CVSS 4.0 score.
· hardening — behaviour matches the contract, but a control
is missing or too loose (ungated debug endpoint, RBAC
wildcard, missing TLS). Rated by efficacy (High/Medium/
Low: how much the fix takes from an attacker) and a CWE.
Rank within each stage by attacker leverage removed ÷ lines changed.
The smallest change that ruins an attacker's day wins.
Default output: up to 3 material findings total; no padding. More only on request.
Report only what breaks an attack path. Security theater goes unreported.
Kill-chain stages
Every security finding lands in one stage, with a class: vulnerability or
hardening. The split is practical, not forensic — it's there so you can sort
"there's a way in" from "tighten this", not to be a taxonomy.
Stage 1 · Trust Can the attacker forge or bypass identity?
· Trust-anchor material (JWKS, CA certs, OAuth) over verified TLS?
· Token validation complete — issuer, audience, algorithm, scope, expiry?
· Auth bypass modes guarded to non-production?