threat-model-sidecar

threat-model-sidecar is a skill for Claude Code from alpha-omega-security/threat-model. It costs 135 tokens per session (2,689 once invoked), scanned A, original, MIT.

A specification for generating YAML and JSON companion files for a written threat model, which records possible security risks in a project.

In plain words
What is it for?
Use it to publish and validate threat-model.yaml and threat-model.json files for automated triage and dependency compatibility checks.
Why use it?
It lets automated tools read the threat model in a consistent format instead of trying to interpret the prose document directly.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the threat-model plugin — 8 skills shipped together

Good fit Use it to publish and validate threat-model.yaml and threat-model.json files for automated triage and dependency compatibility checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alpha-omega-security/threat-model/threat-model-sidecar
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.

Any agent
npx skills add alpha-omega-security/threat-model --skill threat-model-sidecar
Clone the repo
git clone --depth 1 https://github.com/alpha-omega-security/threat-model

Made for: Claude Code.

Or install threat-model, the plugin that ships this one along with the rest of its 8 skills.

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-sidecar

README.md
[![agentmods](https://agentmods.dev/badge/skills/alpha-omega-security/threat-model/threat-model-sidecar/github.svg)](https://agentmods.dev/skills/alpha-omega-security/threat-model/threat-model-sidecar)
Your own site
<a href="https://agentmods.dev/skills/alpha-omega-security/threat-model/threat-model-sidecar"><img src="https://agentmods.dev/badge/skills/alpha-omega-security/threat-model/threat-model-sidecar/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for threat-model-sidecar

Your own site · 80×15
<a href="https://agentmods.dev/skills/alpha-omega-security/threat-model/threat-model-sidecar"><img src="https://agentmods.dev/badge/skills/alpha-omega-security/threat-model/threat-model-sidecar.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,689 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00135 $0.02689
Opus 5 $0.00068 $0.01345
Sonnet 5 $0.00027 $0.00538
Haiku 4.5 $0.00014 $0.00269

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

Security

Grade A, and why

threat-model-sidecar 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 10d 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.

skills/threat-model-sidecar/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Threat Model — Sidecar (machine-readable companions)

Owns §1.19: emit threat-model.yaml and threat-model.json alongside the prose document so shared triage tooling can consume the model without parsing prose. Follow the schema in sidecar-schema.md for the YAML and the mapping in json-report-schema.md for the JSON exactly — companions are only useful to tooling if they are structurally uniform across projects. Authority order: prose > yaml > json. The JSON is a flat, lossy export for consumers of schema.json; it is never a triage input.

Principles

  • Prose is canonical; the sidecar is a derived index. Do not put anything in the sidecar that is not already asserted in the prose. If the two disagree, the sidecar is wrong.
  • Record provenance of derivation — set prose_version to the canonical relative prose path plus SHA-256 of its exact UTF-8 bytes, and regenerate whenever the prose changes.
  • Uniform shape only — use the schema: threat-model-sidecar/v2 fields as given; extend with project-specific keys only under an x- prefix. The JSON schema forbids extensions entirely; what does not fit stays in the YAML.
  • Never upgrade provenance. The JSON collapses four provenance kinds into two: documented and maintainer become documented; inferred and assumption become inferred. The collapse only goes down — a record whose sidecar provenance is inferred or assumption must never surface in the JSON as documented. That direction hands a JSON-only consumer a licence the model never granted.

Procedure

  1. Confirm the prose document is at least a complete draft (all sections substantive or N/A). If §1.7/§1.8/§1.11/§1.17 are incomplete, stop and hand back — the sidecar cannot be faithfully derived from a partial model.
  2. Project each prose section into its sidecar block:
    • §1.2/§1.3/§1.4 → components (scope: in|out, out-reason, and per- component reachability precondition).
    • §1.5 → host_side_effects[] — explicit present/absent/conditional host effects with components, conditions, and provenance.
    • §1.7 → entry_points[].parameters[] — every attacker-controllable parameter must have a non-empty caller_must_enforce and at least one value in its control_kinds array.
    • §1.7-§1.12 → contract_dimensions[] — all eight required dimensions for every in-scope component, including explicit not-applicable rows; claimed/disclaimed rows reference stable property IDs and unresolved rows reference §1.18 question IDs.
    • §1.8 → outputs[] (taint: same-as-input | sanitized | constrained, in-scope component, separately provenanced invariants, and downstream must-not-assume records).
    • §1.10 → adversaries[] (in/out of scope, capabilities, excluded capabilities, goals, provenance).
    • §1.9 → dependency_policy + dependencies[], including stable relied_on_properties, acknowledged obligation IDs, adversary capabilities actually forwarded, and output channels/taint handling; an empty list plus zero_runtime_dependencies: true is the explicit zero-dependency claim, not an omission. Leave outputs_consumed: [] unless the project holds an output-sanitization-kind property about a dependency's output — each entry's supports_property_id must reference such a property. If the project passes a dependency's output straight through and disclaims sanitization (the common case), the list stays empty; the passthrough taint is already recorded in §1.8 outputs[] and the §1.12 disclaimers. Do not point supports_property_id at a behavioral, atomicity, or probabilistic property.
    • §1.6 → build_policy + build_flags[] (default, security_relevant, support stance, affected property IDs/effects, provenance).
    • §1.11 → properties_claimed[] (kind, components, tier, conditions, violation symptoms, provenance).
    • §1.12 → properties_disclaimed[] (components, conditions, false_friend: true|false, provenance).
    • §1.13 → downstream_responsibilities[] linked to obligation/property IDs.
    • §1.14 → known_misuses[], the structured basis for VALID-HARDENING.
    • §1.15 → known_non_findings[], with component/sink, conditions, and discharged_by stable IDs sufficient for exact (not fuzzy) matching.
    • §1.17 → dispositions plus disposition_precedence — the fixed closed enum and first-match order, verbatim.
  3. Normalize the prose status to the schema enum (draft, unratified-draft, under-review, accepted) using the mapping in sidecar-schema.md; set confidence to match the §1.1 counts exactly. Project the header's triage policy to the top-level triage_policy (strict default / relaxed). Carry tier (security-critical | correctness-only) on every properties_disclaimed[] entry so a consumer can enforce the assumption security-critical floor. Project the §1.1 generation metadata to the top-level generation block (model, effort, plugins[]); omit the block only when the prose header records a fully human-authored model.
  4. Project the validated YAML to threat-model.json per json-report-schema.md:
    • Collapse provenance downward: documented/maintainerdocumented, inferred/assumptioninferred. A JSON block built from many sidecar records takes the weakest of the set. Collapse confidence the same way: documented + maintainer, inferred + assumption.
    • Emit all nine schema disposition values, verbatim. OUT-OF-MODEL: dependency-contract has no JSON value; a JSON-only consumer falls through to model_gap, which escalates. Do not invent a label for it.
    • Flatten entry_points to one row per (entry point × parameter). An attacker_controllable: conditional row must carry a non-empty condition.
    • For each known non-finding, name the covered in-scope components and the discharged symptom in why_safe, and point cites at the discharging entry in the same document (properties_provided[3] style). The JSON drops the sidecar's components and symptom fields, so why_safe is the only place left to carry the scope.
    • Record repository, commit (git rev-parse HEAD in the modeled tree), date, scope_subpath, and a short §1.2 description.

Read the full file on GitHub · 185 lines

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. 10d ago First seen · 185 lines · 135 tokens per session scan A a22ad037571a

Subscribe to this mod's changes

threat-model-sidecar is a skill published in the GitHub repository alpha-omega-security/threat-model (54 stars, last pushed 22d ago), licensed MIT. It adds 135 tokens to every session and 2,689 once invoked, about $0.0007 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-30.