agentleFS
drvossdrvoss/everything-copilot-cli/skills/security/threat-model-analyst/SKILL.md

threat-model-analyst

Skill47 starsChanged 4 months agoMITView on GitHub

Use when a repository, system, or major change needs a structured STRIDE-A threat model — map architecture, data flows, trust boundaries, abuse cases, and prioritized findings, or update an existing model with a change-focused diff.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when there is no prior threat model or when the whole system needs review.

    line 38
  2. Distinctive:

    Use when a previous threat model exists and you need to compare the current system or a specific commit against that baseline.

    line 42
  3. Distinctive:

    When comparing against a prior threat model, explicitly classify each item as:

    line 108
  4. Distinctive:

    No one can name the trust boundaries in the system

    line 165

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Threat Model Analyst

Perform architecture-first security analysis using STRIDE-A: classic STRIDE plus explicit abuse-case thinking.

When to Use

  • A new system or subsystem needs an initial threat model
  • A major change landed and the question is "what changed security-wise?"
  • You need to reason about trust boundaries, data flows, or risky integrations before implementation
  • A security review needs architecture evidence, not only code-pattern scanning

When NOT to Use

Instead of threat-model-analystUse
Code-level vulnerability scanningsecurity-scan or pr-security-review
Broad repository posture scoringevaluate-repository
Agent-specific OWASP checklist reviewagent-owasp-check
Supply-chain integrity validationagent-supply-chain

Modes

Single Analysis

Use when there is no prior threat model or when the whole system needs review.

Incremental Analysis

Use when a previous threat model exists and you need to compare the current system or a specific commit against that baseline.

Incremental mode is often the better day-to-day workflow because it highlights:

  • new threats
  • resolved threats
  • still-present threats
  • trust-boundary changes
  • differences in severity or exploitability

Workflow

1. Define scope and assets

Clarify:

  • what system or subsystem is in scope
  • what assets matter most
  • what actors exist
  • what trust boundaries separate them

List obvious inputs and high-value outcomes before reading code in detail.

2. Build an architecture and data-flow sketch

You do not need perfect diagrams before analysis, but you do need a concrete model of:

  • components
  • entry points
  • data stores
  • external systems
  • privileged execution zones
  • trust boundaries between them

Represent the system as a lightweight DFD or component map if helpful.

3. Apply STRIDE-A to each component and flow

For each component or trust boundary, ask:

DimensionQuestion
SpoofingWho could impersonate a user, service, or agent?
TamperingWhat data or configuration could be modified without detection?
RepudiationWhat actions would be hard to prove later?
Information DisclosureWhat could leak across the boundary?
Denial of ServiceWhat could exhaust or block the system?
Elevation of PrivilegeWhat paths raise privileges unexpectedly?
AbuseWhat realistic misuse path would an attacker or insider choose?

4. Score and prioritize findings

For each finding, record:

  • affected component or trust boundary
  • short threat statement
  • exploit path
  • likely impact
  • mitigating controls already present
  • suggested remediation

Map to CWE, OWASP, or CVSS only when it clarifies the issue instead of bloating the report.

5. Run incremental analysis for changes

When comparing against a prior threat model, explicitly classify each item as:

  • new
  • resolved
  • still present
  • changed severity

This is especially useful for:

  • new integrations
  • changed authentication flows
  • new background jobs or agents
  • infrastructure moves
  • CI/CD or deployment changes

6. Produce a concise decision-ready report

A good threat model report should leave the reader with:

  • the architecture in scope
  • the highest-risk boundaries
  • the top findings in priority order
  • what changed since the last model, if applicable
  • the next mitigation step

Suggested structure:

## Architecture Overview
- ...

## Trust Boundaries
- ...

## STRIDE-A Findings
- [High] ...
- [Medium] ...

## Change Diff
- New: ...
- Resolved: ...
- Still present: ...

## Next Mitigations
- ...

Common Rationalizations

RationalizationReality
"We'll just scan the code for vulnerabilities."Code scanning misses architecture flaws, broken trust boundaries, and misuse paths.
"The old threat model is close enough."Architecture drift makes stale threat models dangerously reassuring.
"Abuse cases are too speculative."Real attackers optimize for abuse paths, not textbook categories.

Red Flags

  • No one can name the trust boundaries in the system
  • External systems are treated as trusted by default
  • Authentication or authorization changes are documented only at code level
  • A prior threat model exists but no change diff was done after a major update

Verification

  • The system scope and assets are explicit
  • Components, flows, and trust boundaries were identified
  • STRIDE-A was applied to each meaningful boundary or component
  • Findings are prioritized instead of left as an unranked brainstorm
  • Incremental changes are called out separately when a baseline exists

See Also

  • security-scan - inspect code-level vulnerabilities after the model identifies hot spots
  • agent-owasp-check - review agent-specific OWASP ASI risks
  • security-audit - broader workflow for OWASP plus STRIDE review

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.