[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M754XMB6Q0J2V9FBW1SAVPZQ":3,"skill-same:01M754XMB6Q0J2V9FBW1SAVPZQ":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":50},"01M754XMB6Q0J2V9FBW1SAVPZQ","x-model-threats",null,"Generate threat models using STRIDE analysis: identify components, map data flows, analyze threats per category, classify severity, suggest mitigations, and produce threat model document.","review-bench\u002Federcnj_ia-dev-environment","review-bench","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F286778065?v=4","01M7517F9NTEPDZDAXJBR30FWT","ReviewBench","01M7517FAC9F4P7TGWCNJ8VYVW",0,"MIT","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-fintech-pci\u002F.claude\u002Fskills\u002Fx-model-threats\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: x-model-threats\ndescription: \"Generate threat models using STRIDE analysis: identify components, map data flows, analyze threats per category, classify severity, suggest mitigations, and produce threat model document.\"\nuser-invocable: true\nallowed-tools: Read, Write, Glob, Grep, Agent\nargument-hint: \"[architecture-plan-path] [--format stride|pasta|linddun] [--output results\u002Fsecurity\u002F]\"\ncontext-budget: medium\nrequires-capabilities: []\n---\n\n## Global Output Policy\n\n- **Language**: English ONLY.\n- **Tone**: Technical, Direct, and Concise.\n- **Efficiency**: Remove all conversational fillers and greetings to save tokens.\n\n# Skill: Threat Model (STRIDE Analysis)\n\n## Purpose\n\nGenerates automated threat models for {{PROJECT_NAME}} using STRIDE analysis. Identifies components, maps data flows, analyzes threats per STRIDE category, classifies severity, suggests mitigations, and produces a structured threat model document.\n\n## Triggers\n\n- `\u002Fx-model-threats` — analyze codebase and generate STRIDE threat model\n- `\u002Fx-model-threats steering\u002Fplan.md` — generate from architecture plan\n- `\u002Fx-model-threats --format stride` — STRIDE analysis (default)\n- `\u002Fx-model-threats --format pasta` — PASTA analysis (risk-centric)\n- `\u002Fx-model-threats --format linddun` — LINDDUN analysis (privacy-focused)\n- `\u002Fx-model-threats --output results\u002Fsecurity\u002F` — specify output directory\n\n## Parameters\n\n| Parameter | Type | Default | Values | Description |\n|-----------|------|---------|--------|-------------|\n| `path` | String | none | file path | Architecture plan path (optional) |\n| `--format` | String | stride | stride, pasta, linddun | Analysis methodology |\n| `--output` | String | results\u002Fsecurity\u002F | directory path | Output directory for threat model |\n\n## Workflow\n\n```\n1. READ       -> Read architecture plan or discover components from codebase\n2. IDENTIFY   -> Extract system components (services, databases, APIs, brokers, caches)\n3. MAP        -> Map data flows, trust boundaries, and communication protocols\n4. ANALYZE    -> Apply STRIDE analysis per component (6 categories)\n5. CLASSIFY   -> Classify each threat by severity (CRITICAL\u002FHIGH\u002FMEDIUM\u002FLOW)\n6. MITIGATE   -> Suggest mitigations referencing security KP\n7. GENERATE   -> Produce threat model document with Threat Matrix\n```\n\n### Step 1 — Read Architecture Plan\n\nIf a path argument is provided, read the architecture plan directly:\n\n```bash\n# Read explicit path\ncat steering\u002Fplan.md\n```\n\nIf no path is provided, discover automatically:\n\n1. Search `steering\u002F` for architecture plans\n2. Search for ADRs in `adr\u002F`\n3. If no plan exists, **fallback to codebase analysis**: scan package structure, configuration files, and dependency declarations to identify components\n\n**Fallback — Codebase Analysis:**\n\nWhen no architecture plan is available, analyze the codebase directly:\n\n- Scan package\u002Fmodule structure to identify services and layers\n- Read configuration files (application.yaml, docker-compose.yml, k8s manifests)\n- Identify external integrations from dependency declarations\n- Map communication protocols from adapter implementations\n\n### Step 2 — Identify Components\n\nExtract all system components:\n\n| Component Type | Discovery Method |\n|----------------|------------------|\n| Services | Package structure, deployment configs |\n| Databases | Connection configs, ORM entities |\n| External APIs | HTTP client configurations, API specs |\n| Message Brokers | Producer\u002Fconsumer configs |\n| Caches | Cache configuration, Redis\u002FMemcached clients |\n| API Gateway | Ingress\u002Fgateway configurations |\n| Auth Service | Security configurations, OAuth\u002FOIDC setup |\n| File Storage | S3\u002Fblob storage client configurations |\n\n### Step 3 — Map Data Flows and Trust Boundaries\n\nFor each component pair, identify:\n\n- **Protocol**: HTTP\u002FHTTPS, gRPC, TCP, AMQP, WebSocket\n- **Data sensitivity**: PII, financial, credentials, public\n- **Trust boundary**: Internal (same network), External (public internet), DMZ\n- **Authentication**: mTLS, JWT, API key, none\n\nTrust Boundary Categories:\n\n| Boundary | Description | Risk Level |\n|----------|-------------|------------|\n| External to Internal | Public internet to internal services | HIGH |\n| Internal to Internal | Service-to-service within trust zone | MEDIUM |\n| Internal to External | Outbound to third-party APIs | MEDIUM |\n| User to System | End-user interaction points | HIGH |\n\n### Step 4 — Analyze with STRIDE\n\nApply STRIDE analysis to each component. For every component, evaluate all 6 categories:\n\n#### 4.1 — S (Spoofing — Identity and Authentication)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Token forgery | Forged JWT, stolen session | API Gateway, Auth Service |\n| Session hijacking | Cookie theft, session fixation | Web endpoints |\n| Identity impersonation | Spoofed service identity | Service-to-service calls |\n| Credential stuffing | Brute force with leaked creds | Login endpoints |\n\n**Mitigations:** Strong authentication (OAuth 2.0\u002FOIDC), mTLS for service-to-service, token rotation, rate limiting on auth endpoints.\n\n#### 4.2 — T (Tampering — Data Integrity)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| SQL injection | Malicious SQL in input | Database adapters |\n| Request tampering | Modified request payload | API endpoints |\n| Man-in-the-middle | Intercepted unencrypted traffic | All network calls |\n| Data corruption | Unauthorized data modification | Database, file storage |\n\n**Mitigations:** Input validation, parameterized queries, TLS everywhere, request signing, integrity checksums.\n\n#### 4.3 — R (Repudiation — Audit and Traceability)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Insufficient logging | Actions not recorded | All services |\n| Log tampering | Modified audit logs | Logging infrastructure |\n| Non-attributable actions | Actions without user identity | Background jobs, async |\n| Missing timestamps | Events without temporal context | Event producers |\n\n**Mitigations:** Structured logging with correlation IDs, immutable audit logs, distributed tracing, event sourcing for critical operations.\n\n#### 4.4 — I (Information Disclosure — Confidentiality)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Data leakage | PII in logs, verbose errors | All services |\n| Excessive exposure | Over-fetching in API responses | API endpoints |\n| Cache poisoning | Sensitive data in shared cache | Cache layer |\n| Side-channel attacks | Timing attacks, error messages | Auth, crypto operations |\n\n**Mitigations:** Data classification, field-level encryption, response filtering, error sanitization per security KP.\n\n#### 4.5 — D (Denial of Service — Availability)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Resource exhaustion | Unbounded queries, large payloads | Database, API endpoints |\n| DDoS | Volumetric attacks on public endpoints | API Gateway |\n| Cascading failure | Uncontrolled retry storms | Service mesh |\n| Deadlock\u002Flivelock | Resource contention | Database, message broker |\n\n**Mitigations:** Rate limiting, circuit breakers, bulkheads, request size limits, connection pooling, auto-scaling.\n\n#### 4.6 — E (Elevation of Privilege — Authorization)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Broken access control | IDOR, missing authz checks | API endpoints |\n| Privilege escalation | Regular user gaining admin | Auth Service, RBAC |\n| Insecure defaults | Overly permissive roles | Configuration |\n| JWT claim manipulation | Modified role claims | Token-based auth |\n\n**Mitigations:** RBAC\u002FABAC enforcement, least privilege principle, authorization at every layer, claim validation.\n\n### Step 5 — Classify Threat Severity\n\nClassify each identified threat using impact x probability:\n\n| Severity | Impact | Probability | Action Required |\n|----------|--------|-------------|-----------------|\n| **CRITICAL** | High impact + high probability | Exploit known\u002Feasy | Fix before release |\n| **HIGH** | High impact or high probability | Exploit possible | Fix in current sprint |\n| **MEDIUM** | Moderate impact | Exploit requires effort | Fix in next sprint |\n| **LOW** | Low impact | Exploit unlikely | Track in backlog |\n\n**Impact Assessment Criteria:**\n\n| Factor | HIGH | MEDIUM | LOW |\n|--------|------|--------|-----|\n| Data exposure | PII, credentials, financial | Internal metadata | Public data |\n| Service impact | Complete outage | Degraded performance | Minor feature |\n| Blast radius | Multiple services affected | Single service | Single endpoint |\n| Regulatory | GDPR\u002FSOX\u002FPCI violation | Audit finding | Best practice gap |\n\n### Step 6 — Mitigate with Security KP References\n\nFor each identified threat, suggest concrete mitigations referencing the security knowledge pack:\n\n| STRIDE Category | Security KP Section | Key Mitigations |\n|-----------------|---------------------|-----------------|\n| Spoofing | Authentication and Identity | OAuth 2.0, mTLS, token rotation |\n| Tampering | Input Validation | Parameterized queries, request signing |\n| Repudiation | Logging and Audit | Structured logging, distributed tracing |\n| Information Disclosure | Data Protection | Encryption at rest\u002Ftransit, data masking |\n| Denial of Service | Resilience Patterns | Rate limiting, circuit breakers |\n| Elevation of Privilege | Authorization | RBAC, least privilege, claim validation |\n\n### Step 7 — Generate Threat Model Document\n\nGenerate the threat model document at the specified output path (default: `results\u002Fsecurity\u002Fthreat-model.md`).\n\n**Document Structure:**\n\n```markdown\n# Threat Model — {{PROJECT_NAME}}\n\n**Date:** YYYY-MM-DD\n**Methodology:** STRIDE\n**Scope:** [components analyzed]\n\n## Executive Summary\n\n[High-level risk overview with counts per severity]\n\n## System Overview\n\n[Components, data flows, trust boundaries diagram]\n\n## Threat Matrix\n\n| Component | S | T | R | I | D | E |\n|-----------|---|---|---|---|---|---|\n| API Gateway | HIGH | MEDIUM | LOW | MEDIUM | CRITICAL | HIGH |\n| Auth Service | CRITICAL | HIGH | MEDIUM | HIGH | MEDIUM | CRITICAL |\n| Database | LOW | HIGH | MEDIUM | HIGH | MEDIUM | LOW |\n| Message Broker | LOW | MEDIUM | MEDIUM | LOW | HIGH | LOW |\n\n## Detailed Findings\n\n### [TM-001] {Component} — {Threat Title}\n- **STRIDE Category:** Spoofing\n- **Severity:** CRITICAL\n- **Description:** {detailed description}\n- **Attack Vector:** {how the threat could be exploited}\n- **Mitigation:** {concrete mitigation steps}\n- **Security KP Reference:** {section reference}\n\n## Risk Summary\n\n| Severity | Count | Status |\n|----------|-------|--------|\n| CRITICAL | N | Fix before release |\n| HIGH | N | Fix in current sprint |\n| MEDIUM | N | Fix in next sprint |\n| LOW | N | Track in backlog |\n\n## Recommendations\n\n1. **Immediate:** Address CRITICAL findings\n2. **Short-term:** Resolve HIGH findings\n3. **Long-term:** Review MEDIUM\u002FLOW findings\n```\n\n## Supported Formats\n\n### STRIDE (Default)\n\nStandard threat modeling analyzing 6 categories: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege.\n\n### PASTA (Process for Attack Simulation and Threat Analysis)\n\nRisk-centric methodology with 7 stages:\n\n1. Define objectives\n2. Define technical scope\n3. Application decomposition\n4. Threat analysis\n5. Vulnerability analysis\n6. Attack modeling\n7. Risk and impact analysis\n\n### LINDDUN (Privacy-Focused)\n\nPrivacy threat modeling covering:\n\n- **L**inkability — Can actions be linked to an individual?\n- **I**dentifiability — Can a person be identified?\n- **N**on-repudiation — Can a person deny an action?\n- **D**etectability — Can the existence of data be detected?\n- **D**isclosure of information — Is data exposed?\n- **U**nawareness — Is the user unaware of data processing?\n- **N**on-compliance — Are privacy regulations violated?\n\n## Error Handling\n\n| Scenario | Action |\n|----------|--------|\n| No architecture plan found | Fallback to codebase analysis |\n| Empty or invalid plan | Warn and attempt codebase analysis |\n| No components identified | Report \"No components found\" with suggestions |\n| Partial analysis | Generate partial threat model, note gaps |\n| Unknown format requested | Default to STRIDE, warn user |\n\n## Knowledge Pack References\n\n| # | Knowledge Pack | Path | Purpose |\n|---|----------------|------|---------|\n| 1 | Security | `knowledge\u002Fsecurity\u002Findex.md` | Mitigation recommendations and OWASP references |\n| 2 | Security References | `knowledge\u002Fsecurity\u002Fapplication-security.md` | Detailed security controls and patterns |\n\n## Integration Notes\n\n| Skill | Relationship | Context |\n|-------|-------------|---------|\n| x-plan-architecture | Invoked from | Threat model can be generated as part of architecture planning |\n| security-engineer agent | Delegates to | Uses security-engineer agent for in-depth analysis via Agent tool |\n| x-scan-owasp | Complements | Threat model informs A04 (Insecure Design) verification in OWASP scan |\n","## Global Output Policy\n\n- **Language**: English ONLY.\n- **Tone**: Technical, Direct, and Concise.\n- **Efficiency**: Remove all conversational fillers and greetings to save tokens.\n\n# Skill: Threat Model (STRIDE Analysis)\n\n## Purpose\n\nGenerates automated threat models for {{PROJECT_NAME}} using STRIDE analysis. Identifies components, maps data flows, analyzes threats per STRIDE category, classifies severity, suggests mitigations, and produces a structured threat model document.\n\n## Triggers\n\n- `\u002Fx-model-threats` — analyze codebase and generate STRIDE threat model\n- `\u002Fx-model-threats steering\u002Fplan.md` — generate from architecture plan\n- `\u002Fx-model-threats --format stride` — STRIDE analysis (default)\n- `\u002Fx-model-threats --format pasta` — PASTA analysis (risk-centric)\n- `\u002Fx-model-threats --format linddun` — LINDDUN analysis (privacy-focused)\n- `\u002Fx-model-threats --output results\u002Fsecurity\u002F` — specify output directory\n\n## Parameters\n\n| Parameter | Type | Default | Values | Description |\n|-----------|------|---------|--------|-------------|\n| `path` | String | none | file path | Architecture plan path (optional) |\n| `--format` | String | stride | stride, pasta, linddun | Analysis methodology |\n| `--output` | String | results\u002Fsecurity\u002F | directory path | Output directory for threat model |\n\n## Workflow\n\n```\n1. READ       -> Read architecture plan or discover components from codebase\n2. IDENTIFY   -> Extract system components (services, databases, APIs, brokers, caches)\n3. MAP        -> Map data flows, trust boundaries, and communication protocols\n4. ANALYZE    -> Apply STRIDE analysis per component (6 categories)\n5. CLASSIFY   -> Classify each threat by severity (CRITICAL\u002FHIGH\u002FMEDIUM\u002FLOW)\n6. MITIGATE   -> Suggest mitigations referencing security KP\n7. GENERATE   -> Produce threat model document with Threat Matrix\n```\n\n### Step 1 — Read Architecture Plan\n\nIf a path argument is provided, read the architecture plan directly:\n\n```bash\n# Read explicit path\ncat steering\u002Fplan.md\n```\n\nIf no path is provided, discover automatically:\n\n1. Search `steering\u002F` for architecture plans\n2. Search for ADRs in `adr\u002F`\n3. If no plan exists, **fallback to codebase analysis**: scan package structure, configuration files, and dependency declarations to identify components\n\n**Fallback — Codebase Analysis:**\n\nWhen no architecture plan is available, analyze the codebase directly:\n\n- Scan package\u002Fmodule structure to identify services and layers\n- Read configuration files (application.yaml, docker-compose.yml, k8s manifests)\n- Identify external integrations from dependency declarations\n- Map communication protocols from adapter implementations\n\n### Step 2 — Identify Components\n\nExtract all system components:\n\n| Component Type | Discovery Method |\n|----------------|------------------|\n| Services | Package structure, deployment configs |\n| Databases | Connection configs, ORM entities |\n| External APIs | HTTP client configurations, API specs |\n| Message Brokers | Producer\u002Fconsumer configs |\n| Caches | Cache configuration, Redis\u002FMemcached clients |\n| API Gateway | Ingress\u002Fgateway configurations |\n| Auth Service | Security configurations, OAuth\u002FOIDC setup |\n| File Storage | S3\u002Fblob storage client configurations |\n\n### Step 3 — Map Data Flows and Trust Boundaries\n\nFor each component pair, identify:\n\n- **Protocol**: HTTP\u002FHTTPS, gRPC, TCP, AMQP, WebSocket\n- **Data sensitivity**: PII, financial, credentials, public\n- **Trust boundary**: Internal (same network), External (public internet), DMZ\n- **Authentication**: mTLS, JWT, API key, none\n\nTrust Boundary Categories:\n\n| Boundary | Description | Risk Level |\n|----------|-------------|------------|\n| External to Internal | Public internet to internal services | HIGH |\n| Internal to Internal | Service-to-service within trust zone | MEDIUM |\n| Internal to External | Outbound to third-party APIs | MEDIUM |\n| User to System | End-user interaction points | HIGH |\n\n### Step 4 — Analyze with STRIDE\n\nApply STRIDE analysis to each component. For every component, evaluate all 6 categories:\n\n#### 4.1 — S (Spoofing — Identity and Authentication)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Token forgery | Forged JWT, stolen session | API Gateway, Auth Service |\n| Session hijacking | Cookie theft, session fixation | Web endpoints |\n| Identity impersonation | Spoofed service identity | Service-to-service calls |\n| Credential stuffing | Brute force with leaked creds | Login endpoints |\n\n**Mitigations:** Strong authentication (OAuth 2.0\u002FOIDC), mTLS for service-to-service, token rotation, rate limiting on auth endpoints.\n\n#### 4.2 — T (Tampering — Data Integrity)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| SQL injection | Malicious SQL in input | Database adapters |\n| Request tampering | Modified request payload | API endpoints |\n| Man-in-the-middle | Intercepted unencrypted traffic | All network calls |\n| Data corruption | Unauthorized data modification | Database, file storage |\n\n**Mitigations:** Input validation, parameterized queries, TLS everywhere, request signing, integrity checksums.\n\n#### 4.3 — R (Repudiation — Audit and Traceability)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Insufficient logging | Actions not recorded | All services |\n| Log tampering | Modified audit logs | Logging infrastructure |\n| Non-attributable actions | Actions without user identity | Background jobs, async |\n| Missing timestamps | Events without temporal context | Event producers |\n\n**Mitigations:** Structured logging with correlation IDs, immutable audit logs, distributed tracing, event sourcing for critical operations.\n\n#### 4.4 — I (Information Disclosure — Confidentiality)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Data leakage | PII in logs, verbose errors | All services |\n| Excessive exposure | Over-fetching in API responses | API endpoints |\n| Cache poisoning | Sensitive data in shared cache | Cache layer |\n| Side-channel attacks | Timing attacks, error messages | Auth, crypto operations |\n\n**Mitigations:** Data classification, field-level encryption, response filtering, error sanitization per security KP.\n\n#### 4.5 — D (Denial of Service — Availability)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Resource exhaustion | Unbounded queries, large payloads | Database, API endpoints |\n| DDoS | Volumetric attacks on public endpoints | API Gateway |\n| Cascading failure | Uncontrolled retry storms | Service mesh |\n| Deadlock\u002Flivelock | Resource contention | Database, message broker |\n\n**Mitigations:** Rate limiting, circuit breakers, bulkheads, request size limits, connection pooling, auto-scaling.\n\n#### 4.6 — E (Elevation of Privilege — Authorization)\n\n| Threat | Example | Affected Components |\n|--------|---------|---------------------|\n| Broken access control | IDOR, missing authz checks | API endpoints |\n| Privilege escalation | Regular user gaining admin | Auth Service, RBAC |\n| Insecure defaults | Overly permissive roles | Configuration |\n| JWT claim manipulation | Modified role claims | Token-based auth |\n\n**Mitigations:** RBAC\u002FABAC enforcement, least privilege principle, authorization at every layer, claim validation.\n\n### Step 5 — Classify Threat Severity\n\nClassify each identified threat using impact x probability:\n\n| Severity | Impact | Probability | Action Required |\n|----------|--------|-------------|-----------------|\n| **CRITICAL** | High impact + high probability | Exploit known\u002Feasy | Fix before release |\n| **HIGH** | High impact or high probability | Exploit possible | Fix in current sprint |\n| **MEDIUM** | Moderate impact | Exploit requires effort | Fix in next sprint |\n| **LOW** | Low impact | Exploit unlikely | Track in backlog |\n\n**Impact Assessment Criteria:**\n\n| Factor | HIGH | MEDIUM | LOW |\n|--------|------|--------|-----|\n| Data exposure | PII, credentials, financial | Internal metadata | Public data |\n| Service impact | Complete outage | Degraded performance | Minor feature |\n| Blast radius | Multiple services affected | Single service | Single endpoint |\n| Regulatory | GDPR\u002FSOX\u002FPCI violation | Audit finding | Best practice gap |\n\n### Step 6 — Mitigate with Security KP References\n\nFor each identified threat, suggest concrete mitigations referencing the security knowledge pack:\n\n| STRIDE Category | Security KP Section | Key Mitigations |\n|-----------------|---------------------|-----------------|\n| Spoofing | Authentication and Identity | OAuth 2.0, mTLS, token rotation |\n| Tampering | Input Validation | Parameterized queries, request signing |\n| Repudiation | Logging and Audit | Structured logging, distributed tracing |\n| Information Disclosure | Data Protection | Encryption at rest\u002Ftransit, data masking |\n| Denial of Service | Resilience Patterns | Rate limiting, circuit breakers |\n| Elevation of Privilege | Authorization | RBAC, least privilege, claim validation |\n\n### Step 7 — Generate Threat Model Document\n\nGenerate the threat model document at the specified output path (default: `results\u002Fsecurity\u002Fthreat-model.md`).\n\n**Document Structure:**\n\n```markdown\n# Threat Model — {{PROJECT_NAME}}\n\n**Date:** YYYY-MM-DD\n**Methodology:** STRIDE\n**Scope:** [components analyzed]\n\n## Executive Summary\n\n[High-level risk overview with counts per severity]\n\n## System Overview\n\n[Components, data flows, trust boundaries diagram]\n\n## Threat Matrix\n\n| Component | S | T | R | I | D | E |\n|-----------|---|---|---|---|---|---|\n| API Gateway | HIGH | MEDIUM | LOW | MEDIUM | CRITICAL | HIGH |\n| Auth Service | CRITICAL | HIGH | MEDIUM | HIGH | MEDIUM | CRITICAL |\n| Database | LOW | HIGH | MEDIUM | HIGH | MEDIUM | LOW |\n| Message Broker | LOW | MEDIUM | MEDIUM | LOW | HIGH | LOW |\n\n## Detailed Findings\n\n### [TM-001] {Component} — {Threat Title}\n- **STRIDE Category:** Spoofing\n- **Severity:** CRITICAL\n- **Description:** {detailed description}\n- **Attack Vector:** {how the threat could be exploited}\n- **Mitigation:** {concrete mitigation steps}\n- **Security KP Reference:** {section reference}\n\n## Risk Summary\n\n| Severity | Count | Status |\n|----------|-------|--------|\n| CRITICAL | N | Fix before release |\n| HIGH | N | Fix in current sprint |\n| MEDIUM | N | Fix in next sprint |\n| LOW | N | Track in backlog |\n\n## Recommendations\n\n1. **Immediate:** Address CRITICAL findings\n2. **Short-term:** Resolve HIGH findings\n3. **Long-term:** Review MEDIUM\u002FLOW findings\n```\n\n## Supported Formats\n\n### STRIDE (Default)\n\nStandard threat modeling analyzing 6 categories: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege.\n\n### PASTA (Process for Attack Simulation and Threat Analysis)\n\nRisk-centric methodology with 7 stages:\n\n1. Define objectives\n2. Define technical scope\n3. Application decomposition\n4. Threat analysis\n5. Vulnerability analysis\n6. Attack modeling\n7. Risk and impact analysis\n\n### LINDDUN (Privacy-Focused)\n\nPrivacy threat modeling covering:\n\n- **L**inkability — Can actions be linked to an individual?\n- **I**dentifiability — Can a person be identified?\n- **N**on-repudiation — Can a person deny an action?\n- **D**etectability — Can the existence of data be detected?\n- **D**isclosure of information — Is data exposed?\n- **U**nawareness — Is the user unaware of data processing?\n- **N**on-compliance — Are privacy regulations violated?\n\n## Error Handling\n\n| Scenario | Action |\n|----------|--------|\n| No architecture plan found | Fallback to codebase analysis |\n| Empty or invalid plan | Warn and attempt codebase analysis |\n| No components identified | Report \"No components found\" with suggestions |\n| Partial analysis | Generate partial threat model, note gaps |\n| Unknown format requested | Default to STRIDE, warn user |\n\n## Knowledge Pack References\n\n| # | Knowledge Pack | Path | Purpose |\n|---|----------------|------|---------|\n| 1 | Security | `knowledge\u002Fsecurity\u002Findex.md` | Mitigation recommendations and OWASP references |\n| 2 | Security References | `knowledge\u002Fsecurity\u002Fapplication-security.md` | Detailed security controls and patterns |\n\n## Integration Notes\n\n| Skill | Relationship | Context |\n|-------|-------------|---------|\n| x-plan-architecture | Invoked from | Threat model can be generated as part of architecture planning |\n| security-engineer agent | Delegates to | Uses security-engineer agent for in-depth analysis via Agent tool |\n| x-scan-owasp | Complements | Threat model informs A04 (Insecure Design) verification in OWASP scan |\n",{"name":5,"description":7,"allowed-tools":24,"argument-hint":25,"context-budget":26,"user-invocable":27,"requires-capabilities":28},"Read, Write, Glob, Grep, Agent","[architecture-plan-path] [--format stride|pasta|linddun] [--output results\u002Fsecurity\u002F]","medium",true,[],"main","952a630c6f38d193a349d86fa18db1de8843e837","src\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-fintech-pci\u002F.claude\u002Fskills\u002Fx-model-threats",1,"https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment","https:\u002F\u002Fgithub.com\u002Freview-bench","https:\u002F\u002Freview-bench.ai","An open benchmark for AI code review.","2026-10-27 06:56:37",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":27},[40,43,46],{"tool":41,"command":42},"npx","npx skills add review-bench\u002Federcnj_ia-dev-environment --skill x-model-threats",{"tool":44,"command":45},"bunx","bunx skills add review-bench\u002Federcnj_ia-dev-environment --skill x-model-threats",{"tool":47,"command":48},"pnpm","pnpm dlx skills add review-bench\u002Federcnj_ia-dev-environment --skill x-model-threats","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-fintech-pci\u002F.claude\u002Fskills\u002Fx-model-threats\u002FSKILL.md",[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"README.md","REFERENCE","参考文档",2011,"https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-fintech-pci\u002F.claude\u002Fskills\u002Fx-model-threats\u002FREADME.md",[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M757M8J48TQ1Y3X25GSJBXAS","x-parallel-eval","Detects and classifies file-collision risks between work units (tasks, stories, or epic phases) before parallel execution. Reads ## File Footprint blocks produced by x-task-plan \u002F x-story-plan, applies the parallelism-heuristics knowledge pack (hard \u002F regen \u002F soft categories + hotspot overrides), and emits a collision matrix + serialization recommendation in Markdown (default) or JSON.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fx-parallel-eval\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M757M57XMR9546S69466HDWT","parallelism-heuristics","Canonical catalog of file-collision heuristics for parallel task, story, and epic execution. Defines the File Footprint block format, the three Conflict Categories (hard \u002F regen \u002F soft), a hotspot list of high-contention paths, and the degrade-with-warning policy. Consumed by x-task-plan, x-story-plan, x-epic-map, x-parallel-eval, and x-dev-*-implement.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fparallelism-heuristics\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M757M11SZ8P1VCQABT08QVYA","x-watch-pr-ci","Polls a PR's CI checks and Copilot review status, blocking until checks complete or timeout. Returns one of 8 stable exit codes (SUCCESS=0, CI_PENDING_PROCEED=10, CI_FAILED=20, TIMEOUT=30, PR_ALREADY_MERGED=40, NO_CI_CONFIGURED=50, PR_CLOSED=60, PR_NOT_FOUND=70). Writes a versioned state-file for session resume.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-watch-pr-ci\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M757KW53K8KFPGADFB4PH949","x-validate-docs","Documentation freshness gate: validates 6 dimensions (readme, api-specs, grpc-proto, adr, skill-docs, system-architecture) against code changes in a PR. Stack-aware — only validates targets declared\u002Fauto-detected from ProjectConfig.documentation.targets. Returns exit non-zero on staleness; produces structured report.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-validate-docs\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M757KQZHSA10MKC0CR571D60","x-update-system-architecture","Incrementally updates docs\u002Farchitecture\u002Fsystem.md after an epic completes. Appends new entries to the Decision Log (§11) using x-internal-write-report --append (dedup by ## ID: marker) and surgically inserts component\u002Fintegration changes into sections 1-10 via Edit. Idempotent: re-running with the same epic produces a byte-identical system.md.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-update-system-architecture\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M757KKBT5Q1SVF8DMJBVF46M","x-update-architecture","Incrementally updates the service architecture document with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content. Use after implementation to keep architecture documentation current.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-update-architecture\u002FSKILL.md",[],[]]