threat-model

threat-model is a command for Claude Code from RedHatProductSecurity/agentic-threat-modeling. It costs 21 tokens per session (676 once invoked), scanned A, original, Apache-2.0.

A command for creating a threat model, which is a structured review of how a project could be attacked and what could go wrong. It supports several analysis frameworks, including STRIDE and privacy-focused LINDDUN.

In plain words
What is it for?
Use it to analyze a project, a branch's changes, or a pull request; choose quick, guided, full, or update mode; and focus on selected attacker types.
Why use it?
It helps identify security risks, important assets, trust boundaries, and likely attackers before they become incidents.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/redhatproductsecurity/agentic-threat-modeling/threat-model
Clone the repo
git clone --depth 1 https://github.com/RedHatProductSecurity/agentic-threat-modeling

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threat-model

README.md
[![agentmods](https://agentmods.dev/badge/commands/redhatproductsecurity/agentic-threat-modeling/threat-model.svg)](https://agentmods.dev/commands/redhatproductsecurity/agentic-threat-modeling/threat-model)
Your own site
<a href="https://agentmods.dev/commands/redhatproductsecurity/agentic-threat-modeling/threat-model"><img src="https://agentmods.dev/badge/commands/redhatproductsecurity/agentic-threat-modeling/threat-model.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00676
Opus 5 $0.00010 $0.00338
Sonnet 5 $0.00004 $0.00135
Haiku 4.5 $0.00002 $0.00068

Measured 5d ago against content hash 6fa059e67ae8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

threat-model scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

module/commands/threat-model.md · 52 lines

What it actually says

Invoke the threat-model skill to generate a threat model.

Parse the user's arguments to determine:

Framework (optional — if not specified, recommend one):

  • stride — STRIDE (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege)
  • pasta — PASTA (Process for Attack Simulation and Threat Analysis)
  • linddun — LINDDUN (privacy-focused threat modeling)
  • vast — VAST (Visual, Agile, Simple Threat modeling)
  • attack-trees — Attack Trees (goal-decomposition analysis)
  • octave — OCTAVE (organizational risk assessment)

Mode (optional — default: guided):

  • quick — fast, non-interactive scan using STRIDE
  • guided — interactive session with auto-discovery + interview
  • full — comprehensive multi-framework analysis
  • pr — threat-model the current branch's diff against main
  • pr:123 — threat-model a specific PR by number
  • update — refine an existing THREAT_MODEL.md with feedback
  • update "remove T-003, upgrade T-005 to Critical" — apply specific feedback inline

Actor personas (optional — default: auto-detect):

  • actors:insider — single actor focus
  • actors:insider,supply-chain,apt — multiple actors
  • actors:all — all actor perspectives

External context (optional — for docs the code scan won't find: architecture write-ups, compliance assessments, prior threat models, SBOMs):

  • context:docs/ess_controls.md — a file path (relative to repo root)
  • context:docs/ — a directory (ingests all supported files)
  • context:https://example.com/arch — a public URL (authenticated pages require exporting first)
  • Comma-separated for multiple: context:docs/ess_controls.md,docs/sar_report.md

Target (optional — default: current repository):

  • A file or directory path to focus on

Always-on features (required in every mode — quick, guided, full):

  • Code citations: every threat must include file:line references grounding findings in the codebase. For absence-of-control threats, note where the control should exist.
  • Data classification table: Section 5.5 maps data types to sensitivity, storage, flows, and regulatory scope. Use this table to calibrate threat severity.

Examples:

  • /threat-model context:docs/openapi.yaml — ingest API spec before analysis
  • /threat-model stride context:https://docs.google.com/doc/d/... context:sbom.json — STRIDE with external arch doc and SBOM

Arguments from user: $ARGUMENTS

If no arguments provided, start an interactive guided session. Ask the user to choose framework, external context, and scope BEFORE scanning the codebase — don't start analysis until they've made their selections.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 52 lines · 21 tokens per session scan A 6fa059e67ae8

Subscribe to this mod's changes

threat-model is a command published in the GitHub repository RedHatProductSecurity/agentic-threat-modeling (4 stars, last pushed 25d ago), licensed Apache-2.0. It adds 21 tokens to every session and 676 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.