agentleFS
nledfordnledford/engineering-review-board/skills/threat-modeling/SKILL.md

threat-modeling

Skill11 starsChanged 11 days agoMITView on GitHub

Threat modeling and security design analysis. Use when asked to threat model, identify abuse cases, model actors/assets/data flows/trust boundaries, STRIDE, attack trees, attack surface, security requirements, mitigations, assumptions, or residual risk for new features, systems, integrations, APIs, tenants, uploads, plugins, webhooks, command surfaces, or sensitive-data flows. Do not use for ordinary code review, confirmed vulnerability validation, dependency/SBOM/CVE supply-chain review, language implementation, or third-party API docs.

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use iac-security, container-security and 6 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.
  • hardw00tSkill

    iac-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

  • vbrevikSkill

    container-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

  • wgpsecSkill

    prompt-injection

    AI/LLM 间接 Prompt 注入攻击。当目标 AI 系统会处理外部数据源(网页、文档、邮件、数据库、API 返回)时使用。覆盖间接注入、工具链劫持、RAG 投毒、数据外泄等技术。OWASP LLM Top 10 #1 漏洞类别

    Also in 4 projects that use this

  • allanninalSkill

    threat-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

  • narlyseorgSkill

    secure-code-review

    Use when reviewing source code for security vulnerabilities, performing static analysis of a codebase, auditing code for injection flaws, authentication issues, cryptographic weaknesses, insecure deserialization, SSRF, path traversal, memory safety bugs, hardcoded secrets, or misconfigurations. Use when the user asks to find security bugs in code, assess code quality from a security perspective, or review pull requests for security implications. Use when performing dependency audits, secrets scanning, or configuration review of application source.

    Also in 3 projects that use this

  • jefflesterSkill

    api-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

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill before or during significant trust-boundary changes to reason about security design.

    line 8
  2. Very specific:

    Do not use this skill for ordinary code review, confirmed vulnerability validation, exploit reproduction, or dependency/SBOM/CVE/provenance …

    line 27
  3. Distinctive:

    Lightweight feature threat model: use during design or implementation to map actors, assets, entry points, data flows, trust boundaries, …

    line 40
  4. Distinctive:

    Full security review: use after controls exist or when the task asks for validated findings.

    line 44
  5. Distinctive:

    Prefer a compact model the team can act on:

    line 87

“Common” is measured: kept by at least 6 in 10 of the 40 edited versions of this file we could read. “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 Modeling

Use this skill before or during significant trust-boundary changes to reason about security design. Keep it lightweight for feature work: identify what could go wrong, decide what must be true before ship, and name residual risks. Use security-review and security-review-evidence when findings must be verified against implemented controls and reported with sanitized evidence.

Use When

  • Designing or changing authentication, authorization, tenancy, admin actions, invite/recovery flows, sessions, secrets, tokens, or sensitive-data flows.
  • Adding or changing APIs, webhooks, uploads/downloads, imports/exports, plugins, command execution, browser storage, background jobs, integrations, or external service calls.
  • The user asks for a threat model, abuse cases, STRIDE, attack trees, attack surface, trust boundaries, data flows, mitigations, residual risk, or security acceptance criteria.

Do not use this skill for ordinary code review, confirmed vulnerability validation, exploit reproduction, or dependency/SBOM/CVE/provenance review. Use security-review for concrete implemented-control review and dependency-supply-chain-review for supply-chain risk.

For a photo/video DAM, compose with digital-asset-management to identify media parsing, originals/derivatives, metadata, sharing, cache revocation, and retention data flows before applying threat-modeling methods.

Lightweight vs. Full Review

  • Lightweight feature threat model: use during design or implementation to map actors, assets, entry points, data flows, trust boundaries, abuse cases, mitigations, assumptions, residual risks, and security acceptance criteria. It can be based on design docs, code paths, API contracts, and repository policy.
  • Full security review: use after controls exist or when the task asks for validated findings. Load security-review and security-review-evidence, verify each claim with repository evidence, sanitize artifacts, and report findings through the review format.

Workflow

  1. Inspect local sources first: SECURITY.md, architecture docs, threat models, auth/permission docs, API specs, data classification notes, deployment docs, tests, review templates, and relevant code paths. Do not read or print secrets.
  2. Define scope: feature/system, in-scope actors, out-of-scope systems, environments, data classes, assumptions, and open questions.
  3. Map the system:
    • actors and identities, including anonymous, authenticated, tenant, admin, service, integration, and malicious users;
    • assets and security properties: confidentiality, integrity, availability, privacy, auditability, tenant isolation, and non-repudiation;
    • entry points and attacker-controlled inputs: HTTP/RPC, files, URLs, CLI, queues, webhooks, plugins, templates, browser state, environment variables, and third-party callbacks;
    • trust boundaries and privilege changes between client/server, tenant/admin, app/database, worker/queue, internal/external service, host/container, browser/server, and user-supplied/generated content;
    • data flows, storage, logs, telemetry, caches, exports, backups, retention, and deletion paths.
  4. Enumerate abuse cases. Use STRIDE, attack trees, misuse cases, or attack-surface review only as tools; keep each case tied to an actor, entry point, affected asset, violated security property, and plausible path.
  5. Select mitigations proportional to risk: server-side authorization, least-privilege scopes, input validation and canonicalization, structured APIs, rate limits, replay protection, CSRF/CORS/CSP, safe file handling, sandboxing, encryption, secret lifecycle controls, logging redaction, audit events, monitoring, rollback, and operational runbooks.
  6. Convert mitigations into security acceptance criteria: tests, policy checks, review gates, config assertions, migration checks, observability requirements, rollout constraints, and explicit non-goals.
  7. Record residual risk with owner, expiry/revisit trigger, compensating controls, and what evidence would be needed to close it. Escalate to full security review when a risk is concrete, disputed, high impact, or control verification matters.

Output Shape

Prefer a compact model the team can act on:

  • Scope and assumptions
  • Actors and assets
  • Entry points, trust boundaries, and data flows
  • Abuse cases and impact
  • Mitigations and security acceptance criteria
  • Residual risks, owners, and review handoffs

Anti-Patterns

  • Producing a generic vulnerability checklist without the local actors, assets, entry points, trust boundaries, and data flows.
  • Treating a design-time abuse case as a verified vulnerability without evidence.
  • Requiring heavyweight security review ceremony for a small feature when a short model and concrete acceptance criteria are enough.
  • Omitting residual risk, assumptions, or the handoff to verified security-review findings.
  • Printing secrets, raw tokens, private host paths, credentialed URLs, or raw security artifacts while modeling risk.

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.