Token导航 LogoToken导航

Agent Skill · 研究检索

threat-modeling(威胁建模)

threat-modeling 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

threat-modeling 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 62,606。

总安装 329周安装 14GitHub Stars 7下载 115核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:threat-modeling(威胁建模)
来源仓库:https://github.com/hack23/riksdagsmonitor
仓库路径:skills/threat-modeling
安装命令:
npx skills add https://github.com/hack23/riksdagsmonitor --skill threat-modeling
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hack23/riksdagsmonitor --skill threat-modeling

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

threat-modeling 用于查找、检索和筛选相关信息。适合根据关键词或任务场景快速定位威胁建模相关内容。通过 npx skills add 命令从指定仓库安装并使用该技能。安装前需确认权限范围和维护状态,注意可能触发联网或文件读写操作。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/threat-modeling

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/hack23/riksdagsmonitor --skill threat-modeling;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

threat-modeling 怎么安装?

在终端执行 npx skills add https://github.com/hack23/riksdagsmonitor --skill threat-modeling。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

threat-modeling 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

threat-modeling 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

threat-modeling 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

threat-modeling 用的人多吗?

公开数据是累计安装 329 次,近一周安装 14 次,下载 115 次,GitHub 7 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

threat-modeling 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
threat-modeling

威胁建模 · 本页

3297接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Threat Modeling Skill

Purpose

This skill embodies the complete Hack23 AB threat modeling methodology as defined in ISMS Threat_Modeling.md. It provides systematic threat identification, risk quantification, and security control validation for proactive security assurance across all Hack23 projects.

Key Philosophy: "Security through transparency" - All threat models are publicly documented to demonstrate security excellence to clients, regulators, and the open-source community.

Hack23 Threat Modeling Process (ISMS § 4)

Per ISMS Threat_Modeling.md, Hack23 employs a five-strategy integrated approach:

1. 🎯 Attacker-Centric (ISMS § 4.1)

MITRE ATT&CK Framework Integration

  • Map attack tactics and techniques to system components
  • Identify threat agents (Nation-state APTs, Cybercriminals, Hacktivists, Malicious Insiders)
  • Analyze attack scenarios based on current threat intelligence (ENISA Threat Landscape 2024)
  • Red team perspective: "How would I compromise this system?"

Required Outputs:

  • MITRE ATT&CK technique mapping per system component
  • Threat agent capability and motivation analysis
  • Attack scenario documentation

2. 🏰 Asset-Centric (ISMS § 4.2)

Crown Jewel Protection

  • Identify critical assets from Asset Register
  • Apply Data Classification Policy (Public, Internal, Confidential, Restricted)
  • Map data flows and asset dependencies
  • Prioritize threats by asset criticality

Required Outputs:

  • Asset inventory with CIA triad classification
  • Data flow diagrams (DFDs) showing trust boundaries
  • Crown jewel identification and protection strategies

3. 🏗️ Architecture-Centric (ISMS § 4.3)

STRIDE Per Element Analysis

  • Apply STRIDE framework to each system component
  • Identify trust boundaries and crossing points
  • Analyze external entity, process, data store, data flow threats
  • Validate security controls per architectural layer

Required Outputs:

  • Complete DFD with trust boundaries
  • STRIDE threat enumeration per DFD element
  • Control gap identification

4. 📖 Scenario-Centric (ISMS § 4.4)

Use Case Abuse Modeling

  • Develop misuse cases from legitimate use cases
  • Model attacker goals and sub-goals
  • Identify abuse scenarios specific to business logic
  • Analyze social engineering attack paths

Required Outputs:

  • Misuse case diagrams
  • Business logic abuse scenarios
  • Social engineering attack paths

5. 📊 Risk-Centric (ISMS § 4.5)

Quantitative Risk Assessment

  • Calculate risk scores: Risk = Likelihood × Impact
  • Use Classification Framework for impact scoring
  • Apply risk matrix for prioritization
  • Document risk treatment decisions (Avoid, Mitigate, Transfer, Accept)

Required Outputs:

  • Quantitative risk scores per threat
  • Risk matrix visualization
  • Risk treatment plan with ownership

Security Foundations

CIA Triad

PrincipleDefinitionKey ControlsThreat Categories
ConfidentialityInformation accessible only to authorized entitiesEncryption, access control, authenticationInformation disclosure, credential theft
IntegrityData protection from unauthorized modificationChecksums, digital signatures, version controlTampering, data corruption
AvailabilityReliable and timely access to systemsRedundancy, DR, DDoS mitigationDoS, outages, resource exhaustion

AAA Framework

ComponentDefinitionIntegration
AuthenticationIdentity verificationAccess Control Policy
AuthorizationPermitted actionsRBAC, ABAC implementation
AccountingActivity trackingSecurity monitoring, audit logs

STRIDE Threat Modeling Framework

STRIDE Categories

S - Spoofing Identity

  • Definition: Attacker gains access using false identity
  • Controls: Multi-factor authentication, certificate pinning, identity verification
  • Static Site Threats: Domain hijacking, DNS spoofing, certificate spoofing
  • Mitigations: HTTPS enforced, DNSSEC, Certificate Transparency monitoring

T - Tampering with Data

  • Definition: Data modification during application flow
  • Controls: Digital signatures, checksums, integrity monitoring
  • Static Site Threats: Repository compromise, unauthorized commits, content injection
  • Mitigations: Branch protection, required PR reviews, GPG signed commits, GitHub audit logs

R - Repudiation

  • Definition: Attacker denies actions without proof capability
  • Controls: Audit logging, digital signatures, non-repudiation mechanisms
  • Static Site Threats: Unauthorized changes without attribution
  • Mitigations: Git commit history (immutable), GitHub audit logs, signed commits required

I - Information Disclosure

  • Definition: Unauthorized access to private or sensitive data
  • Controls: Encryption, access controls, data classification
  • Static Site Threats: Accidental secret commits, source code exposure
  • Mitigations: Secret scanning enabled,.gitignore for sensitive files, public repository classification

D - Denial of Service

  • Definition: System availability reduction or service crash
  • Controls: Rate limiting, DDoS protection, redundancy
  • Static Site Threats: DDoS attacks, resource exhaustion
  • Mitigations: GitHub Pages CDN, rate limiting, global distribution

E - Elevation of Privilege

  • Definition: Attacker assumes privileged user identity
  • Controls: Least privilege, RBAC, privilege separation
  • Static Site Threats: Unauthorized admin access, workflow manipulation
  • Mitigations: Minimal workflow permissions, protected branches, required reviews

MITRE ATT&CK Integration

Tactics & Techniques

TacticDescriptionCommon Techniques
ReconnaissanceInformation gatheringActive scanning, OSINT
Resource DevelopmentEstablishing resourcesCompromise accounts, infrastructure setup
Initial AccessNetwork entryPhishing, drive-by compromise, supply chain
ExecutionMalicious code executionCommand interpreters, malicious input
PersistenceFoothold maintenanceAccount manipulation, backdoors
Privilege EscalationHigher permissionsExploitation, process injection
Defense EvasionDetection avoidanceObfuscation, bypass controls
Credential AccessCredential theftBrute force, token stealing
DiscoveryEnvironment reconnaissanceCloud discovery, network mapping
Lateral MovementEnvironment traversalRemote services, credential reuse
CollectionData gatheringLocal data, cloud storage
Command & ControlSystem communicationApplication layer protocols
ExfiltrationData theftC2 channel, cloud storage
ImpactSystem destructionData destruction, resource hijacking

Threat Agent Classification

Threat AgentCategoryRisk LevelMITRE Tactics
Accidental InsidersInternalMediumExecution, Privilege Escalation
Malicious InsidersInternalHighInitial Access, Impact
CybercriminalsExternalHighReconnaissance, Collection
Nation-State APTsExternalCriticalPersistence, Defense Evasion
HacktivistsExternalMediumImpact, Privilege Escalation
Service ProvidersExternalMediumInitial Access, Defense Evasion
Cyber VandalsExternalLowImpact, Execution

Current Threat Landscape (ENISA 2024)

PriorityThreat CategoryBusiness ImpactMitigation Priority
1Threats Against AvailabilityRevenue protectionCritical
2RansomwareBusiness continuityCritical
3Threats Against DataRisk reductionHigh
4MalwareOperational excellenceHigh
5Social EngineeringTrust enhancementHigh
6Information ManipulationCompetitive advantageMedium
7Supply Chain AttacksPartnership valueHigh

Attack Tree Analysis (ISMS § 4.6)

Attack trees are mandatory for all Hack23 threat models per ISMS policy. They provide:

Purpose

  • Visual decomposition of attack paths from goal to sub-goals
  • AND/OR relationship mapping between attack steps
  • Success probability calculation for attack paths
  • Critical path identification for mitigation prioritization

Attack Tree Structure

Root: Attack Goal (e.g., "Compromise Application")
├── OR Gate: Any child succeeds → parent succeeds
│   ├── AND Gate: All children must succeed → parent succeeds
│   │   ├── Leaf: Individual attack step (Likelihood: 40%, Impact: High)
│   │   └── Leaf: Individual attack step (Likelihood: 60%, Impact: Medium)
│   └── AND Gate: Alternative attack path
│       ├── Leaf: Attack step 1
│       └── Leaf: Attack step 2
└── OR Gate: Second major attack vector
    └── Leaf: Direct attack

Example: Static Website Compromise (from Riksdagsmonitor)

Root: Compromise Riksdagsmonitor Platform
├── OR: Infrastructure Attack
│   ├── AND: DNS Hijacking
│   │   ├── Compromise Route 53 credentials (Likelihood: 10%, Impact: Critical)
│   │   └── Modify DNS records (Likelihood: 95%, Impact: Critical)
│   └── AND: S3 Bucket Compromise
│       ├── Find misconfigured bucket (Likelihood: 5%, Impact: High)
│       └── Upload malicious content (Likelihood: 90%, Impact: High)
└── OR: Supply Chain Attack
    ├── AND: Compromise GitHub Account
    │   ├── Steal developer credentials (Likelihood: 15%, Impact: Critical)
    │   └── Bypass MFA (Likelihood: 20%, Impact: Critical)
    └── AND: Malicious Dependency Injection
        ├── Compromise npm package (Likelihood: 5%, Impact: High)
        └── Inject malicious code (Likelihood: 80%, Impact: Critical)

Attack Tree Analysis Steps

  1. Goal Identification: Define attacker objectives
  2. Path Decomposition: Break down into AND/OR sub-goals
  3. Leaf Node Likelihood: Assign success probability (1-100%)
  4. Impact Assessment: Use Classification Framework
  5. Path Calculation: Calculate cumulative success likelihood
  6. Critical Path: Identify highest risk paths
  7. Mitigation Priority: Focus on high-likelihood, high-impact leaves

Integration with STRIDE

Each STRIDE threat should have corresponding attack tree showing exploitation paths.

Data Flow Diagrams (DFD)

DFD Elements

  • External Entity: Sources/sinks of data (users, external systems)
  • Process: Data transformation or computation
  • Data Store: Persistent storage
  • Data Flow: Movement between elements
  • Trust Boundary: Security domain separation

STRIDE per DFD Element

ElementApplicable STRIDE Threats
External EntitySpoofing, Repudiation
ProcessAll 6 STRIDE categories
Data StoreTampering, Information Disclosure, DoS
Data FlowTampering, Information Disclosure, DoS
Trust BoundaryElevation of Privilege

Quantitative Risk Assessment

Risk Calculation

Risk = Likelihood × Impact

Likelihood Scoring

  • Critical (5): Near certain (>90%)
  • High (4): Likely (60-90%)
  • Medium (3): Possible (30-60%)
  • Low (2): Unlikely (10-30%)
  • Negligible (1): Rare (<10%)

Impact Scoring (per Classification Framework)

  • Critical (5): >$10K daily, complete outage, criminal charges
  • High (4): $5K-10K daily, major degradation, significant fines
  • Medium (3): $1K-5K daily, moderate impact, compliance violations
  • Low (2): $500-1K daily, minor impact, warnings
  • Negligible (1): <$500 daily, minimal impact, no regulatory

Risk Matrix

Likelihood → ImpactNegligible (1)Low (2)Medium (3)High (4)Critical (5)
Critical (5)MediumHighHighCriticalCritical
High (4)MediumMediumHighHighCritical
Medium (3)LowMediumMediumHighHigh
Low (2)LowLowMediumMediumHigh
Negligible (1)LowLowLowMediumMedium

Threat Model Document Structure

Every repository MUST maintain THREAT_MODEL.md with:

1. System Overview

  • Architecture description
  • Key components and dependencies
  • Trust boundaries
  • Data flows

2. Asset Inventory

  • Critical assets from Asset Register
  • Data classification (per Classification Framework)
  • Crown jewel identification

3. STRIDE Analysis

  • Threat per component
  • Likelihood and impact ratings
  • Attack vectors
  • Existing controls

4. MITRE ATT&CK Mapping

  • Applicable tactics and techniques
  • Attack scenarios
  • Detection opportunities

5. Attack Trees

  • Visual attack path decomposition
  • Success probabilities
  • Critical attack steps

6. Risk Assessment

  • Quantitative risk scores
  • Risk matrix visualization
  • Risk treatment decisions

7. Security Controls

  • Current control implementation
  • Control effectiveness
  • Control gaps

8. Residual Risk

  • Accepted risks with justification
  • Risk owners
  • Monitoring requirements

9. Recommendations

  • Short-term improvements (0-3 months)
  • Medium-term enhancements (3-12 months)
  • Long-term roadmap (12+ months)

Threat Modeling Workflow (ISMS § 6)

Follow this structured 7-phase process for all Hack23 threat models:

Phase 1: Planning (Week 1)

  • Define scope (What systems/components are in scope?)
  • Identify stakeholders (Who needs to be involved?)
  • Select modeling strategies (Which of 5 strategies apply?)
  • Schedule threat modeling session (2-4 hours for initial, 1-2 hours for updates)
  • Gather prerequisites (Architecture diagrams, Asset Register, Classification Framework)

Phase 2: Data Collection (Week 1-2)

  • Review architecture documentation (ARCHITECTURE.md, SECURITY_ARCHITECTURE.md)
  • Create/update Data Flow Diagrams (DFDs) with trust boundaries
  • Identify assets and apply classifications (per Classification Framework)
  • Map data flows and external dependencies
  • Document system components and interfaces

Phase 3: Threat Identification (Week 2-3)

  • Apply STRIDE per DFD element (External Entity, Process, Data Store, Data Flow)
  • Map MITRE ATT&CK tactics to system components
  • Develop attack trees for major threat scenarios (minimum 3-5)
  • Brainstorm attack scenarios (misuse cases, business logic abuse)
  • Identify threat agents and capabilities

Phase 4: Risk Assessment (Week 3)

  • Calculate likelihood per threat (1-5 scale per ISMS § 3.5.1)
  • Calculate impact per threat (1-5 scale per Classification Framework)
  • Compute risk scores (Risk = Likelihood × Impact)
  • Plot risks on risk matrix
  • Identify critical attack paths in attack trees
  • Prioritize threats by risk score

Phase 5: Mitigation Planning (Week 3-4)

  • Review existing controls from SECURITY_ARCHITECTURE.md
  • Assess control effectiveness against identified threats
  • Identify control gaps
  • Recommend new controls (prioritized by risk reduction)
  • Document risk treatment decisions (Avoid, Mitigate, Transfer, Accept)
  • Assign risk owners

Phase 6: Documentation (Week 4)

  • Create/update THREAT_MODEL.md per mandatory structure (§ 5)
  • Update SECURITY_ARCHITECTURE.md with new controls
  • Update Risk_Register.md in ISMS repository
  • Cross-reference documents (Related Documents section)
  • Add Mermaid diagrams with ISMS color palette
  • Include business value quantification

Phase 7: Review & Continuous Improvement (Ongoing)

  • CEO approval (James Pether Sörling)
  • Quarterly threat landscape review (ENISA, MITRE ATT&CK updates)
  • Post-incident threat model update (within 1 week of incidents)
  • Architecture change triggers (new components, trust boundaries)
  • Annual comprehensive review (full STRIDE re-analysis)
  • Lessons learned integration

Best Practices & Quality Standards

✅ Do's

  1. Start Early: Threat model during design phase, not after implementation
  2. Use All 5 Strategies: Attacker, Asset, Architecture, Scenario, Risk-centric
  3. Quantify Risk: Use likelihood × impact matrix, not just qualitative assessment
  4. Document Visually: Mermaid DFDs, attack trees, risk matrices
  5. Link Everything: Cross-reference SECURITY_ARCHITECTURE.md, Risk_Register.md
  6. Business Value: Quantify cost avoidance, competitive advantage
  7. Public Transparency: All threat models public (security through transparency)
  8. Continuous Updates: Threat landscape evolves, models must too
  9. Attack Trees Mandatory: Minimum 3-5 trees per ISMS § 4.6
  10. MITRE ATT&CK Required: Map tactics/techniques per ISMS § 4.6

❌ Don'ts

  1. Skip Attack Trees: ISMS § 4.6 requires attack tree analysis
  2. Generic Threats: Customize to actual system architecture
  3. Ignore Low Risks: Document all risks, even accepted ones
  4. One-Time Activity: Threat modeling is continuous, not one-and-done
  5. Missing Controls: Every threat needs control or risk acceptance
  6. No Quantification: Risk scores required, not just High/Medium/Low
  7. Siloed Analysis: Integrate with ISMS policies (Access Control, Crypto, Network)
  8. Forget Business Value: Security is business enabler, quantify benefits
  9. Incomplete Documentation: Follow mandatory structure § 5 completely
  10. No CEO Approval: All threat models require CEO sign-off

Integration with Hack23 ISMS

Required Policy Cross-References

Every THREAT_MODEL.md must reference and align with:

  1. Information_Security_Policy.md

- Overall security governance framework - Management commitment to security

  1. Access_Control_Policy.md

- Authentication threats → MFA requirements - Authorization threats → RBAC design - Credential threats → Password policies

  1. Data_Classification_Policy.md

- Asset classification (Public, Internal, Confidential, Restricted) - Data handling requirements per classification - Information disclosure threat impact assessment

  1. Network_Security_Policy.md

- Network-based threats and controls - Zero-trust architecture requirements - TLS 1.3 enforcement

  1. Cryptography_Policy.md

- Encryption requirements for data in transit/rest - Key management threats - Cryptographic algorithm standards

  1. Secure_Development_Policy.md

- Application security threats → SAST/DAST requirements - Supply chain threats → Dependency scanning (Dependabot, FOSSA) - Code injection threats → Secure coding standards - Security architecture documentation requirements

  1. Vulnerability_Management.md

- Vulnerability scanning requirements (SonarCloud, Trivy, OWASP ZAP) - Remediation SLAs per severity - Patch management process

  1. Incident_Response_Plan.md

- Detection requirements → SIEM/monitoring configuration - Response procedures → Playbook development - Recovery objectives → RTO/RPO alignment

  1. Business_Continuity_Plan.md

- Availability threats → Redundancy design - Disaster scenarios → DR procedures - Service criticality → Priority ranking

  1. CLASSIFICATION.md

- CIA triad definitions (Confidentiality, Integrity, Availability) - RTO/RPO classifications for availability impact - Business impact analysis for risk quantification

  1. Risk_Register.md

- Enterprise-wide risk tracking - Risk treatment decisions - Risk ownership and accountability

Compliance Framework Mapping

Map all threats and controls to:

ISO 27001:2022 Annex A Controls:

  • A.5.7: Threat Intelligence
  • A.8.1-8.34: Technology Controls (per threat category)
  • A.5.12: Classification of Information
  • A.5.24: Information Security Risk Assessment
  • A.5.25: Information Security Risk Treatment

NIST CSF 2.0 Functions:

  • ID: Asset identification, threat intelligence
  • PR: Security architecture, access control
  • DE: Monitoring, anomaly detection
  • RS: Incident response, communications
  • RC: Recovery planning, improvements

CIS Controls v8.1:

  • Control 1: Inventory and Control of Enterprise Assets
  • Control 4: Secure Configuration of Enterprise Assets
  • Control 5: Account Management
  • Control 10: Malware Defenses
  • Control 13: Network Monitoring and Defense
  • Control 16: Application Software Security

AWS Well-Architected Framework (for AWS projects)

  • Security Pillar: Identity, detective controls, infrastructure protection
  • Reliability Pillar: Fault isolation, DR planning
  • Performance Efficiency: Monitoring, selection

Mermaid Diagram Standards for Threat Models

Use ISMS color palette (per STYLE_GUIDE.md v2.3):

Classification Colors

Critical/Extreme:  #D32F2F  # Red
High/Very High:    #FF9800  # Orange
Medium/Moderate:   #FFC107  # Amber
Low/Standard:      #4CAF50  # Green
Public/Minimal:    #9E9E9E  # Grey

Trust Boundary Colors

External (Untrusted):  #D32F2F  # Red
DMZ (Partially Trusted): #FF9800  # Orange
Internal (Trusted):    #4CAF50  # Green
Secure (Highly Trusted): #2196F3  # Blue

Example DFD with Trust Boundaries

graph TB
    User[End Users<br/>🌐 External]
    CDN[CloudFront CDN<br/>🔒 Edge Security]
    S3[S3 Buckets<br/>💾 Static Content]
    GitHub[GitHub Actions<br/>⚙️ CI/CD]

    User -->|HTTPS TLS 1.3| CDN
    CDN -->|Serves| S3
    GitHub -->|Deploy OIDC| S3

    subgraph External["🔴 Untrusted Zone"]
        User
    end

    subgraph Edge["🟠 Edge Security Zone"]
        CDN
    end

    subgraph Internal["🟢 Trusted AWS Zone"]
        S3
        GitHub
    end

    style User fill:#D32F2F,color:#fff
    style CDN fill:#FF9800,color:#000
    style S3 fill:#4CAF50,color:#000
    style GitHub fill:#4CAF50,color:#000

Remember: Hack23 Threat Modeling Philosophy

  1. 🔍 Proactive Not Reactive: Identify threats before they materialize
  2. 🏰 Defense in Depth: Multiple security layers reduce single point of failure
  3. 📊 Risk-Based Prioritization: Focus resources on high-impact threats first
  4. 🔄 Continuous Process: Threat landscape evolves, models must evolve too
  5. 📝 Documentation Essential: THREAT_MODEL.md is mandatory, not optional
  6. 🔗 Integration Critical: Align with all ISMS policies for consistency
  7. 🌟 Transparency Advantage: Public threat models demonstrate security expertise
  8. 💹 Quantitative Assessment: Numbers drive decisions, not gut feelings
  9. 🎯 Business Value: Security enables business, quantify the benefits
  10. ✅ CEO Accountability: James Pether Sörling approves all threat models

"Security through transparency" - Hack23 AB

Hack23 Threat Model Examples

Per ISMS Threat_Modeling.md § 7, all Hack23 projects maintain comprehensive threat models demonstrating security excellence through transparency.

1. 🏛️ Citizen Intelligence Agency (CIA)

Repository: Hack23/cia Threat Model: THREAT_MODEL.md Architecture: Full-stack web application (Java/Spring Boot + PostgreSQL + AWS)

Key Characteristics:

  • System Type: Multi-tier web application with database and external integrations
  • Data Classification: Public (parliamentary data) + Internal (system credentials)
  • Threats: STRIDE analysis across 6 layers (Frontend, Backend, Database, AWS, CI/CD, Supply Chain)
  • MITRE ATT&CK: 14 tactics mapped with 40+ techniques
  • Attack Trees: 8 comprehensive trees for major attack scenarios
  • Risk Level: MEDIUM (6.5/10.0) after controls, 92.3% risk reduction
  • Controls: Defense-in-depth with AWS Well-Architected Framework alignment

Notable Sections:

  • Comprehensive DFD with 5 trust boundaries
  • Quantitative risk matrix (Likelihood × Impact)
  • PostgreSQL-specific tampering and DoS threats
  • Supply chain attack trees (npm, Maven dependencies)
  • Detailed MITRE ATT&CK technique mapping per component
  • Business value integration (€200K+ cost avoidance through proactive security)

Use CIA as reference for:

  • Multi-tier application threat modeling
  • Database security threat analysis
  • Complex supply chain threat modeling
  • Comprehensive MITRE ATT&CK integration

2. 🎮 Black Trigram (흑괘)

Repository: Hack23/blacktrigram Threat Model: THREAT_MODEL.md Architecture: Frontend-only gaming application (React + Vite + Phaser.js)

Key Characteristics:

  • System Type: Client-side gaming application with no backend
  • Data Classification: Public (game content) + Internal (GitHub credentials)
  • Threats: STRIDE analysis focused on frontend, CI/CD, and CDN
  • MITRE ATT&CK: 12 tactics with gaming-specific techniques
  • Attack Trees: 6 trees covering game hacking, cheating, and infrastructure
  • Risk Level: LOW (4.2/10.0) after controls, 95.8% risk reduction
  • Controls: CSP, SRI, no sensitive data storage, immutable game state

Notable Sections:

  • Game-specific threats (cheating, save game manipulation, asset theft)
  • Client-side security analysis (XSS, prototype pollution, memory manipulation)
  • React and Vite supply chain risks
  • Browser-based attack scenarios
  • Phaser.js framework-specific vulnerabilities

Use Black Trigram as reference for:

  • Frontend-only application threat modeling
  • Gaming application security analysis
  • Client-side attack scenarios
  • No-backend architecture threats

3. 🗳️ Riksdagsmonitor (Current Project)

Repository: Hack23/riksdagsmonitor Threat Model: THREAT_MODEL.md Architecture: Static HTML/CSS website with Chart.js/D3.js dashboards + AWS CloudFront CDN

Key Characteristics:

  • System Type: Static website with interactive JavaScript dashboards
  • Data Classification: Public (all content, Swedish Parliament data)
  • Threats: STRIDE analysis for static hosting, CDN, and external data links
  • MITRE ATT&CK: 11 tactics focusing on infrastructure and supply chain
  • Attack Trees: Required expansion per this issue
  • Risk Level: LOW (5.52/10.0) after controls, 99.7% risk reduction
  • Controls: HTTPS-only, CSP, SRI, GitHub Pages DR, CloudFront distribution

Notable Sections:

  • Static site-specific threats (domain hijacking, CDN compromise, typosquatting)
  • Multi-language website security (14 languages)
  • Chart.js/D3.js dashboard vulnerabilities
  • CSV data integrity threats (CIA platform data)
  • AWS CloudFront and S3 infrastructure threats
  • Agentic workflow threats (Claude Opus 4.6 news generation)

Use Riksdagsmonitor as reference for:

  • Static website threat modeling
  • CDN security analysis
  • Multi-language site threats
  • Data visualization security
  • AI agentic workflow security

4. 📊 CIA Compliance Manager

Repository: Hack23/cia-compliance-manager (referenced in ISMS policy) Threat Model: THREAT_MODEL.md Architecture: Static HTML/CSS compliance dashboard

Key Characteristics:

  • System Type: Static compliance visualization platform
  • Data Classification: Public (compliance frameworks) + Internal (API tokens)
  • Threats: Similar to riksdagsmonitor but focused on compliance data integrity
  • Risk Level: LOW (targeted at auditors and compliance teams)
  • Controls: Read-only public data, no user authentication

Use CIA Compliance Manager as reference for:

  • Compliance dashboard threat modeling
  • Read-only platform security
  • Framework mapping security

❌ WRONG STRUCTURE (Do NOT Use)

NEVER use numbered sections (1-10) like this:

## 1. System Boundary and Assets
## 2. STRIDE Threat Analysis
## 3. Attack Trees
## 4. MITRE ATT&CK Mapping
## 5. Risk Quantification
## 6. Threat Scenarios
## 7. Security Metrics
## 8. Assumptions and Constraints
## 9. Recommendations
## 10. Approval and Review

Why wrong: This generic structure is NOT aligned with Hack23 ISMS Threat_Modeling.md policy and does NOT demonstrate the 5-strategy integrated approach or domain expertise.


✅ CORRECT STRUCTURE: Hack23 Thematic Sections

All Hack23 threat models use thematic sections (not numbered) that demonstrate comprehensive threat modeling maturity. Structure varies by project domain but core sections are mandatory.

Mandatory Core Sections (All Projects)

1. Header Section (per STYLE_GUIDE.md v2.3)

<p align="center">
  <img src="https://hack23.com/icon-192.png" alt="Hack23 Logo" width="192" height="192">
</p>

<h1 align="center">🎯 [Project Name] — Threat Model</h1>

<p align="center">
  <strong>🛡️ Proactive Security Through Structured Threat Analysis</strong><br>
  <em>🔍 STRIDE • MITRE ATT&CK • [Architecture Type] • [Key Security Focus]</em>
</p>

<p align="center">
  <a href="#"><img src="https://img.shields.io/badge/Owner-CEO-0A66C2?style=for-the-badge" alt="Owner"/></a>
  <a href="#"><img src="https://img.shields.io/badge/Version-1.0-555?style=for-the-badge" alt="Version"/></a>
  <a href="#"><img src="https://img.shields.io/badge/Effective-YYYY--MM--DD-success?style=for-the-badge" alt="Effective Date"/></a>
  <a href="#"><img src="https://img.shields.io/badge/Review-Quarterly-orange?style=for-the-badge" alt="Review Cycle"/></a>
</p>

**📋 Document Owner:** CEO | **📄 Version:** 1.0 | **📅 Last Updated:** YYYY-MM-DD (UTC)
**🔄 Review Cycle:** Quarterly | **⏰ Next Review:** YYYY-MM-DD
**🏢 Owner:** Hack23 AB (Org.nr 5595347807) | **🏷️ Classification:** Public

2. CEO Purpose Statement

Quote from CEO James Pether Sörling connecting threat modeling to Hack23's transparency and security excellence principles:

*"At Hack23, we believe that true security comes through transparency and demonstrable practices. This threat model is publicly available to showcase our proactive security posture, allowing clients and stakeholders to verify our commitment to security excellence. By openly documenting our threat analysis, we demonstrate not just what we protect, but how we protect it."*

3. Executive Summary

  • High-level threat overview
  • Key risk metrics (High/Medium/Low threat counts)
  • Residual risk level
  • Major findings and recommendations

4. System Boundary and Assets (ISMS § 5.1)

  • System Components: Mermaid diagram showing architecture with trust boundaries
  • Assets: Table with Asset, Type, Classification (per Classification Framework), Value
  • Trust Boundaries: List all trust boundary crossings

5. STRIDE Threat Analysis (ISMS § 5.2)

For each STRIDE category (Spoofing, Tampering, Repudiation, Information Disclosure, DoS, Elevation of Privilege):

  • Threat Description: What the threat is
  • Attack Vector: How it's exploited
  • Likelihood: Low/Medium/High/Critical (1-5 score)
  • Impact: Based on Classification Framework (1-5 score)
  • Risk Score: Likelihood × Impact
  • Current Controls: Existing mitigations
  • Residual Risk: After controls
  • Recommendations: Additional mitigations needed

6. Attack Tree Analysis (ISMS § 5.3) - MANDATORY

Minimum 3-5 attack trees showing major attack scenarios:

  • Root goal (e.g., "Compromise Application")
  • AND/OR gate structure
  • Leaf nodes with success likelihood
  • Visual representation in Mermaid or text format
  • Critical path identification

7. MITRE ATT&CK Mapping (ISMS § 5.4) - MANDATORY

Map applicable tactics and techniques:

  • Tactic: MITRE ATT&CK tactic (e.g., Initial Access, Execution)
  • Technique: Specific technique ID (e.g., T1566 - Phishing)
  • Sub-Technique: If applicable
  • System Component: Where it applies
  • Detection: How to detect
  • Mitigation: How to prevent

8. Risk Assessment Summary (ISMS § 5.5)

  • Risk Matrix: Visual Likelihood × Impact matrix
  • Risk Distribution: Count of Critical/High/Medium/Low risks
  • Risk Treatment Decisions: Per threat (Avoid, Mitigate, Transfer, Accept)
  • Residual Risk Justification: Why remaining risk is acceptable

9. Security Controls (ISMS § 5.6)

Reference SECURITY_ARCHITECTURE.md with:

  • Control categories (Preventive, Detective, Corrective)
  • Implementation status
  • Control effectiveness rating
  • Control gaps and roadmap

10. Business Value Integration (ISMS § 5.7) - REQUIRED

Quantify security business value:

  • 🏆 Competitive Advantage: Market differentiation through transparent security
  • 🤝 Customer Trust: Demonstrable security posture
  • 💰 Cost Avoidance: Prevented incident costs (quantify)
  • 🔄 Operational Excellence: Reduced security overhead
  • 💡 Innovation Enablement: Secure experimentation
  • 🛡️ Risk Reduction: Quantitative risk reduction percentage

11. Compliance Mapping (ISMS § 5.8)

Map threats and controls to:

  • ISO 27001:2022: Relevant Annex A controls
  • NIST CSF 2.0: Functions and categories
  • CIS Controls v8.1: Applicable controls
  • AWS Well-Architected: For AWS projects

12. Related Documents (ISMS § 5.9)

## 📚 Related Documents

- [🏛️ Architecture](./ARCHITECTURE.md) - System architecture with C4 models
- [🔐 Security Architecture](./SECURITY_ARCHITECTURE.md) - Security controls implementation
- [📊 Data Model](./DATA_MODEL.md) - Data entities and relationships
- [🔄 Workflows](./WORKFLOWS.md) - CI/CD security workflows
- [📋 ISMS Threat Modeling Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Threat_Modeling.md) - Comprehensive methodology
- [🏷️ Classification Framework](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md) - Business impact analysis
- [📉 Risk Register](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Risk_Register.md) - Enterprise risk management
- [🛠️ Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md) - SDLC security requirements

**Reference Implementations:**
- [🏛️ CIA Threat Model](https://github.com/Hack23/cia/blob/master/THREAT_MODEL.md) - Full-stack web application
- [🎮 Black Trigram Threat Model](https://github.com/Hack23/blacktrigram/blob/main/THREAT_MODEL.md) - Frontend gaming application
- [📊 CIA Compliance Manager](https://github.com/Hack23/cia-compliance-manager/blob/main/THREAT_MODEL.md) - Compliance dashboard

13. Document Control Footer (ISMS § 5.10)

---

**📋 Document Control:**
**✅ Approved by:** James Pether Sörling, CEO
**📤 Distribution:** Public
**🏷️ Classification:** [![Confidentiality: Public](https://img.shields.io/badge/C-Public-lightgrey?style=flat-square)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#confidentiality-levels)
**📅 Effective Date:** YYYY-MM-DD
**⏰ Next Review:** YYYY-MM-DD
**🎯 Framework Compliance:** [![ISO 27001](https://img.shields.io/badge/ISO_27001-2022_Aligned-blue?style=flat-square&logo=iso&logoColor=white)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md) [![NIST CSF 2.0](https://img.shields.io/badge/NIST_CSF-2.0_Aligned-green?style=flat-square&logo=nist&logoColor=white)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md) [![CIS Controls](https://img.shields.io/badge/CIS_Controls-v8.1_Aligned-orange?style=flat-square&logo=cisecurity&logoColor=white)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md)

References

Hack23 ISMS Documentation

External Frameworks

Remember

  • Proactive Not Reactive: Identify threats before they materialize
  • Defense in Depth: Multiple security layers
  • Risk-Based Prioritization: Focus on high-impact threats
  • Continuous Process: Threat landscape evolves
  • Documentation Essential: THREAT_MODEL.md is mandatory
  • Integration Critical: Align with ISMS policies
  • Transparency Advantage: Public threat models demonstrate expertise
  • Quantitative Assessment: Numbers drive decisions

平台分布

Codex

37.76%
按下载量换算43

Claude

30.53%
按下载量换算35

Cursor

18.52%
按下载量换算21

Gemini CLI

10.03%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills