security-threat-model

Generate repository-specific threat models with evidence-based assets, boundaries, and mitigations.

2|1|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/duggal1/Sapphire-cli --skill security-threat-model-duggal1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-threat-model
Source: https://github.com/duggal1/Sapphire-cli/tree/main/internal/skills/bundled/security-threat-model
Command: npx skills add https://github.com/duggal1/Sapphire-cli --skill security-threat-model-duggal1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables security teams to produce a repo-specific threat model that is grounded in evidence from the codebase, enumerating assets, trust boundaries, attacker capabilities, abuse paths, and mitigations.

Core Features & Use Cases

  • Repo-grounded threat modeling anchored to repository evidence for AppSec engineers.
  • System model: define trust boundaries, data flows, and assets with explicit evidence references.
  • Prioritized threats with concrete mitigations and validation questions to resolve context.

Quick Start

Identify the target repository and invoke threat-model analysis to generate an evidence-grounded report tailored to that codebase.

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 my repository code?

A repo-grounded threat model identifies assets, trust boundaries, and prioritized threats anchored directly to evidence in your codebase. It maps attacker capabilities and abuse paths while separating runtime versus CI/dev boundaries for accurate risk analysis.

What is the best way to document trust boundaries and data flows in appsec threat modeling?

Document trust boundaries by mapping data flows and assets with explicit evidence references from the codebase. This generates a Mermaid diagram visually separating runtime and CI/dev boundaries for accurate risk analysis.

How do I identify and prioritize threats in my codebase?

Identify and prioritize threats by analyzing attacker capabilities and abuse paths specific to your repository. The threat model provides rationale for each prioritized threat alongside concrete mitigations and validation questions to resolve context gaps.

Can I use threat modeling to separate runtime and CI/dev security boundaries?

Yes, threat modeling can explicitly separate runtime and CI/dev security boundaries. By analyzing repository entry points and data flows, the model defines distinct trust boundaries and generates validation questions to confirm boundary context.

What do I need to provide for repository-specific risk analysis?

For repository-specific risk analysis, you need to provide the target repository and any in-scope paths. The analysis requires no external dependencies and uses validation questions to resolve missing context before generating the threat model report.