AGENT
Use when designing a new HTTP/GraphQL API or changing an existing one — modeling resources, defining endpoint contracts, choosing status codes, pagination,…
A threat model is only as good as the diagram it sits on. The data-flow diagram (DFD) is the map; trust boundaries are where the dangerous neighborhoods are. Build the diagram first, then hunt threats along the boundaries.
$ npx -y skills add vanara-agents/skills --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
A threat model is only as good as the diagram it sits on. The data-flow diagram (DFD) is the map; trust boundaries are where the dangerous neighborhoods are. Build the diagram first, then hunt threats along the boundaries.
A threat model is only as good as the diagram it sits on. The data-flow diagram (DFD) is the map; trust boundaries are where the dangerous neighborhoods are. Build the diagram first, then hunt threats along the boundaries.
Every DFD is built from exactly four kinds of element. Keep them distinct — the element type determines which STRIDE categories apply (see `stride-method.md`).
| Element | What it is | Notation here | |---|---|---| | **External entity** | An actor outside your control: a user, a browser, a third-party API | `(E1) Browser` | | **Process** | Code that transforms data: a service, a Lambda, a function | `(P2) Auth Service` | | **Data store** | Where data rests: a DB, cache, queue, bucket, file | `(DS3) User DB` | | **Data flow** | Data in motion between two elements | `──1: HTTPS POST──►` |
Number every element and every flow. Threat IDs reference these numbers, which is what makes the model auditable: anyone can check that flow 4 has been considered.
A trust boundary is any line where the level of trust changes — where data or control passes from a less-trusted zone into a more-trusted one. Threats concentrate here because this is where an attacker on the outside tries to influence the inside.
Draw a boundary at:
The classic mistake is drawing too few boundaries. A monolith still has a boundary between the unauthenticated request handler and the authenticated business logic.
Render the DFD as text so it lives in version control next to the design and diffs cleanly. The convention used across this package:
TRUST BOUNDARY: <less trusted> ││ <more trusted>
(E1) Entity ──N: flow label──►││──► (Pn) Process ──M: flow──►││──► (DSn) Store
Legend: (E)=external entity (P)=process (DS)=data store
N: numbered data flow ││ = trust boundary crossingreader knows what crosses.
Once boundaries are marked, the highest-value work is mechanical:
1. **List every flow that crosses a `││`.** These are your priority targets. 2. For each crossing flow, the **destination process** is where untrusted input lands — apply Tampering, Information disclosure, DoS, and Elevation of privilege there. 3. For each **data store**, ask what happens if the flow writing to it is malicious (Tampering) or the store leaks (Information disclosure). 4. For each **external entity**, ask how it's authenticated (Spoofing) and whether its actions are logged (Repudiation).
with very different sensitivity — model them separately.
boundary; its compromise or outage is in scope.
are boundaries even on one host.
🐒 Free agents, skills & packs for Claude Code One subscription. An army of Claude Code agents. 30 production-grade agents, skills, and packs for Claude Code — free, Apache-2.0, install with one command.
Repo: vanara-agents/skills
Use when designing a new HTTP/GraphQL API or changing an existing one — modeling resources, defining endpoint contracts, choosing status codes, pagination,…
This shows how the api-designer agent reviews a flawed draft. Findings are severity-ranked so the implementer fixes the contract-breakers first. Severity…
The contract is the deliverable. Express it as an **OpenAPI 3.1** document so it is human-readable *and* machine-checkable. This reference covers how to…
Run through this before declaring an API contract done. It is ordered the way you should *design*: resources first, cross-cutting rules last. Every box is a…
APIs are forever once published: a consumer you've never met may depend on any field you expose. Design so you can **add without breaking**, and version…
Copy-paste templates for leaving review comments. Keep each comment to one finding: an anchor, the problem, and the fix.