security-threat-model

Generate repository-grounded threat models with Mermaid diagrams.

1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/kennyolofsson23-netizen/claude-code-config --skill security-threat-model-kennyolofsson23-netizen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-threat-model
Source: https://github.com/kennyolofsson23-netizen/claude-code-config/tree/main/skills/security-threat-model
Command: npx skills add https://github.com/kennyolofsson23-netizen/claude-code-config --skill security-threat-model-kennyolofsson23-netizen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provide a concrete, repository-specific threat model that avoids generic checklists and speculative findings by tying every architectural claim to evidence in the codebase. This reduces uncertainty for AppSec reviewers, surfaces the highest-impact abuse paths, and yields prioritized, actionable mitigations that map to concrete repo locations.

Core Features & Use Cases

  • Evidence-anchored findings: Every component, boundary, and control is supported by repo anchors so reviewers can quickly verify claims.
  • Prioritized abuse paths: Enumerates attacker goals, multi-step abuse paths, and assigns qualitative likelihood and impact reasoning to focus remediation.
  • Actionable mitigations & review targets: Recommends concrete code/config fixes, detection ideas, and a short list of repo paths for deeper manual review.
  • Machine-friendly output contract: Produces a compact Markdown threat model and a Mermaid diagram following the included prompt-template for consistent downstream use.

Quick Start

Ask the skill to generate a repository-grounded threat model for the current repo or a specified subpath and confirm or correct the listed assumptions when prompted.

Frequently Asked Questions about security-threat-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a threat model from a codebase?

To generate a threat model from a codebase, specify your repository path or subdirectory. The analysis enumerates trust boundaries, assets, and abuse paths, anchoring every architectural claim to concrete repo evidence and producing a Markdown report with a Mermaid diagram.

What is repository-grounded threat modeling and how does it work?

Repository-grounded threat modeling ties every architectural claim to specific code evidence, avoiding generic checklists. It analyzes your codebase to surface multi-step abuse paths, attacker capabilities, and prioritized mitigations mapped to exact repo locations for AppSec reviewers.

Can I use this for AppSec analysis on a specific repository subpath?

Yes, you can perform AppSec analysis on a specific repository subpath. The threat modeling process validates assumptions with you interactively and outputs a concise Markdown report covering trust boundaries and abuse paths specific to that directory scope.

What is the best way to document trust boundaries and attack surfaces in a repository?

The best way to document trust boundaries and attack surfaces is by generating a compact Mermaid diagram alongside a Markdown report. This machine-friendly output contract visually maps attacker goals and abuse paths while anchoring components to repository evidence.

How to map attacker capabilities and abuse paths to specific code locations?

Mapping attacker capabilities requires analyzing the repository to identify qualified likelihood and impact reasoning for multi-step abuse paths. The resulting threat model assigns concrete code and configuration fixes, directing reviewers to exact repo paths for deeper manual inspection.

What are the limitations of automated repository threat modeling?

Automated repository threat modeling requires user interaction to validate assumptions before producing the final report. It focuses strictly on evidence-anchored findings within the specified codebase, meaning speculative findings outside the repository scope are excluded from the mitigation recommendations.