[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FCD62PC362788KAXE6FQM4":3,"skill-same:01M6FCD62PC362788KAXE6FQM4":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":36,"commitSha":59,"skillDirectory":60,"forksCount":61,"repositoryHtmlUrl":62,"repositoryHomepageUrl":6,"ownerHtmlUrl":63,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":64,"install":65,"resources":78},"01M6FCD62PC362788KAXE6FQM4","threat-modeling",null,"Conduct threat modeling using STRIDE methodology. Identify threats, assess risks, and design security controls. Use when designing secure systems or assessing application security.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-threat-modeling\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"threat modeling","threat","modeling","community","2026","when","design security","relevant","assess","scripts","scope","critical","active","main","design","agent-skills","only","devops-security","license","assessment","secure","security","application security","2026-11-10 10:12:30",false,"---\nname: threat-modeling\ndescription: Conduct threat modeling using STRIDE methodology. Identify threats, assess\n  risks, and design security controls. Use when designing secure systems or assessing\n  application security.\ncategory: security\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant security tooling (scanners, vault CLIs) and an\n  authorized scope for any active assessment. Docs-only; helper scripts and templates\n  not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# Threat Modeling\n\nIdentify and mitigate security threats during system design.\n\n## When to Use This Skill\n\nUse this skill when:\n- Designing a new system, service, or feature\n- Making significant architectural changes to existing systems\n- Onboarding a new third-party integration or dependency\n- Preparing for security audits or compliance reviews\n- Responding to a security incident to improve defenses\n- Reviewing infrastructure changes that affect trust boundaries\n\n## Prerequisites\n\n- System architecture documentation or design diagrams\n- Access to development and operations teams for context\n- Understanding of the system's data classification (PII, PHI, financial, etc.)\n- OWASP Threat Dragon or Microsoft Threat Modeling Tool (optional but helpful)\n- Whiteboard or diagramming tool for collaborative sessions\n\n## STRIDE Methodology\n\n| Threat | Description | Property Violated | Mitigation Examples |\n|--------|-------------|-------------------|---------------------|\n| **S**poofing | Pretending to be another user or system | Authentication | MFA, mTLS, API key validation, certificate pinning |\n| **T**ampering | Modifying data in transit or at rest | Integrity | HMAC, digital signatures, authenticated integrity checks, tamper-evident logs |\n| **R**epudiation | Denying having performed an action | Non-repudiation | Audit logging, digital signatures, tamper-evident logs |\n| **I**nformation Disclosure | Exposing data to unauthorized parties | Confidentiality | Encryption (TLS, AES), access controls, data masking |\n| **D**enial of Service | Making service unavailable | Availability | Rate limiting, autoscaling, CDN, circuit breakers |\n| **E**levation of Privilege | Gaining unauthorized higher access | Authorization | RBAC, principle of least privilege, input validation |\n\n## STRIDE Worksheet Template\n\n```yaml\n# stride-worksheet.yaml - Fill out one per component\u002Ftrust boundary crossing\ncomponent:\n  name: \"API Gateway\"\n  owner: \"Platform Team\"\n  data_classification: \"Confidential\"\n  trust_boundary: \"External -> Internal\"\n\nthreats:\n  - id: T001\n    category: Spoofing\n    description: \"Attacker forges JWT tokens to impersonate users\"\n    attack_vector: \"Stolen signing key or weak algorithm (HS256 with guessable secret)\"\n    likelihood: Medium\n    impact: Critical\n    risk_score: 15  # likelihood(3) x impact(5)\n    existing_controls:\n      - \"JWT validation on every request\"\n      - \"RS256 algorithm with rotated keys\"\n    gaps:\n      - \"No token binding to device\u002FIP\"\n    recommended_mitigations:\n      - \"Use a supported proof-of-possession protocol when required; a copied claim alone does not bind a token\"\n      - \"Implement short-lived tokens (15 min) with refresh\"\n      - \"Monitor for token reuse from different IPs\"\n    status: \"Mitigated (partial)\"\n    owner: \"Auth Team\"\n\n  - id: T002\n    category: Tampering\n    description: \"Man-in-the-middle modifies API requests\"\n    attack_vector: \"Compromised network between client and gateway\"\n    likelihood: Low\n    impact: High\n    risk_score: 8\n    existing_controls:\n      - \"TLS 1.3 enforced\"\n      - \"HSTS enabled\"\n    gaps: []\n    recommended_mitigations:\n      - \"Certificate pinning for mobile clients\"\n    status: \"Mitigated\"\n    owner: \"Platform Team\"\n\n  - id: T003\n    category: Information Disclosure\n    description: \"Verbose error messages leak internal details\"\n    attack_vector: \"Triggering errors returns stack traces, internal IPs, DB schema\"\n    likelihood: High\n    impact: Medium\n    risk_score: 12\n    existing_controls:\n      - \"Generic error pages in production\"\n    gaps:\n      - \"Some microservices return raw exceptions\"\n    recommended_mitigations:\n      - \"Centralized error handling middleware\"\n      - \"Error response schema validation\"\n    status: \"Open\"\n    owner: \"Backend Team\"\n\n  - id: T004\n    category: Denial of Service\n    description: \"API rate limiting bypass through distributed requests\"\n    attack_vector: \"Botnet sending requests below per-IP threshold\"\n    likelihood: Medium\n    impact: High\n    risk_score: 12\n    existing_controls:\n      - \"Per-IP rate limiting at WAF\"\n    gaps:\n      - \"No aggregate rate limiting\"\n      - \"No bot detection\"\n    recommended_mitigations:\n      - \"Add aggregate rate limiting per endpoint\"\n      - \"Deploy bot detection (Cloudflare Bot Management)\"\n      - \"Implement circuit breaker pattern\"\n    status: \"Open\"\n    owner: \"Platform Team\"\n\n  - id: T005\n    category: Elevation of Privilege\n    description: \"IDOR allows accessing other users' data\"\n    attack_vector: \"Manipulating resource IDs in API calls\"\n    likelihood: Medium\n    impact: Critical\n    risk_score: 15\n    existing_controls:\n      - \"Authentication required\"\n    gaps:\n      - \"Authorization checks inconsistent across endpoints\"\n    recommended_mitigations:\n      - \"Enforce ownership checks on all resource access\"\n      - \"Opaque IDs reduce guessing but never replace object-level authorization\"\n      - \"Add authorization integration tests\"\n    status: \"Open\"\n    owner: \"Backend Team\"\n```\n\n## Data Flow Diagram\n\n### Text-Based DFD Notation\n\n```\n                    Trust Boundary: Internet\n                    ==========================\n                           |\n                    [External User]\n                           |\n                      HTTPS\u002F443\n                           |\n                    ==========================\n                    Trust Boundary: DMZ\n                    ==========================\n                           |\n                    (WAF \u002F CDN)\n                           |\n                    [API Gateway]---->[Auth Service]--->[Identity DB]\n                           |\n                    ==========================\n                    Trust Boundary: Internal\n                    ==========================\n                           |\n                    [App Service]\n                       \u002F       \\\n                      \u002F         \\\n               [Cache]       [Message Queue]\n                                  |\n                           [Worker Service]\n                                  |\n                    ==========================\n                    Trust Boundary: Data\n                    ==========================\n                                  |\n                           [Primary DB]--->[Replica DB]\n                                  |\n                           [Object Store]\n\nLegend:\n  [Box]     = Process\n  (Parens)  = External entity \u002F proxy\n  ====      = Trust boundary\n  --->      = Data flow\n```\n\n### Threat Model Concept Sketch (JSON; not an importable Threat Dragon model)\n\n```json\n{\n  \"summary\": {\n    \"title\": \"E-Commerce Platform\",\n    \"owner\": \"Security Team\",\n    \"description\": \"Threat model for the e-commerce API platform\"\n  },\n  \"detail\": {\n    \"diagrams\": [\n      {\n        \"title\": \"API Data Flow\",\n        \"diagramType\": \"STRIDE\",\n        \"cells\": [\n          {\n            \"type\": \"tm.Actor\",\n            \"name\": \"Web Client\",\n            \"threats\": []\n          },\n          {\n            \"type\": \"tm.Process\",\n            \"name\": \"API Gateway\",\n            \"threats\": [\"T001\", \"T002\", \"T003\", \"T004\"]\n          },\n          {\n            \"type\": \"tm.Process\",\n            \"name\": \"Order Service\",\n            \"threats\": [\"T005\"]\n          },\n          {\n            \"type\": \"tm.Store\",\n            \"name\": \"Orders Database\",\n            \"threats\": [\"T006\"]\n          },\n          {\n            \"type\": \"tm.Boundary\",\n            \"name\": \"DMZ\"\n          },\n          {\n            \"type\": \"tm.Boundary\",\n            \"name\": \"Internal Network\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n## Threat Library\n\n```yaml\n# threat-library.yaml - Reusable threat patterns\ncategories:\n  authentication:\n    - id: TL-AUTH-001\n      name: \"Credential stuffing\"\n      description: \"Attacker uses leaked credential databases to attempt logins\"\n      applicable_to: [\"login endpoints\", \"API authentication\"]\n      mitigations: [\"MFA\", \"rate limiting\", \"credential breach monitoring\", \"CAPTCHA\"]\n\n    - id: TL-AUTH-002\n      name: \"Session hijacking\"\n      description: \"Attacker steals session tokens via XSS or network sniffing\"\n      applicable_to: [\"web applications\", \"APIs with session tokens\"]\n      mitigations: [\"HttpOnly cookies\", \"TLS\", \"session binding\", \"short TTL\"]\n\n    - id: TL-AUTH-003\n      name: \"OAuth token theft\"\n      description: \"Access tokens stolen from logs, URLs, or insecure storage\"\n      applicable_to: [\"OAuth\u002FOIDC integrations\"]\n      mitigations: [\"PKCE\", \"short-lived tokens\", \"token binding\", \"secure storage\"]\n\n  injection:\n    - id: TL-INJ-001\n      name: \"SQL injection\"\n      description: \"Malicious SQL in user input executes unauthorized queries\"\n      applicable_to: [\"database-backed endpoints\", \"search functionality\"]\n      mitigations: [\"parameterized queries\", \"ORM\", \"input validation\", \"WAF\"]\n\n    - id: TL-INJ-002\n      name: \"Command injection\"\n      description: \"User input passed to system commands without sanitization\"\n      applicable_to: [\"file processing\", \"system administration features\"]\n      mitigations: [\"avoid shell commands\", \"input allowlisting\", \"sandboxing\"]\n\n    - id: TL-INJ-003\n      name: \"SSRF (Server-Side Request Forgery)\"\n      description: \"Attacker makes server send requests to internal resources\"\n      applicable_to: [\"URL fetching features\", \"webhook handlers\", \"PDF generators\"]\n      mitigations: [\"URL allowlisting\", \"network segmentation\", \"metadata endpoint blocking\"]\n\n  supply_chain:\n    - id: TL-SC-001\n      name: \"Dependency confusion\"\n      description: \"Malicious package with internal name published to public registry\"\n      applicable_to: [\"npm, pip, maven projects using private packages\"]\n      mitigations: [\"namespace scoping\", \"registry prioritization\", \"SBOM monitoring\"]\n\n    - id: TL-SC-002\n      name: \"Compromised CI\u002FCD pipeline\"\n      description: \"Attacker injects malicious code through build system compromise\"\n      applicable_to: [\"all software builds\"]\n      mitigations: [\"SLSA compliance\", \"signed commits\", \"ephemeral builders\", \"provenance\"]\n\n  data:\n    - id: TL-DATA-001\n      name: \"Unencrypted data at rest\"\n      description: \"Sensitive data stored without encryption on disk or in database\"\n      applicable_to: [\"databases\", \"object storage\", \"backups\"]\n      mitigations: [\"AES-256 encryption\", \"KMS-managed keys\", \"encrypted volumes\"]\n\n    - id: TL-DATA-002\n      name: \"PII exposure in logs\"\n      description: \"Personal data written to application or infrastructure logs\"\n      applicable_to: [\"all services handling PII\"]\n      mitigations: [\"log sanitization\", \"structured logging\", \"PII detection scanning\"]\n```\n\n## Risk Scoring Matrix\n\n### Likelihood Rating\n\n| Score | Level | Description |\n|-------|-------|-------------|\n| 1 | Very Low | Requires nation-state resources; no known exploits |\n| 2 | Low | Requires significant expertise and specific conditions |\n| 3 | Medium | Moderately skilled attacker with available tools |\n| 4 | High | Script-kiddie level; public exploits available |\n| 5 | Very High | Trivial to exploit; automated scanning detects it |\n\n### Impact Rating\n\n| Score | Level | Description |\n|-------|-------|-------------|\n| 1 | Negligible | No data exposure; cosmetic only |\n| 2 | Minor | Limited data exposure; single user affected |\n| 3 | Moderate | Significant data exposure; service degradation |\n| 4 | Major | Large-scale data breach; extended outage |\n| 5 | Critical | Complete system compromise; regulatory breach |\n\n### Risk Matrix\n\n```\nImpact ->     1        2        3        4        5\nLikelihood\n    5      Medium    High     High   Critical Critical\n    4       Low     Medium    High    High   Critical\n    3       Low      Low     Medium   High    High\n    2      Info      Low      Low    Medium   High\n    1      Info     Info      Low     Low    Medium\n```\n\n### Risk Treatment Decisions\n\n```yaml\nrisk_treatment:\n  critical:  # Score >= 20\n    action: \"Immediate remediation required\"\n    sla: \"24 hours\"\n    approval: \"CISO\"\n  high:      # Score 12-19\n    action: \"Remediation in current sprint\"\n    sla: \"1 week\"\n    approval: \"Security Lead\"\n  medium:    # Score 6-11\n    action: \"Remediation in next sprint\"\n    sla: \"1 month\"\n    approval: \"Team Lead\"\n  low:       # Score 2-5\n    action: \"Track and address in backlog\"\n    sla: \"1 quarter\"\n    approval: \"Team Lead\"\n  info:      # Score 1\n    action: \"Accept risk and document\"\n    sla: \"None\"\n    approval: \"Team Lead\"\n```\n\n## Tool setup and review automation\n\nUse the version-matched [Threat Dragon documentation](https:\u002F\u002Fwww.threatdragon.com\u002F)\nand verified official release artifacts for local installation. Bind any web\ninterface to loopback; supply private generated configuration secrets through an\napproved secret mechanism. The worksheet and JSON above are conceptual inputs,\nnot a complete Threat Dragon import schema or container configuration.\n\nFor CI, use a trusted parser implementation with a pinned YAML dependency and\nread-only token. Discover model files with a safe file API rather than interpolating\nfilenames into Python source. Validate object\u002Flist types, unique threat IDs, numeric\nlikelihood\u002Fimpact bounds, calculated scores, owners, evidence and status enums.\nFail on malformed files and an unexpectedly empty inventory. Evaluate status and\nscore from the same parsed threat record: grepping separate YAML lines cannot\nassociate them. Publish only aggregate counts; threat descriptions and model files\nmay expose internal architecture. Required human review must be enforced by branch\npolicy, not a warning-only shell exit. Do not execute embedded model contents.\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| Threat model sessions are unproductive | Participants don't understand the system | Share architecture docs before the session; include a system walkthrough |\n| Too many threats identified | Scope too broad | Focus on one component or trust boundary per session |\n| Threats are too vague | No structured methodology | Use STRIDE per element; fill in the worksheet template for each |\n| Team doesn't follow up on findings | No ownership or tracking | Assign each threat to a team with SLA; track in issue tracker |\n| Threat model becomes stale | No trigger to update | Require review on architecture changes (CI\u002FCD gate on diagram changes) |\n| Disagreements on risk scores | Subjective scoring | Use the scoring matrix consistently; calibrate with historical incidents |\n\n## Best Practices\n\n- Integrate threat modeling into the SDLC at the design phase\n- Review threat models when architecture changes occur\n- Include developers, ops, and security in sessions\n- Use the threat library to ensure consistent coverage\n- Document all risk acceptance decisions with rationale\n- Track threats in the same system as other work items\n- Conduct annual reviews of all active threat models\n- Start with the most critical data flows and expand\n- Keep sessions timeboxed (90 minutes maximum)\n- Maintain a living threat library updated with new patterns\n\n## Related Skills\n\n- sast-scanning (`sast-scanning`) - Code analysis\n- penetration-testing (`penetration-testing`) - Validation of threat model findings\n- incident-response (`incident-response`) - Response when threats materialize\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n\n## Scoring and control limitations\n\nUse one agreed numeric scale (likelihood and impact 1–5, product 1–25); the qualitative matrix and remediation dates are illustrative policy suggestions and must be reconciled before use. Worksheet likelihood labels are not consistently the matrix labels; explicitly map them before calculating scores. A claim of mitigation needs evidence and residual risk\u002Facceptance owner, not a status field. TLS\u002FHSTS, signatures and audit logs address different properties; plain checksums do not resist an attacker who can replace both data and checksum, and logs alone do not establish legal non-repudiation. PKCE protects authorization-code exchange, not an already stolen bearer access token. Include repudiation threats as well as all other STRIDE categories, assets, trust boundaries and abuse cases; a tool diagram or a sample risk score is not an exhaustive assessment.\n","# Threat Modeling\n\nIdentify and mitigate security threats during system design.\n\n## When to Use This Skill\n\nUse this skill when:\n- Designing a new system, service, or feature\n- Making significant architectural changes to existing systems\n- Onboarding a new third-party integration or dependency\n- Preparing for security audits or compliance reviews\n- Responding to a security incident to improve defenses\n- Reviewing infrastructure changes that affect trust boundaries\n\n## Prerequisites\n\n- System architecture documentation or design diagrams\n- Access to development and operations teams for context\n- Understanding of the system's data classification (PII, PHI, financial, etc.)\n- OWASP Threat Dragon or Microsoft Threat Modeling Tool (optional but helpful)\n- Whiteboard or diagramming tool for collaborative sessions\n\n## STRIDE Methodology\n\n| Threat | Description | Property Violated | Mitigation Examples |\n|--------|-------------|-------------------|---------------------|\n| **S**poofing | Pretending to be another user or system | Authentication | MFA, mTLS, API key validation, certificate pinning |\n| **T**ampering | Modifying data in transit or at rest | Integrity | HMAC, digital signatures, authenticated integrity checks, tamper-evident logs |\n| **R**epudiation | Denying having performed an action | Non-repudiation | Audit logging, digital signatures, tamper-evident logs |\n| **I**nformation Disclosure | Exposing data to unauthorized parties | Confidentiality | Encryption (TLS, AES), access controls, data masking |\n| **D**enial of Service | Making service unavailable | Availability | Rate limiting, autoscaling, CDN, circuit breakers |\n| **E**levation of Privilege | Gaining unauthorized higher access | Authorization | RBAC, principle of least privilege, input validation |\n\n## STRIDE Worksheet Template\n\n```yaml\n# stride-worksheet.yaml - Fill out one per component\u002Ftrust boundary crossing\ncomponent:\n  name: \"API Gateway\"\n  owner: \"Platform Team\"\n  data_classification: \"Confidential\"\n  trust_boundary: \"External -> Internal\"\n\nthreats:\n  - id: T001\n    category: Spoofing\n    description: \"Attacker forges JWT tokens to impersonate users\"\n    attack_vector: \"Stolen signing key or weak algorithm (HS256 with guessable secret)\"\n    likelihood: Medium\n    impact: Critical\n    risk_score: 15  # likelihood(3) x impact(5)\n    existing_controls:\n      - \"JWT validation on every request\"\n      - \"RS256 algorithm with rotated keys\"\n    gaps:\n      - \"No token binding to device\u002FIP\"\n    recommended_mitigations:\n      - \"Use a supported proof-of-possession protocol when required; a copied claim alone does not bind a token\"\n      - \"Implement short-lived tokens (15 min) with refresh\"\n      - \"Monitor for token reuse from different IPs\"\n    status: \"Mitigated (partial)\"\n    owner: \"Auth Team\"\n\n  - id: T002\n    category: Tampering\n    description: \"Man-in-the-middle modifies API requests\"\n    attack_vector: \"Compromised network between client and gateway\"\n    likelihood: Low\n    impact: High\n    risk_score: 8\n    existing_controls:\n      - \"TLS 1.3 enforced\"\n      - \"HSTS enabled\"\n    gaps: []\n    recommended_mitigations:\n      - \"Certificate pinning for mobile clients\"\n    status: \"Mitigated\"\n    owner: \"Platform Team\"\n\n  - id: T003\n    category: Information Disclosure\n    description: \"Verbose error messages leak internal details\"\n    attack_vector: \"Triggering errors returns stack traces, internal IPs, DB schema\"\n    likelihood: High\n    impact: Medium\n    risk_score: 12\n    existing_controls:\n      - \"Generic error pages in production\"\n    gaps:\n      - \"Some microservices return raw exceptions\"\n    recommended_mitigations:\n      - \"Centralized error handling middleware\"\n      - \"Error response schema validation\"\n    status: \"Open\"\n    owner: \"Backend Team\"\n\n  - id: T004\n    category: Denial of Service\n    description: \"API rate limiting bypass through distributed requests\"\n    attack_vector: \"Botnet sending requests below per-IP threshold\"\n    likelihood: Medium\n    impact: High\n    risk_score: 12\n    existing_controls:\n      - \"Per-IP rate limiting at WAF\"\n    gaps:\n      - \"No aggregate rate limiting\"\n      - \"No bot detection\"\n    recommended_mitigations:\n      - \"Add aggregate rate limiting per endpoint\"\n      - \"Deploy bot detection (Cloudflare Bot Management)\"\n      - \"Implement circuit breaker pattern\"\n    status: \"Open\"\n    owner: \"Platform Team\"\n\n  - id: T005\n    category: Elevation of Privilege\n    description: \"IDOR allows accessing other users' data\"\n    attack_vector: \"Manipulating resource IDs in API calls\"\n    likelihood: Medium\n    impact: Critical\n    risk_score: 15\n    existing_controls:\n      - \"Authentication required\"\n    gaps:\n      - \"Authorization checks inconsistent across endpoints\"\n    recommended_mitigations:\n      - \"Enforce ownership checks on all resource access\"\n      - \"Opaque IDs reduce guessing but never replace object-level authorization\"\n      - \"Add authorization integration tests\"\n    status: \"Open\"\n    owner: \"Backend Team\"\n```\n\n## Data Flow Diagram\n\n### Text-Based DFD Notation\n\n```\n                    Trust Boundary: Internet\n                    ==========================\n                           |\n                    [External User]\n                           |\n                      HTTPS\u002F443\n                           |\n                    ==========================\n                    Trust Boundary: DMZ\n                    ==========================\n                           |\n                    (WAF \u002F CDN)\n                           |\n                    [API Gateway]---->[Auth Service]--->[Identity DB]\n                           |\n                    ==========================\n                    Trust Boundary: Internal\n                    ==========================\n                           |\n                    [App Service]\n                       \u002F       \\\n                      \u002F         \\\n               [Cache]       [Message Queue]\n                                  |\n                           [Worker Service]\n                                  |\n                    ==========================\n                    Trust Boundary: Data\n                    ==========================\n                                  |\n                           [Primary DB]--->[Replica DB]\n                                  |\n                           [Object Store]\n\nLegend:\n  [Box]     = Process\n  (Parens)  = External entity \u002F proxy\n  ====      = Trust boundary\n  --->      = Data flow\n```\n\n### Threat Model Concept Sketch (JSON; not an importable Threat Dragon model)\n\n```json\n{\n  \"summary\": {\n    \"title\": \"E-Commerce Platform\",\n    \"owner\": \"Security Team\",\n    \"description\": \"Threat model for the e-commerce API platform\"\n  },\n  \"detail\": {\n    \"diagrams\": [\n      {\n        \"title\": \"API Data Flow\",\n        \"diagramType\": \"STRIDE\",\n        \"cells\": [\n          {\n            \"type\": \"tm.Actor\",\n            \"name\": \"Web Client\",\n            \"threats\": []\n          },\n          {\n            \"type\": \"tm.Process\",\n            \"name\": \"API Gateway\",\n            \"threats\": [\"T001\", \"T002\", \"T003\", \"T004\"]\n          },\n          {\n            \"type\": \"tm.Process\",\n            \"name\": \"Order Service\",\n            \"threats\": [\"T005\"]\n          },\n          {\n            \"type\": \"tm.Store\",\n            \"name\": \"Orders Database\",\n            \"threats\": [\"T006\"]\n          },\n          {\n            \"type\": \"tm.Boundary\",\n            \"name\": \"DMZ\"\n          },\n          {\n            \"type\": \"tm.Boundary\",\n            \"name\": \"Internal Network\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n## Threat Library\n\n```yaml\n# threat-library.yaml - Reusable threat patterns\ncategories:\n  authentication:\n    - id: TL-AUTH-001\n      name: \"Credential stuffing\"\n      description: \"Attacker uses leaked credential databases to attempt logins\"\n      applicable_to: [\"login endpoints\", \"API authentication\"]\n      mitigations: [\"MFA\", \"rate limiting\", \"credential breach monitoring\", \"CAPTCHA\"]\n\n    - id: TL-AUTH-002\n      name: \"Session hijacking\"\n      description: \"Attacker steals session tokens via XSS or network sniffing\"\n      applicable_to: [\"web applications\", \"APIs with session tokens\"]\n      mitigations: [\"HttpOnly cookies\", \"TLS\", \"session binding\", \"short TTL\"]\n\n    - id: TL-AUTH-003\n      name: \"OAuth token theft\"\n      description: \"Access tokens stolen from logs, URLs, or insecure storage\"\n      applicable_to: [\"OAuth\u002FOIDC integrations\"]\n      mitigations: [\"PKCE\", \"short-lived tokens\", \"token binding\", \"secure storage\"]\n\n  injection:\n    - id: TL-INJ-001\n      name: \"SQL injection\"\n      description: \"Malicious SQL in user input executes unauthorized queries\"\n      applicable_to: [\"database-backed endpoints\", \"search functionality\"]\n      mitigations: [\"parameterized queries\", \"ORM\", \"input validation\", \"WAF\"]\n\n    - id: TL-INJ-002\n      name: \"Command injection\"\n      description: \"User input passed to system commands without sanitization\"\n      applicable_to: [\"file processing\", \"system administration features\"]\n      mitigations: [\"avoid shell commands\", \"input allowlisting\", \"sandboxing\"]\n\n    - id: TL-INJ-003\n      name: \"SSRF (Server-Side Request Forgery)\"\n      description: \"Attacker makes server send requests to internal resources\"\n      applicable_to: [\"URL fetching features\", \"webhook handlers\", \"PDF generators\"]\n      mitigations: [\"URL allowlisting\", \"network segmentation\", \"metadata endpoint blocking\"]\n\n  supply_chain:\n    - id: TL-SC-001\n      name: \"Dependency confusion\"\n      description: \"Malicious package with internal name published to public registry\"\n      applicable_to: [\"npm, pip, maven projects using private packages\"]\n      mitigations: [\"namespace scoping\", \"registry prioritization\", \"SBOM monitoring\"]\n\n    - id: TL-SC-002\n      name: \"Compromised CI\u002FCD pipeline\"\n      description: \"Attacker injects malicious code through build system compromise\"\n      applicable_to: [\"all software builds\"]\n      mitigations: [\"SLSA compliance\", \"signed commits\", \"ephemeral builders\", \"provenance\"]\n\n  data:\n    - id: TL-DATA-001\n      name: \"Unencrypted data at rest\"\n      description: \"Sensitive data stored without encryption on disk or in database\"\n      applicable_to: [\"databases\", \"object storage\", \"backups\"]\n      mitigations: [\"AES-256 encryption\", \"KMS-managed keys\", \"encrypted volumes\"]\n\n    - id: TL-DATA-002\n      name: \"PII exposure in logs\"\n      description: \"Personal data written to application or infrastructure logs\"\n      applicable_to: [\"all services handling PII\"]\n      mitigations: [\"log sanitization\", \"structured logging\", \"PII detection scanning\"]\n```\n\n## Risk Scoring Matrix\n\n### Likelihood Rating\n\n| Score | Level | Description |\n|-------|-------|-------------|\n| 1 | Very Low | Requires nation-state resources; no known exploits |\n| 2 | Low | Requires significant expertise and specific conditions |\n| 3 | Medium | Moderately skilled attacker with available tools |\n| 4 | High | Script-kiddie level; public exploits available |\n| 5 | Very High | Trivial to exploit; automated scanning detects it |\n\n### Impact Rating\n\n| Score | Level | Description |\n|-------|-------|-------------|\n| 1 | Negligible | No data exposure; cosmetic only |\n| 2 | Minor | Limited data exposure; single user affected |\n| 3 | Moderate | Significant data exposure; service degradation |\n| 4 | Major | Large-scale data breach; extended outage |\n| 5 | Critical | Complete system compromise; regulatory breach |\n\n### Risk Matrix\n\n```\nImpact ->     1        2        3        4        5\nLikelihood\n    5      Medium    High     High   Critical Critical\n    4       Low     Medium    High    High   Critical\n    3       Low      Low     Medium   High    High\n    2      Info      Low      Low    Medium   High\n    1      Info     Info      Low     Low    Medium\n```\n\n### Risk Treatment Decisions\n\n```yaml\nrisk_treatment:\n  critical:  # Score >= 20\n    action: \"Immediate remediation required\"\n    sla: \"24 hours\"\n    approval: \"CISO\"\n  high:      # Score 12-19\n    action: \"Remediation in current sprint\"\n    sla: \"1 week\"\n    approval: \"Security Lead\"\n  medium:    # Score 6-11\n    action: \"Remediation in next sprint\"\n    sla: \"1 month\"\n    approval: \"Team Lead\"\n  low:       # Score 2-5\n    action: \"Track and address in backlog\"\n    sla: \"1 quarter\"\n    approval: \"Team Lead\"\n  info:      # Score 1\n    action: \"Accept risk and document\"\n    sla: \"None\"\n    approval: \"Team Lead\"\n```\n\n## Tool setup and review automation\n\nUse the version-matched [Threat Dragon documentation](https:\u002F\u002Fwww.threatdragon.com\u002F)\nand verified official release artifacts for local installation. Bind any web\ninterface to loopback; supply private generated configuration secrets through an\napproved secret mechanism. The worksheet and JSON above are conceptual inputs,\nnot a complete Threat Dragon import schema or container configuration.\n\nFor CI, use a trusted parser implementation with a pinned YAML dependency and\nread-only token. Discover model files with a safe file API rather than interpolating\nfilenames into Python source. Validate object\u002Flist types, unique threat IDs, numeric\nlikelihood\u002Fimpact bounds, calculated scores, owners, evidence and status enums.\nFail on malformed files and an unexpectedly empty inventory. Evaluate status and\nscore from the same parsed threat record: grepping separate YAML lines cannot\nassociate them. Publish only aggregate counts; threat descriptions and model files\nmay expose internal architecture. Required human review must be enforced by branch\npolicy, not a warning-only shell exit. Do not execute embedded model contents.\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| Threat model sessions are unproductive | Participants don't understand the system | Share architecture docs before the session; include a system walkthrough |\n| Too many threats identified | Scope too broad | Focus on one component or trust boundary per session |\n| Threats are too vague | No structured methodology | Use STRIDE per element; fill in the worksheet template for each |\n| Team doesn't follow up on findings | No ownership or tracking | Assign each threat to a team with SLA; track in issue tracker |\n| Threat model becomes stale | No trigger to update | Require review on architecture changes (CI\u002FCD gate on diagram changes) |\n| Disagreements on risk scores | Subjective scoring | Use the scoring matrix consistently; calibrate with historical incidents |\n\n## Best Practices\n\n- Integrate threat modeling into the SDLC at the design phase\n- Review threat models when architecture changes occur\n- Include developers, ops, and security in sessions\n- Use the threat library to ensure consistent coverage\n- Document all risk acceptance decisions with rationale\n- Track threats in the same system as other work items\n- Conduct annual reviews of all active threat models\n- Start with the most critical data flows and expand\n- Keep sessions timeboxed (90 minutes maximum)\n- Maintain a living threat library updated with new patterns\n\n## Related Skills\n\n- sast-scanning (`sast-scanning`) - Code analysis\n- penetration-testing (`penetration-testing`) - Validation of threat model findings\n- incident-response (`incident-response`) - Response when threats materialize\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n\n## Scoring and control limitations\n\nUse one agreed numeric scale (likelihood and impact 1–5, product 1–25); the qualitative matrix and remediation dates are illustrative policy suggestions and must be reconciled before use. Worksheet likelihood labels are not consistently the matrix labels; explicitly map them before calculating scores. A claim of mitigation needs evidence and residual risk\u002Facceptance owner, not a status field. TLS\u002FHSTS, signatures and audit logs address different properties; plain checksums do not resist an attacker who can replace both data and checksum, and logs alone do not establish legal non-repudiation. PKCE protects authorization-code exchange, not an already stolen bearer access token. Include repudiation threats as well as all other STRIDE categories, assets, trust boundaries and abuse cases; a tool diagram or a sample risk score is not an exhaustive assessment.\n",{"name":5,"risk":34,"source":51,"license":14,"category":44,"metadata":52,"date_added":55,"description":7,"source_repo":56,"source_type":26,"compatibility":57,"license_source":58},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills",{"author":53,"version":54},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant security tooling (scanners, vault CLIs) and an authorized scope for any active assessment. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-threat-modeling",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add boisenoise\u002Fskills-collections --skill threat-modeling",{"tool":71,"command":72},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill threat-modeling",{"tool":74,"command":75},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill threat-modeling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-threat-modeling\u002FSKILL.md",true,[],[80,106,129,155,174,197],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":85,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":46},"01M6WNH92BHVFXHGPDZCPJ0AG0","web-access","Use Treg for public web or platform data only when existing search, browser and connected tools cannot cover the task, with explicit cost and data boundaries.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-web-access\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-web-access\u002FSKILL.md",[],[89,90,91,92,93,94,95,96,97,98,99,39,100,101,102,34,103,104,105,28,27],"web","access","web access","official","development","browser","search","data","Tools","read","fetch","youtube","free tools","platform","free","cover","normal",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":114,"publishedAt":46},"01M6WNF9XAYAB2CZDDJBAKNM93","treg","Use the Treg CLI or MCP catalog to discover, price and call authorized external tools with team-scoped credentials and a user-approved budget.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-treg\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-treg\u002FSKILL.md",[113],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[108,115,116,117,92,93,41,97,118,119,120,121,122,123,124,34,125,126,127,128,27],"MCP","cli","github","Budget","credentials","team","catalog","use","call","discover","external tools","with","scoped","blob",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":141,"publishedAt":46},"01M6WN93MEAZ4E41DYAHJRPHQT","recruit","Turn a job description into an evidence-linked candidate shortlist through Treg, with job-related ranking and optional authorized business contact enrichment.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-recruit\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-recruit\u002FSKILL.md",[136],{"categoryNo":137,"categoryName":138,"taxonomyType":139,"taxonomyTypeDesc":140},"01JBSEEDCAT000000000000038","人力资源","PROFESSION","适用职业",[131,117,92,41,142,143,144,145,146,147,34,148,149,150,126,151,152,153,154,128,108,27],"https","email","enrichment","business","evidence","phone","ranking","post","job description","for","person","candidate","reason",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":159,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":46},"01M6WN8R5RXSMHM9B4D9FAFX42","rea-growth","Analyze a company’s public growth and content through Treg, distinguish observations from hypotheses, and produce an evidence-linked playbook within an approved budget.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-rea-growth\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-rea-growth\u002FSKILL.md",[],[163,164,165,117,92,41,166,167,142,168,118,169,170,171,146,34,172,173,128,108,27],"growth","rea","rea growth","produce","content","playbook","marketing","analyze","public","observations","company",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":178,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":46},"01M6WN2EVE3RQRGWAKBT4S7YT2","make-ugc","Create original AI UGC-style product videos through Treg: research hooks, approve a licensed presenter and voice, generate clips, add captions and report costs.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-make-ugc\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-make-ugc\u002FSKILL.md",[],[182,183,117,184,92,185,41,186,187,188,189,190,34,191,192,193,194,195,196,128],"make","make ugc","research","create","Video","Captions","ads","short","hooks","head","style","niche","trending","talking-head","approve",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":201,"sourceHtmlUrl":202,"categories":203,"keywords":204,"publishedAt":46},"01M6WN10ARAA63Y8K1YNGXJ2RM","lead-signals","Find and qualify public buying signals through Treg, rank fitting business accounts and optionally enrich authorized business contact information.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lead-signals\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lead-signals\u002FSKILL.md",[],[205,206,207,117,92,41,208,209,145,210,211,34,212,213,214,215,216,217,218,128],"signals","lead","lead signals","how","find","ready","as","how to","qualify","people","information","enrich","changes","funding"]