threat-modeling
Skill0 starsChanged 5 months agoMITView on GitHub
Systematically identifies threats, trust boundaries, and attack paths for a system before attackers do. Use when designing or reviewing a system's security, adding a feature that handles sensitive data or access, or answering "what could go wrong security-wise here?
Files
Threat Modeling
Security is a property of the whole system under an adversary's choosing, not a feature you add. Model the attacker's goals and capabilities, then find the cheapest path to them — because that's the path they'll take.
Four questions, in order
- What are we building? Draw the data flow: components, data stores, and the trust boundaries they cross (user→app, app→DB, service→service, tenant→tenant). Threats live on boundaries.
- What can go wrong? Walk each boundary with STRIDE: Spoofing (identity), Tampering (integrity), Repudiation (deniability), Information disclosure (confidentiality), Denial of service (availability), Elevation of privilege (authorization).
- What are we going to do about it? Mitigate, accept (with sign-off), transfer, or eliminate. Not every threat warrants a control.
- Did we do it right? Validate the mitigations actually hold against a motivated attacker.
Define the attacker before the defenses
- Who: unauthenticated internet, authenticated user, malicious insider, compromised dependency, another tenant. Each has different access and changes the model entirely.
- Capability and motivation: opportunistic script vs targeted adversary vs nation-state. Don't defend against the wrong tier.
- Assets and goals: what does the attacker want (data, money, disruption, foothold)? Rank by impact × likelihood, and protect the crown jewels first.
Adversarial validation (think like the attacker)
- Trace the highest-value asset backward: from the data an attacker wants, what's the shortest chain of trust to reach it? That chain is your priority.
- Assume one layer is breached: the WAF is bypassed, one service is popped, one credential leaks. Does it cascade to total compromise, or does defense-in-depth contain it?
- Attack the trust assumptions: "internal traffic is trusted", "the client validates this", "this field is always well-formed" — every assumption is an attack surface.
- Abuse the features, don't just find bugs: password reset, sharing links, export, impersonation, and rate-limit-free endpoints are designed functionality that becomes an attack tool.
- Confused deputy: can a low-privilege actor trick a high-privilege component into acting on its behalf (SSRF, IDOR, signed-URL reuse)?
Non-obvious risks
- Client-side controls (validation, hidden fields, disabled buttons) are UX, not security — the attacker controls the client entirely.
- The most damaging breaches chain low-severity issues; a "minor" info leak + a "minor" CSRF can compose into account takeover.
- Trust boundaries are often invisible in the code (a microservice that trusts its caller's auth header without re-verifying).
Output structure
Deliver: the data-flow diagram with trust boundaries marked, the attacker profiles in scope, the STRIDE threats per boundary ranked by impact × likelihood, the highest-value-asset attack path traced, the mitigations (or explicit accept-with-rationale), and the "assume-breach" containment check.
Other versions41 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 41
- briiirussell/cybersecurity-skills★ 489same name
- fr33d3m0n/skill-threat-modeling★ 347same name
- proflead/codex-skills-library★ 153same name
- hardw00t/ai-security-arsenal★ 101same name
- nahid-sparktales/agent-dispatcher★ 59same name
- mn-youssef/security-skills★ 47same name
- kumaran-is/claude-code-onboarding★ 35same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- ulises-jeremias/agent-toolkit★ 19same name
- Indium-AI-Labs/indium-agentkit★ 18same name
31 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use iac-security, container-security and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hardw00tSkilliac-security
Infrastructure-as-Code security scanning router for Terraform, CloudFormation, Kubernetes manifests, Helm, ARM/Bicep. Orchestrates Checkov, tfsec, Terrascan, KICS, kubesec, kube-linter, Polaris, cfn-lint/cfn-nag, and OPA/Conftest. Use when auditing IaC for misconfigurations, scanning Terraform plans, validating K8s security policies, checking cloud infrastructure compliance, or authoring custom policy-as-code (Rego).
Also in 4 projects that use this
vbrevikSkillcontainer-security
Scan container images, Dockerfiles, docker-compose files, and Kubernetes manifests for security misconfigurations and vulnerabilities. Uses Trivy for image/IaC scanning and Kubescape for K8s policy compliance. Falls back to regex-based Dockerfile and K8s YAML analysis when tools are unavailable. Produces STIG V-ID-tagged findings for /stig-compliance pipeline. Use when (1) reviewing Docker or K8s configuration changes, (2) scanning container images for OS-level CVEs, (3) validating K8s RBAC and NetworkPolicy configuration, (4) before deployment. Works air-gapped with pre-downloaded vulnerability database.
Also in 4 projects that use this
wgpsecSkillprompt-injection
AI/LLM 间接 Prompt 注入攻击。当目标 AI 系统会处理外部数据源(网页、文档、邮件、数据库、API 返回)时使用。覆盖间接注入、工具链劫持、RAG 投毒、数据外泄等技术。OWASP LLM Top 10 #1 漏洞类别
Also in 4 projects that use this
allanninalSkillthreat-hunting
Hunt threats using Sigma detection rules and security analysis techniques. Use when investigating security incidents, creating detection rules, or analyzing suspicious activity.
Also in 3 projects that use this
Hack23Skillsecure-code-review
Security code review using OWASP Top 10, input validation, and Hack23 ISMS secure development policy for TypeScript/MCP
Also in 3 projects that use this
jefflesterSkillapi-security
API security best practices and common vulnerability prevention. Enforces security checks for authentication, input validation, SQL injection, XSS, and OWASP Top 10 vulnerabilities. Use when building or modifying APIs.
Also in 3 projects that use this
In this repository29 other files it gives its agents.
- adversarial-code-reviewSkill
- api-contract-designSkill
- attack-surface-mappingSkill
- authn-authz-design-reviewSkill
- benchmark-designSkill
- capacity-scalability-planningSkill
- concurrency-race-analysisSkill
- data-consistency-modelingSkill
- data-exfiltration-analysisSkill
- distributed-consensus-designSkill
- error-handling-architectureSkill
- event-driven-architectureSkill
- experiment-designSkill
- hypothesis-falsificationSkill
- incident-rca-postmortemSkill
- legacy-refactoring-strategySkill
- literature-synthesisSkill
- metrics-designSkill
- multi-layer-caching-strategySkill
- mvp-scope-cuttingSkill
- performance-profilingSkill
- rate-limiting-designSkill
- requirements-disambiguationSkill
- secrets-management-auditSkill
- statistical-validity-analysisSkill
- supply-chain-risk-analysisSkill
- system-decomposition-synthesisSkill
- tradeoff-decision-frameworkSkill
- user-failure-mode-mappingSkill
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
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.

