Audits application architecture for vulnerabilities using STRIDE mapping and trust boundary analysis.

Install

mkdir -p .claude/skills/threat-model && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17986" && unzip -o skill.zip -d .claude/skills/threat-model && rm skill.zip

Installs to .claude/skills/threat-model

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Hometower's security threat model — architecture trust boundaries, known previously-fixed vulnerabilities, and STRIDE threat lanes mapped to specific files. Read this when performing security audits or reviewing auth/data-handling code.
236 chars✓ has a “when” trigger
Advanced

Key capabilities

  • Apply STRIDE per-element to security reviews.
  • Perform attack surface analysis on user input paths.
  • Identify trust boundaries in the application architecture.
  • Verify previously fixed vulnerabilities against new code.
  • Map STRIDE threat lanes to specific files and hunt for weaknesses.

How it works

The skill applies security review methodologies like STRIDE and Attack Surface Analysis to identify vulnerabilities. It maps threat lanes to specific files and checks for regressions of previously fixed issues.

Inputs & outputs

You give it
Application architecture, code, and configuration files
You get back
Security findings with CWE mapping, verification paths, and boundary analysis

When to use threat-model

  • Security audit of routes
  • Review authentication flow
  • Check data handling security
  • Threat model application layers

About this skill

threat-model

Security Review Science

  • STRIDE Per-Element (Shostack, 2014): apply STRIDE to each route, data flow, store, and client render path individually
  • Attack Surface Analysis: inspect every place user input enters, crosses a trust boundary, and leaves the system
  • Least Privilege: prefer the narrowest access and visibility possible at every layer
  • Defense in Depth: treat single-control protection as suspicious; look for a second barrier
  • CWE Mapping: name the weakness class precisely whenever possible

Use these rules to keep audits specific and actionable instead of vague.

Architecture Security Boundaries

Browser (untrusted)
    |
    +-- JWT in sessionStorage (accessible to XSS)
    +-- Cytoscape.js canvas (renders user-supplied labels)
    +-- Leaflet.js map (renders location names in popups)
    |
    v
FastAPI (trust boundary -- JWT + RBAC enforcement)
    |
    +-- src/api/middleware/auth.py -- JWT decode + role check
    +-- src/api/routers/ -- Depends(require_role(...))
    |
    v
Service Layer (trusted -- owns transactions)
    |
    v
PostgreSQL (trusted -- constraints are last line of defense)

Key trust boundaries:

  1. Browser -> API: JWT validation, input sanitization, RBAC
  2. API -> Service: delegation only (no direct DB access from routers)
  3. Service -> DB: parameterized queries (no SQL injection)
  4. DB -> API response: no password hashes or secrets in response schemas
  5. DB -> UI render: HTML escaping before embedding in JS/HTML

Known Previously-Fixed Vulnerabilities

Regression checklist — verify fixes still hold and new code doesn't reintroduce:

FindingCWEWhat to Check
Hardcoded SECRET_KEY in .envCWE-798.env in .gitignore? New hardcoded secrets?
Stateless JWT (no revocation)CWE-613token_version checked on decode? New endpoints bypass?
Device names unescaped in CytoscapeCWE-79html.escape()/_escapeHtml() on all user labels? New labels without escaping?
Connection labels in confirm() dialogsCWE-79_escapeHtml() in all dialog messages?
Missing DB uniqueness constraintsCWE-362New models without unique constraints?
Email logged on auth failureCWE-532New log statements with user-supplied PII?

STRIDE Threat Lanes (file targets)

LaneSTRIDETarget FilesHunt For
JWT AuthTampering/Spoofingsrc/utils/auth.py, src/api/middleware/auth.pyAlgorithm confusion, expired token accepted, token_version bypass, short secret key
Plaintext LeaksInfo DisclosureAll logger.* calls across src/Device IPs/MACs in error logs, JWT payloads in debug, emails in auth failure, stack traces
Stored XSSElevationcanvas*.py, topology_data.py, map_view.py, ui.label() callsUnescaped strings in ui.run_javascript(), innerHTML, Cytoscape/Leaflet labels without sanitization
RBAC BypassElevation/SpoofingAll src/api/routers/*.pyMissing Depends(require_role(...)), wrong role level, IDOR on device IDs
Secret LifecycleInfo Disclosuresrc/utils/auth.py, src/utils/settings.py, .env, docker-compose.ymlPasswords in API responses, bcrypt hash outside User model, key reuse
SQL InjectionTamperingsrc/repositories/, any session.execute()/session.exec()f-string SQL, .text() with interpolation, unparameterized user strings
Export/Backup AuthInfo Disclosuresrc/api/routers/data_transfer.py, src/services/export_service.pyExport callable by Reader, exported JSON with password_hash, secrets in custom fields
Geo/Leaflet InjectionTamperingsrc/ui/components/map_view.pyLocation names in popup HTML without escaping, innerHTML with user content
DB IntegrityTamperingAll src/models/*.pyMissing UNIQUE, missing ondelete="CASCADE", missing CheckConstraint for self-refs
Supply ChainMixedrequirements.txt, Dockerfile, docker-compose.ymlKnown CVEs, EOL versions, missing integrity checks

Security Orchestrator Lane Assignments

LaneSTRIDEBoundary
lane-1Tampering/SpoofingJWT Auth. Browser->API.
lane-2Info DisclosurePlaintext leaks. App->Logs.
lane-3ElevationSQLi & Pydantic. API->DB.
lane-4Info DisclosureSecret lifecycle. Bcrypt/JWT/.env.
lane-5Spoofing/ElevationRBAC bypass. All routers + rbac.py.
lane-6TamperingXSS. Canvas + map. DB->UI render.
lane-7TamperingSQLModel integrity. DB constraints.
lane-8Info DisclosureBackup/Export. API->External.
lane-9ElevationRBAC wildcard. Reader data exposure.
lane-10MixedSupply chain & infra. Docker/deps.

Evidentiary Bar

  • prefer a believable exploit path or a concrete verification path over speculative warnings
  • findings without a clear boundary, target file, or failure mode should be treated as incomplete

When not to use it

  • When not performing security audits or reviewing auth/data-handling code.
  • When the goal is not to identify vulnerabilities or exploit paths.
  • When a general code review is needed, not a security-focused one.

Limitations

  • The skill focuses on Hometower's security threat model.
  • Findings without a clear boundary, target file, or failure mode are treated as incomplete.
  • The skill prefers believable exploit paths over speculative warnings.

How it compares

This skill provides a structured, evidence-based framework for security threat modeling and auditing, focusing on specific exploit paths and trust boundaries, which is more targeted than a general security assessment.

Compared to similar skills

threat-model side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
threat-model (this skill)03moReviewAdvanced
app-builder166moNo flagsBeginner
templates46moNo flagsBeginner
backend-architect103moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

app-builder

davila7

Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.

1645

templates

davila7

Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.

452

backend-architect

sickn33

Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and observability. Use PROACTIVELY when creating new backend services or APIs.

1014

agent-v3-security-architect

ruvnet

Agent skill for v3-security-architect - invoke with $agent-v3-security-architect

317

pytm

rohunj

Python-based threat modeling using pytm library for programmatic STRIDE analysis, data flow diagram generation, and automated security threat identification. Use when: (1) Creating threat models programmatically using Python code, (2) Generating data flow diagrams (DFDs) with automatic STRIDE threat identification, (3) Integrating threat modeling into CI/CD pipelines and shift-left security practices, (4) Analyzing system architecture for security threats across trust boundaries, (5) Producing threat reports with STRIDE categories and mitigation recommendations, (6) Maintaining threat models as code for version control and automation.

15

python-development-python-scaffold

sickn33

You are a Python project architecture expert specializing in scaffolding production-ready Python applications. Generate complete project structures with modern tooling (uv, FastAPI, Django), type hint

14

Search skills

Search the agent skills registry