skills/appsec-threat-model/SKILL.md
# OWASP AppSec Threat Model Skill > Systematic application security analysis against OWASP Top 10 (2021). Produces per-component threat assessments with concrete mitigations tied to the codebase. ## Trigger Invoke when: a Build Brief task touches authentication, authorization, data handling, user input processing, external API consumption, session management, or deployment configuration. Also invoke on any task flagged `security-relevant` by the Eval Council. ## Input Contract ```json { "
npx skillsauth add bigeasyfreeman/adlc skills/appsec-threat-modelInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Systematic application security analysis against OWASP Top 10 (2021). Produces per-component threat assessments with concrete mitigations tied to the codebase.
Invoke when: a Build Brief task touches authentication, authorization, data handling, user input processing, external API consumption, session management, or deployment configuration. Also invoke on any task flagged security-relevant by the Eval Council.
{
"task_spec": "TaskSpec from Build Brief",
"repo_map": "Cached codebase research output",
"affected_files": ["list of files this task creates or modifies"],
"integration_wiring": "upstream/downstream from task spec"
}
The skill evaluates each task against all 10 categories. Categories not applicable to the task are marked N/A with justification.
Project-specific example: Tool endpoints must enforce role-based access. Backend APIs must not expose admin operations without token verification. Gateway/channel adapters must verify sender identity before dispatching.
Project-specific example: A credential gateway should handle all secret injection. State stores must not contain plaintext tokens. LLM API keys must flow through a vault, never env vars in code.
Project-specific example: Issue tracker bodies are untrusted input -- they may flow into LLM prompts and must be sanitized. Executor prompts must escape any user-supplied content. Tool parameters must be schema-validated before dispatch.
Project-specific example: Pipeline designs must enforce gate separation. No single agent should have both read and write access to production systems. Multi-perspective validation (e.g., an Eval Council) before action is a security design pattern.
Project-specific example: Project config files must not contain secrets. Docker deployment must not use --privileged. Internal API servers must not expose debug endpoints in production. Default merge policy must be restrictive.
Project-specific example: pyproject.toml dependencies must specify minimum versions. package.json must use a lockfile. LLM provider SDKs must be current.
Project-specific example: Auth tokens must be cryptographically generated. Device pairing must enforce approval flow. Backend APIs must reject unauthenticated requests.
Project-specific example: If your system processes its own PRs (self-development), PR governance validation must not be bypassable. Executor output must be treated as untrusted (code review gates). Learning systems must validate data integrity before updating policy.
Project-specific example: Structured log events must cover all gate decisions, executor invocations, merge actions, and learning updates. An audit trail (e.g., journal writer) is essential. Secret redaction must apply to all log sinks.
Project-specific example: Tracker adapters and webhook endpoints must validate all URLs. Gateways must not proxy arbitrary URLs from channel messages. LLM tool-use responses that contain URLs must be validated before fetch.
{
"task_id": "string",
"threat_assessment": {
"A01_access_control": { "applicable": true, "risk": "HIGH|MEDIUM|LOW|N/A", "findings": [], "mitigations": [] },
"A02_crypto": { "applicable": true, "risk": "...", "findings": [], "mitigations": [] },
"A03_injection": { "...": "..." },
"A04_insecure_design": { "...": "..." },
"A05_misconfiguration": { "...": "..." },
"A06_vulnerable_components": { "...": "..." },
"A07_auth_failures": { "...": "..." },
"A08_integrity_failures": { "...": "..." },
"A09_logging_monitoring": { "...": "..." },
"A10_ssrf": { "...": "..." }
},
"overall_risk": "HIGH|MEDIUM|LOW",
"blocking_findings": ["findings that must be resolved before merge"],
"advisory_findings": ["findings to address in follow-up tickets"]
}
contract_version with semver rules from docs/specs/skill-contract-versioning.md.docs/schemas/security-assessment.schema.json before publishing to downstream consumers.docs/specs/stop-reasons.md for deterministic pipeline behavior.development
Discovers and records repo-local approved build paths so agents reuse proven patterns instead of inventing parallel architectures.
development
Scoped maintenance for docs/solutions entries when stale signals, refactors, or explicit user scope require refresh.
documentation
Conditionally captures verified reusable ADLC learnings into docs/solutions after successful closeout.
development
Uses Graphify as ADLC's graph-backed research layer and Beads as an optional dependency-aware task memory layer. Produces evidence for compatibility, reuse, accuracy, dark-code hotspots, and long-horizon handoff.