Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.47
    Preparing search index...

    Hack23 Logo

    ๐ŸŽฏ Hack23 AB โ€” Riksdagsmonitor Threat Model

    ๐Ÿ›ก๏ธ Proactive Security Through Structured Threat Analysis
    ๐Ÿ” STRIDE โ€ข MITRE ATT&CK โ€ข Static Website โ€ข AI-Powered News โ€ข Democratic Transparency

    Owner Version Effective Date Review Cycle

    ๐Ÿ“‹ Document Owner: CEO | ๐Ÿ“„ Version: 2.0 | ๐Ÿ“… Last Updated: 2026-06-02 (UTC) ๐Ÿ”„ Review Cycle: Quarterly | โฐ Next Review: 2026-09-02 ๐Ÿข Owner: Hack23 AB (Org.nr 5595347807) | ๐Ÿท๏ธ Classification: Public


    Establish a comprehensive threat model for Riksdagsmonitor, a democratic transparency platform monitoring Swedish Parliament (Riksdag) and Government (Regeringen) activity. This systematic threat analysis integrates multiple frameworksโ€”STRIDE, MITRE ATT&CK, Attack Trees, OWASP LLM Top 10, and GitHub Agentic Workflows (gh-aw) Defense-in-Depth Security Architectureโ€”to ensure proactive security through structured analysis of the static website infrastructure with interactive Chart.js/D3.js dashboards and AI-powered content generation workflows leveraging gh-aw's five-layer security model.

    This threat model demonstrates ๐Ÿ›ก๏ธ cybersecurity consulting expertise through public documentation of advanced threat assessment methodologies for civic transparency platforms, showcasing our ๐Ÿ† competitive advantage via systematic risk management and ๐Ÿค customer trust through transparent security practices.

    "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 for Riksdagsmonitor, we demonstrate not just what we protect, but how we protect itโ€”reinforcing democratic accountability through secure civic technology."

    โ€” James Pether Sรถrling, CEO & CISO, Hack23 AB

    • ๐ŸŽญ STRIDE per element: Systematic threat categorization for static hosting, CDN, dashboards, and AI workflows
    • ๐ŸŽ–๏ธ MITRE ATT&CK mapping: Infrastructure and supply chain attack techniques
    • ๐Ÿ—๏ธ Asset-centric analysis: Democratic transparency data and Swedish Parliament content protection
    • ๐ŸŽฏ Scenario-centric modeling: Real-world attack simulation for civic platforms with AI content generation
    • โš–๏ธ Risk-centric assessment: Business impact quantification and democratic accountability
    • ๐Ÿค– OWASP LLM Top 10: AI/LLM-specific threat assessment for agentic news generation
    • ๐Ÿ›ก๏ธ GitHub Agentic Workflows (gh-aw): Five-layer defense-in-depth security architecture (Substrate โ†’ Configuration โ†’ Plan โ†’ SafeOutputs โ†’ Network Firewall)
    • ๐Ÿ‡ช๐Ÿ‡บ EU AI Act: Transparency obligations and human oversight for AI-generated political content

    Included Systems:

    • ๐ŸŒ Static HTML/CSS website (14-language support: Swedish, English, Danish, Norwegian, Finnish, German, French, Spanish, Dutch, Arabic, Hebrew, Japanese, Korean, Chinese)
    • ๐Ÿ“Š Chart.js/D3.js interactive dashboards (all functional: overview, party performance, committee network, coalition, election-cycle, risk, anomaly detection, seasonal patterns, pre-election, ministry, politician)
    • โ˜๏ธ AWS CloudFront CDN + S3 storage (us-east-1 primary, eu-west-1 replica)
    • ๐Ÿ”€ Route 53 DNS configuration with health checks
    • ๐Ÿ”„ GitHub Pages disaster recovery (automatic failover)
    • ๐Ÿค– 14 AI agentic news workflows. The 13 analysis/article workflows use Claude Opus 4.8 (reasoning model) and the high-volume news-translate fan-out uses Claude Sonnet 4.6 (faster model). Each analysis/article workflow enforces analysis โ†’ analysis gate โ†’ render โ†’ safe-output PR with 23 required analysis artifacts before article generation. Examples:
      • news-evening-analysis: 18:00 UTC Mon-Fri, 16:00 UTC Sat (Claude Opus 4.8)
      • news-realtime-monitor: 10:00+14:00 UTC Mon-Fri, 12:00 UTC weekends (Claude Opus 4.8)
      • news-translate: out-of-band fan-out from rendered EN+SV to 12 other languages (Claude Sonnet 4.6)
    • ๐Ÿ”Œ riksdag-regering-mcp server (32 tools for Swedish political data)
    • ๐Ÿญ CI/CD security pipeline (GitHub Actions with OIDC)
    • ๐Ÿ“ฆ Dependency management and supply chain (Chart.js, D3.js, Vite, npm, GitHub Actions)

    Out of Scope:

    • Backend services (none existโ€”frontend-only architecture)
    • User data persistence (public read-only platform, no user accounts)
    • CIA platform backend security (external data source)
    • Third-party CDN infrastructure security (jsDelivr for Chart.js/D3.js)
    • End-user device security beyond browser environment
    • Anthropic Claude API internal security (vendor responsibility)

    Integrated with ๐ŸŽฏ Hack23 AB Threat Modeling Policy methodology, following the five-strategy integrated approach:

    1. Attacker-centric (MITRE ATT&CK)
    2. Asset-centric (Crown Jewels)
    3. Architecture-centric (STRIDE per element)
    4. Scenario-centric (Misuse cases)
    5. Risk-centric (Quantitative assessment)

    Additionally aligned with Hack23 AI Policy for LLM application security.

    This threat model systematically analyzes security for Riksdagsmonitor using thematic Hack23 structure, identifies 52 threats across 6 STRIDE categories + 18 AI-specific threats (OWASP LLM Top 10), documents the GitHub Agentic Workflows (gh-aw) five-layer defense-in-depth security architecture, and documents comprehensive mitigations aligned with Hack23 AB's ISMS. Five external data-integration trust boundaries (IMF, Statskontoret, SCB, World Bank, Riksrevisionen) receive dedicated STRIDE addenda in the integration sections at the end of this document.

    Key Findings:

    • Critical-Risk Threats: 0 (All critical threats mitigated)
    • High-Risk Threats: 2 (Enhanced monitoring + Q1 2026 remediation)
    • Medium-Risk Threats: 8 (Controls in place, continuous monitoring)
    • Low-Risk Threats: 42 (Accepted with controls)
    • AI-Specific Threats: 18 (OWASP LLM Top 10 coverage)
    • gh-aw Security Layers: 5 (Substrate, Configuration, Plan, SafeOutputs, Network Firewall)
    • Democratic Integrity Threats: 12 (Swedish political context + civic technology scenarios)
    • Attack Trees: 9 attack trees (3 dedicated + 6 embedded scenarios)
    • MITRE ATT&CK Techniques: 23 mapped
    • Residual Risk: LOW (3.2/10.0) - Acceptable for public civic transparency platform

    Highest Priority Threats:

    1. AI-H1 (LLM09 Overreliance): Hallucinated parliamentary data - Risk Score 3.2/10
    2. T1 (Tampering): Repository content tampering - Risk Score 2.4/10
    3. AI-P1 (LLM01 Prompt Injection): Indirect prompt injection - Risk Score 2.8/10

    DocumentDescriptionStatusRelevance to Threat Model
    ๐ŸŽฏ THREAT_MODEL.md โ† (this document)STRIDE, ATT&CK, Attack Trees, Crown Jewels, Risk Analysisโœ… CurrentPrimary document
    ๐Ÿ›๏ธ ARCHITECTURE.mdC4 Context/Container/Component modelsโœ… CurrentSystem boundaries, trust zones
    ๐Ÿ” SECURITY_ARCHITECTURE.mdSecurity controls implementation (CSP, SRI, IAM)โœ… CurrentControl effectiveness mapping
    ๐Ÿ”ฎ FUTURE_SECURITY_ARCHITECTURE.mdPlanned security improvementsโœ… CurrentRoadmap for gap closure
    ๐Ÿ“Š DATA_MODEL.mdPolitical data entities and relationshipsโœ… CurrentData integrity requirements
    ๐Ÿ”„ FLOWCHART.mdBusiness process and data flowsโœ… CurrentAttack surface identification
    ๐Ÿ“ˆ STATEDIAGRAM.mdSystem state transitions and lifecyclesโœ… CurrentState-based threat scenarios
    ๐Ÿง  MINDMAP.mdSystem conceptual relationshipsโœ… CurrentAsset dependency mapping
    ๐Ÿ’ผ SWOT.mdStrategic analysis and positioningโœ… CurrentThreat opportunity alignment
    ๐Ÿ—๏ธ FUTURE_ARCHITECTURE.mdArchitectural evolution roadmapโœ… CurrentFuture attack surface changes
    ๐Ÿ“Š FUTURE_DATA_MODEL.mdEnhanced data architecture plansโœ… CurrentFuture data integrity risks
    ๐Ÿ”„ FUTURE_FLOWCHART.mdImproved process workflowsโœ… CurrentFuture DFD/STRIDE analysis
    ๐Ÿ“ˆ FUTURE_STATEDIAGRAM.mdAdvanced state managementโœ… CurrentFuture state threat scenarios
    ๐Ÿง  FUTURE_MINDMAP.mdCapability expansion plansโœ… CurrentFuture asset identification
    ๐Ÿ’ผ FUTURE_SWOT.mdFuture strategic opportunitiesโœ… CurrentStrategic risk forecasting
    ๐Ÿ”ง WORKFLOWS.mdCI/CD automation and pipelinesโœ… CurrentPipeline security analysis
    ๐Ÿ›ก๏ธ CRA-ASSESSMENT.mdEU Cyber Resilience Act conformityโœ… CurrentCRA compliance evidence

    DimensionLevelRationaleBusiness Impact
    ๐Ÿ” ConfidentialityPublicAll content intentionally disclosed (Swedish Riksdag open data, AI-generated news, website content)Trust Enhancement
    ๐Ÿ”’ IntegrityHighAutomated validation, digital signatures (Git/GPG commits), accurate political data required, AI output verificationOperational Excellence
    โšก AvailabilityHigh99.998% design availability target (AWS CloudFront 99.9% SLA), automated multi-region failover, GitHub Pages DRRevenue Protection

    Overall Security Classification: PUBLIC / HIGH / HIGH (C/I/A)

    Compliance AreaClassificationImplementation Status
    ๐Ÿ“‹ Regulatory ExposureLowPublic information dissemination only; GDPR applies for public-official data processing (public interest/legitimate interest grounds per GDPR Art. 6(1)(e))
    ๐Ÿ‡ช๐Ÿ‡บ CRA (EU Cyber Resilience Act)StandardNon-commercial OSS civic transparency platform; self-assessment approach per Recital 18
    ๐Ÿค– EU AI ActLimited Risk (Article 52)Transparency obligations (AI-generated content disclosure), human oversight required, no high-risk use cases
    ๐Ÿ“Š GDPR Data ProcessingPublic Officials OnlyPersonal data (names, roles, voting records, intressent_id) from Swedish Riksdag open data; no special-category data (Art. 9) or private individuals
    ๐Ÿ”„ RPO / RTORPO: 4-24h / RTO: 1-4hDaily data pipeline updates, Git version control, S3 versioning; automated multi-region failover
    Impact CategoryLevelDescriptionAnnual Cost Avoidance
    FinancialLowMinimal financial impact (<$500 daily) - Open-source project, no revenue dependency$0
    OperationalModeratePartial service impact - Swedish political transparency temporarily unavailable$2,400/year
    ReputationalHighIndustry-wide attention - Transparency advocates, media, civil society notice outages or misinformation$50,000/year
    RegulatoryLowNo regulatory fines - Public information dissemination only, GDPR legitimate interest applies$0

    Total Annual Cost Avoidance Through Security Controls: $52,400

    CharacteristicValueSecurity Implications
    Geographic ReachGlobal (14 languages)Multi-region CDN required, translation integrity critical
    User BasePublic (unlimited)No authentication, DDoS resilience required
    Data Volume~150 MB static content + 500MB political data (CSV)S3 versioning, CDN caching, bandwidth management
    Update FrequencyDaily (data pipeline) + Real-time (news workflows)CI/CD security critical, rollback procedures essential
    Availability Target99.998% (5.2 minutes/month downtime)Multi-region architecture, health checks, DR failover
    Peak TrafficSwedish election periods (4x normal)AWS CloudFront auto-scaling, GitHub Pages DR capacity

    Following Hack23 AB Asset-Centric Threat Modeling methodology, we identify "Crown Jewels" requiring highest protection:

    Asset CategoryWhy Valuable (Crown Jewel Rationale)Primary ThreatsKey ControlsBusiness ValueAnnual Cost Avoidance
    ๐Ÿ“Š Dashboard IntegrityPolitical data accuracy drives user trust; manipulation undermines democratic transparency missionContent manipulation, XSS injection, data tamperingCSP headers, SRI hashes, Git immutability, dual deployment (AWS+GitHub)Trust Enhancement$30,000
    ๐Ÿ—ณ๏ธ Parliamentary DataSwedish Riksdag voting records, committee reports, parliamentary documentsโ€”core mission assetData falsification, integrity compromise, hallucinationCIA platform validation, riksdag-regering-mcp verification, daily pipeline updates, version controlCompetitive Advantage$40,000
    ๐Ÿ“ˆ External Economic Context (SCB + World Bank + IMF)Three-source economic data foundation for policy analysis and news enrichment: SCB MCP (official Swedish statistics), World Bank MCP (governance/environment/long-horizon social), IMF pure-TS client (WEO/Fiscal Monitor/IFS + T+5 projections)Upstream outage, DNS/TLS MITM, stale WEO vintage, cache poisoning of analysis/data/imf/, rate-limit saturationEgress allowlist (scb.se, worldbank.org, data.imf.org, api.imf.org, www.imf.org); DatamapperResponse schema validation in scripts/imf-client.ts; .meta.json tamper-evident sidecars recording projectionVintage; graceful fallback (optional-enrichment semantics); npm SBOM coverage (no external MCP package) โ€” see TB-6aInnovation Enablement$10,000
    ๐Ÿง  Source Code & AlgorithmsDashboard visualization logic, Chart.js/D3.js integrations, AI workflow orchestrationIP theft, malicious injection, supply chain attacksPrivate repo access controls, dependency scanning (Dependabot + CodeQL), GPG commit signingOperational Excellence$15,000
    ๐ŸŒ Riksdagsmonitor BrandMarket reputation, stakeholder trust, search engine positioningDomain hijacking, phishing, brand impersonation, SEO poisoningDomain monitoring, HTTPS enforcement, DNSSEC, HSTS preload, trademark registrationRisk Reduction$20,000
    โ˜๏ธ Infrastructure ConfigAWS CloudFront, S3, Route 53 security baseline; GitHub Actions secretsInfrastructure compromise, misconfiguration, credential exposureIAM least privilege, OIDC (no long-lived keys), AWS Config rules, secret scanningSecurity Excellence$25,000
    ๐Ÿค– AI News ContentAutomated journalism credibility; trusted source for Swedish political analysisPrompt injection, hallucination, bias, misinformationClaude Opus 4.8 with Anthropic guardrails, riksdag-regering-mcp validation, mandatory PR review, fact-checking protocolInnovation Enablement$50,000

    Total Asset Value (Annual Cost Avoidance): $180,000

    Crown Jewels are the top 5 highest-value assets that adversaries most desire and whose compromise would cause the greatest harm to Riksdagsmonitor's democratic transparency mission.

    Crown Jewel RankAssetCrown Jewel RationaleAttack AttractivenessCompromise ImpactProtection Priority
    ๐Ÿ‘‘ #1๐Ÿ—ณ๏ธ Election Data IntegrityAccuracy of election predictions, seat forecasts, and voting record aggregation from CIA platform; any manipulation directly undermines democratic accountabilityVERY HIGH โ€” Nation-state actors, political adversaries, election interference campaignsCatastrophic: Misinformation affects public understanding of Swedish democratic processes, potential election influenceCRITICAL โ€” Multiple overlapping controls
    ๐Ÿ‘‘ #2๐Ÿ“Š Dashboard Data AccuracyCIA platform data pipeline integrity and Chart.js/D3.js visualizations; primary channel for political transparency; 14-language real-time displayHIGH โ€” Data accuracy is core mission; CSP/SRI protect against XSS/CDN tamperingHigh: Corrupted dashboards erode public trust, could misrepresent party standings or vote outcomesHIGH โ€” SRI hashes, CSP, dual-region
    ๐Ÿ‘‘ #3๐ŸŒ Multi-Language Content14-language factual consistency (SV, EN, DA, NO, FI, DE, FR, ES, NL, AR, HE, JA, KO, ZH); translation divergence enables targeted disinformation campaigns in specific languagesHIGH โ€” RTL (Arabic/Hebrew) harder to validate; targeted manipulation of specific language communitiesHigh: Language-specific manipulation could spread unchecked; undermines trust of multilingual audienceHIGH โ€” TRANSLATION_GUIDE.md, Playwright RTL testing
    ๐Ÿ‘‘ #4๐Ÿ”‘ CI/CD Pipeline SecurityGitHub Actions OIDC, supply chain integrity, SHA-pinned actions, SLSA attestations; compromise enables persistent content injection with no trust boundary to stop itHIGH โ€” Supply chain attacks (SolarWinds-pattern) increasingly common against civic platformsCatastrophic: Persistent backdoor in CI/CD bypasses all publication controls; could inject malicious HTML into all pagesCRITICAL โ€” OIDC, SHA-pinning, branch protection
    ๐Ÿ‘‘ #5๐Ÿ“ฐ News Article CredibilityAI-generated (Claude Opus 4.8) daily political news accuracy; journalistic credibility for Swedish parliamentary and government activity reportingMEDIUM-HIGH โ€” Prompt injection, hallucination; AI-generated political misinformation campaignsHigh: Fabricated parliamentary data damages reputation, could be amplified by external media; EU AI Act liabilityHIGH โ€” Mandatory PR review, dok_id validation

    Crown Jewel Protection Strategy:

    • ๐Ÿ” Defense-in-Depth: Every Crown Jewel has โ‰ฅ3 overlapping controls (no single point of failure)
    • ๐ŸŽฏ Zero-Tolerance Policy: Crown Jewels #1 and #4 have CRITICAL integrity requirements โ€” any detected compromise triggers immediate incident response
    • ๐Ÿ” Enhanced Monitoring: Crown Jewels receive continuous automated monitoring plus human spot-checks
    • ๐Ÿ“‹ Quarterly Review: Crown Jewel list reviewed quarterly and after any significant architectural change
    AssetConfidentiality GoalIntegrity GoalAvailability Goal
    Dashboard CodePublic (open source)HIGH - No unauthorized modificationsHIGH - 99.95% uptime
    Political DataPublic (Swedish law)CRITICAL - 100% accuracy requiredHIGH - Daily updates essential
    InfrastructureInternal (AWS configs)HIGH - Prevent misconfigurationCRITICAL - 99.998% target
    AI ContentPublic (after review)CRITICAL - Zero hallucinations publishedMEDIUM - Graceful degradation OK
    Brand AssetsPublic (marketing)HIGH - Authentic representationMEDIUM - Backup channels exist

    Complete asset inventory with classifications:

    Asset IDAsset NameTypeClassification (C/I/A)ValueOwnerLocation
    ASSET-001Riksdagsmonitor WebsiteApplicationPUBLIC/HIGH/HIGHCRITICALCEOGitHub Pages + AWS CloudFront
    ASSET-002Dashboard JavaScript (Chart.js/D3.js)ApplicationPUBLIC/HIGH/HIGHHIGHCEOGitHub Repository
    ASSET-003Political Data (CSV)DataPUBLIC/HIGH/HIGHCRITICALCEOS3 buckets (us-east-1, eu-west-1)
    ASSET-004GitHub RepositoryInfrastructurePUBLIC/HIGH/CRITICALHIGHCEOGitHub.com
    ASSET-005AWS Infrastructure (S3, CloudFront, Route 53)InfrastructureINTERNAL/HIGH/CRITICALHIGHCEOAWS (us-east-1, eu-west-1)
    ASSET-006GitHub Actions Secrets (AWS OIDC)CredentialsCONFIDENTIAL/CRITICAL/HIGHCRITICALCEOGitHub Secrets
    ASSET-007AI Workflows (Claude Opus 4.8 + Sonnet 4.6)ApplicationPUBLIC/HIGH/MEDIUMHIGHCEOGitHub Actions
    ASSET-008riksdag-regering-mcp ServerIntegrationPUBLIC/HIGH/HIGHHIGHCEORender.com
    ASSET-009Domain Name (riksdagsmonitor.com)InfrastructurePUBLIC/HIGH/CRITICALCRITICALCEORoute 53
    ASSET-010Brand & ReputationIntangiblePUBLIC/HIGH/MEDIUMHIGHCEON/A

    This section integrates STRIDE per element analysis into architecture diagrams, following Hack23 Threat Modeling Policy ยง 4.3 methodology.

    graph TB
    subgraph External["๐Ÿ”ด Untrusted Zone - Internet"]
    User[๐ŸŒ End Users<br/>Global Audience<br/>14 Languages]
    Attacker[๐Ÿ’€ Threat Actors<br/>Nation-state APTs<br/>Cybercriminals<br/>Hacktivists]
    end

    subgraph Edge["๐ŸŸ  Edge Security Zone - CDN Layer"]
    CloudFront[โ˜๏ธ AWS CloudFront<br/>Primary CDN<br/>99.9% SLA]
    GitHubPages[๐Ÿ”„ GitHub Pages<br/>DR Fallback<br/>Automatic Failover]
    end

    subgraph Internal["๐ŸŸข Trusted Zone - Hack23 Control"]
    Repo[๐Ÿ“ฆ GitHub Repository<br/>Source Code<br/>GPG Signed Commits]
    Actions[โš™๏ธ GitHub Actions<br/>CI/CD Pipeline<br/>OIDC Auth]
    S3[๐Ÿ’พ S3 Buckets<br/>Static Content<br/>Cross-Region Replication]
    end

    subgraph External2["๐Ÿ”ด External Data Sources"]
    MCP[๐Ÿ”Œ riksdag-regering-mcp<br/>32 Political Tools<br/>Render.com]
    Claude[๐Ÿค– Claude Opus 4.8<br/>AI Content Generation<br/>GitHub Copilot API]
    RiksdagAPI[๐Ÿ›๏ธ data.riksdagen.se<br/>Swedish Parliament Open Data]
    end

    User -->|HTTPS TLS 1.3| CloudFront
    User -->|HTTPS Failover| GitHubPages
    Attacker -.->|Attack Vectors| User
    Attacker -.->|DDoS/Injection| CloudFront

    CloudFront -->|Serves Content| S3
    GitHubPages -->|Serves Content| Repo

    Actions -->|Deploy OIDC| S3
    Actions -->|Deploy| Repo
    Actions -->|Call API| Claude
    Actions -->|Query Data| MCP

    MCP -->|Fetch Data| RiksdagAPI

    style User fill:#90caf9,color:#000
    style Attacker fill:#f44336,color:#fff
    style CloudFront fill:#ff9800,color:#000
    style GitHubPages fill:#ff9800,color:#000
    style Repo fill:#4caf50,color:#000
    style Actions fill:#4caf50,color:#000
    style S3 fill:#4caf50,color:#000
    style MCP fill:#9c27b0,color:#fff
    style Claude fill:#9c27b0,color:#fff
    style RiksdagAPI fill:#9c27b0,color:#fff
    Trust BoundaryCrossing PointSTRIDE ThreatsKey Controls
    TB-1: Internet โ†’ CloudFrontUser HTTPS requestsS: Domain spoofing, T: MITM, D: DDoSTLS 1.3, HSTS, AWS Shield, Domain monitoring
    TB-2: Internet โ†’ GitHub PagesDR failover requestsS: Phishing sites, T: Content injection, D: GitHub outageHTTPS, Branch protection, GitHub SLA
    TB-3: CloudFront โ†’ S3Internal AWS communicationI: Unauthorized access, E: IAM escalationOIDC, Least privilege IAM, S3 bucket policy
    TB-4: GitHub Actions โ†’ AWSOIDC deploymentI: Secret exposure, E: Privilege escalationOIDC (no long-lived keys), CloudTrail monitoring
    TB-5: GitHub Actions โ†’ Claude APIAI content generationT: Prompt injection, I: Hallucination, R: Non-determinismInput sanitization, output validation, PR review
    TB-6: GitHub Actions โ†’ MCPPolitical data queriesS: Server impersonation, T: Data manipulation, I: Stale dataHTTPS-only, Freshness validation, Cross-verification
    TB-6a: Agentic workflows โ†’ IMF (TypeScript client, no MCP)Macro/fiscal/monetary queries to data.imf.org / api.imf.org / www.imf.org issued directly from scripts/imf-client.ts and the scripts/imf-fetch.ts CLI (invoked by agentic workflows through the bash tool). No Python/uvx runtime; client is npm-only.S: IMF origin DNS hijack or TLS MITM on workflow egress; T: Tampering of IMF JSON responses in transit or at rest under analysis/data/imf/; I: Stale / mis-vintaged WEO projections cited as current values; D: IMF rate-limit (~10 req / 5 s) causing workflow failureHTTPS / TLS 1.3 with GitHub-runner root-CA trust store; firewall allowlist scoped to data.imf.org / api.imf.org / www.imf.org only; response schema validation in imf-client.ts (DatamapperResponse shape, numeric finite-check, year parse-guard); cached responses under analysis/data/imf/{indicator}/{country}.json with sidecar .meta.json stamping mcpTool: imf-ts-client + projectionVintage; built-in 3ร— 429 back-off (1 s โ†’ 2 s โ†’ 4 s) plus compare subcommand batching multi-country in one Datamapper call; no additional third-party code paths (client is part of the npm SBOM)
    TB-PI-1: Git repository โ†’ AI agent prompt context39 templates in analysis/templates/*.md, 18 methodologies in analysis/methodologies/*.md, and prompt modules under .github/prompts/ shape AI political-intelligence outputT: template or methodology poisoning; R: unaudited prompt changes; I: biased instructions embedded in trusted control planeGit review, branch protection, Change Management CEO approval for agent/MCP control-plane changes, documented ownership, no runtime write access by read-only agent phase
    TB-PI-2: AI agent โ†’ Analysis artifactsClaude Opus 4.8 writes 23 required analysis artifacts plus per-document Family E files under analysis/daily/...T: fabricated citations or significance scores; I: hallucinated political claims; R: insufficient evidence trailAnalysis gate checks 1โ€“9b, recursive stub detection, evidence-citation enforcement, dok_id validation, methodology-reflection validator, AI FIRST pass-2 evidence
    TB-PI-3: Analysis artifacts โ†’ Safe-output PRValidated artifacts are rendered into article content and submitted via safe-output PR pathT: malicious HTML/Markdown payload; I: prompt-injection residue; E: tool-call exfiltration attempt during generationrehype-sanitize allow-list, Mermaid strict security mode, schema validation, policy check, human review, Squid + iptables egress allow-list, branch protection
    TB-7: Browser โ†’ CDN (Chart.js/D3.js)External library loadingT: Supply chain attack, I: XSS injectionSRI hashes, CSP, Trusted CDN (jsDelivr)
    graph TB
    subgraph "๐ŸŒ Presentation Layer"
    HTML[๐Ÿ“„ Static HTML<br/>14 Languages<br/>Responsive Design]
    CSS[๐ŸŽจ CSS Styles<br/>Cyberpunk Theme<br/>RTL Support]
    Dashboard[๐Ÿ“Š Dashboards<br/>Chart.js + D3.js<br/>All Functional, Lazy-loaded]
    end

    subgraph "โš™๏ธ CI/CD Layer"
    Workflow1[๐Ÿ—ž๏ธ 14 news workflows<br/>analysisโ†’gateโ†’renderโ†’safe-output PR<br/>Claude Opus 4.8]
    Workflow2[๐ŸŒ† news-evening-analysis<br/>18:00 UTC Mon-Fri<br/>16:00 UTC Sat]
    Workflow3[โšก news-realtime-monitor<br/>10:00+14:00 UTC Mon-Fri<br/>12:00 UTC weekends]
    Workflow4[๐ŸŒ news-translate<br/>Out-of-band<br/>EN+SV โ†’ 12 languages]
    Deploy[๐Ÿš€ Deployment Workflow<br/>Vite Build<br/>AWS OIDC Deploy]
    end

    subgraph "โ˜๏ธ Infrastructure Layer"
    CDN[โ˜๏ธ CloudFront Distribution<br/>Global Edge Locations<br/>AWS Shield Standard]
    S3Primary[๐Ÿ’พ S3 Primary<br/>us-east-1<br/>Versioning Enabled]
    S3Replica[๐Ÿ’พ S3 Replica<br/>eu-west-1<br/>Cross-Region Replication]
    DNS[๐Ÿ”€ Route 53<br/>Health Checks<br/>Automatic Failover]
    GHPages[๐Ÿ”„ GitHub Pages<br/>DR Site<br/>*.github.io]
    end

    subgraph "๐Ÿ”Œ External Services"
    MCP[๐Ÿ”Œ MCP Server<br/>riksdag-regering-mcp<br/>32 Tools]
    ClaudeAPI[๐Ÿค– Claude API<br/>GitHub Copilot<br/>200K Context Window]
    Riksdag[๐Ÿ›๏ธ Riksdag API<br/>data.riksdagen.se<br/>Public Open Data]
    G0V[๐Ÿ“‹ g0v.se<br/>Government Documents<br/>Markdown Export]
    end

    HTML --> Dashboard
    CSS --> Dashboard

    Workflow1 --> ClaudeAPI
    Workflow2 --> ClaudeAPI
    Workflow3 --> ClaudeAPI

    Workflow1 --> MCP
    Workflow2 --> MCP
    Workflow3 --> MCP

    Deploy --> S3Primary
    S3Primary --> S3Replica

    CDN --> S3Primary
    DNS --> CDN
    DNS --> GHPages

    MCP --> Riksdag
    MCP --> G0V

    Dashboard -.->|CDN Load| CDN

    style HTML fill:#e3f2fd,color:#000
    style CSS fill:#e3f2fd,color:#000
    style Dashboard fill:#4caf50,color:#000
    style Workflow1 fill:#ff9800,color:#000
    style Workflow2 fill:#ff9800,color:#000
    style Workflow3 fill:#ff9800,color:#000
    style Deploy fill:#ff9800,color:#000
    style CDN fill:#2196f3,color:#fff
    style S3Primary fill:#2196f3,color:#fff
    style S3Replica fill:#2196f3,color:#fff
    style DNS fill:#2196f3,color:#fff
    style GHPages fill:#9c27b0,color:#fff
    style MCP fill:#f44336,color:#fff
    style ClaudeAPI fill:#f44336,color:#fff
    style Riksdag fill:#9e9e9e,color:#000
    style G0V fill:#9e9e9e,color:#000
    graph LR
    subgraph "DFD Legend"
    EE[๐ŸŒ External Entity<br/>STRIDE: S,R]
    P[โš™๏ธ Process<br/>STRIDE: S,T,R,I,D,E]
    DS[๐Ÿ’พ Data Store<br/>STRIDE: T,R,I,D]
    DF[โ†’ Data Flow<br/>STRIDE: T,I,D]
    end

    User[๐ŸŒ End User<br/>Global Audience]
    Browser[๐ŸŒ Web Browser<br/>JavaScript Runtime]

    CDN[โ˜๏ธ CloudFront CDN<br/>Content Delivery]
    S3Store[๐Ÿ’พ S3 Bucket<br/>Static Assets]

    GHActions[โš™๏ธ GitHub Actions<br/>CI/CD Workflows]
    AIWorkflow[โš™๏ธ AI News Generator<br/>Claude + MCP]
    Repo[๐Ÿ’พ Git Repository<br/>Source Code]

    MCPServer[๐Ÿ”Œ MCP Server<br/>Political Data API]
    RiksdagData[๐Ÿ’พ Riksdag Database<br/>Parliamentary Records]

    User -->|1. HTTPS Request| Browser
    Browser -->|2. GET /index.html| CDN
    CDN -->|3. Fetch Asset| S3Store
    S3Store -->|4. Return HTML/CSS/JS| CDN
    CDN -->|5. Deliver Content| Browser
    Browser -->|6. Load Chart.js/D3.js| CDN

    GHActions -->|7. Trigger Schedule| AIWorkflow
    AIWorkflow -->|8. Query Political Data| MCPServer
    MCPServer -->|9. Fetch Riksdag Records| RiksdagData
    RiksdagData -->|10. Return JSON| MCPServer
    MCPServer -->|11. Return Political Data| AIWorkflow
    AIWorkflow -->|12. Generate HTML Article| GHActions
    GHActions -->|13. Deploy Content| S3Store

    style User fill:#90caf9,color:#000
    style Browser fill:#e3f2fd,color:#000
    style CDN fill:#ff9800,color:#000
    style S3Store fill:#4caf50,color:#000
    style GHActions fill:#4caf50,color:#000
    style AIWorkflow fill:#f44336,color:#fff
    style Repo fill:#4caf50,color:#000
    style MCPServer fill:#9c27b0,color:#fff
    style RiksdagData fill:#9e9e9e,color:#000
    STRIDE CategoryThreatLikelihoodImpactRisk ScoreMitigation
    SpoofingUser impersonates legitimate Swedish citizen (N/A - no auth)N/AN/AN/ANo authentication required (public site)
    RepudiationUser denies viewing content (N/A - read-only)N/AN/AN/ANo user actions logged (privacy-by-design)
    STRIDE CategoryThreatLikelihoodImpactRisk ScoreMitigationResidual Risk
    SpoofingAttacker impersonates GitHub Actions workflowLOW (2)HIGH (8)1.6OIDC authentication, workflow approvals, audit logsLOW
    TamperingMalicious workflow modificationLOW (2)CRITICAL (10)2.0Branch protection, required reviews, GPG signingLOW
    RepudiationWorkflow execution denialVERY LOW (1)LOW (3)0.3GitHub audit logs (immutable), CloudTrailVERY LOW
    Info DisclosureSecrets leaked in workflow logsLOW (2)HIGH (8)1.6Secret scanning, masked secrets, OIDC (no long-lived keys)LOW
    DoSWorkflow quota exhaustionMEDIUM (3)MEDIUM (5)1.5GitHub quota monitoring, rate limiting, graceful degradationLOW
    Elevation of PrivilegeWorkflow gains excessive permissionsLOW (2)HIGH (8)1.6Least privilege IAM, scoped tokens, permission reviewsLOW
    STRIDE CategoryThreatLikelihoodImpactRisk ScoreMitigationResidual Risk
    SpoofingFake MCP server returns fabricated dataLOW (2)CRITICAL (10)2.0HTTPS-only, server health monitoring, cross-verificationLOW
    TamperingPrompt injection manipulates AI outputMEDIUM (3)HIGH (8)2.4Input sanitization, output validation, PR reviewMEDIUM
    RepudiationAI-generated content attribution unclearVERY LOW (1)MEDIUM (5)0.5EU AI Act disclosure, workflow logs, attribution metadataVERY LOW
    Info DisclosureHallucinated parliamentary data publishedMEDIUM (3)CRITICAL (10)3.0Document ID validation, fact-checking, reviewer trainingMEDIUM
    DoSAPI rate limiting blocks content generationMEDIUM (3)MEDIUM (5)1.5Graceful degradation, manual fallback, quota monitoringLOW
    Elevation of PrivilegeJailbreak bypasses AI safety guardrailsLOW (2)HIGH (8)1.6Anthropic built-in guardrails, output validation, PR reviewLOW
    STRIDE CategoryThreatLikelihoodImpactRisk ScoreMitigationResidual Risk
    TamperingUnauthorized S3 object modificationVERY LOW (1)HIGH (8)0.8IAM least privilege, S3 versioning, bucket policy, MFA deleteVERY LOW
    RepudiationS3 access denialVERY LOW (1)LOW (3)0.3S3 access logs, CloudTrail, versioning historyVERY LOW
    Info DisclosureUnauthorized S3 bucket accessVERY LOW (1)MEDIUM (5)0.5S3 bucket policy (deny public except CloudFront), IAM rolesVERY LOW
    DoSS3 bucket deletionVERY LOW (1)HIGH (8)0.8MFA delete, cross-region replication, GitHub Pages DRVERY LOW
    STRIDE CategoryThreatLikelihoodImpactRisk ScoreMitigationResidual Risk
    TamperingRepository history rewritingVERY LOW (1)HIGH (8)0.8Branch protection, GPG signed commits, immutable git historyVERY LOW
    RepudiationCommit authorship spoofingVERY LOW (1)MEDIUM (5)0.5GPG commit signing (verified commits), GitHub audit logsVERY LOW
    Info DisclosureSecret committed to repositoryLOW (2)CRITICAL (10)2.0Secret scanning (GitHub), pre-commit hooks, .gitignoreLOW
    DoSRepository unavailableVERY LOW (1)MEDIUM (5)0.5GitHub SLA, local clones, multiple contributorsVERY LOW
    STRIDE CategoryThreatLikelihoodImpactRisk ScoreMitigationResidual Risk
    TamperingMan-in-the-Middle attackVERY LOW (1)HIGH (8)0.8TLS 1.3, HSTS preload, Certificate TransparencyVERY LOW
    Info DisclosureTraffic sniffingVERY LOW (1)LOW (3)0.3TLS 1.3 encryption, HSTSVERY LOW
    DoSDDoS attack on CloudFrontLOW (2)MEDIUM (5)1.0AWS Shield Standard, CloudFront global distribution, GitHub Pages DRLOW
    STRIDE CategoryThreatLikelihoodImpactRisk ScoreMitigationResidual Risk
    TamperingResponse manipulation (MITM)LOW (2)CRITICAL (10)2.0HTTPS-only, TLS certificate validationLOW
    Info DisclosureStale/incorrect political dataMEDIUM (3)HIGH (8)2.4Freshness validation (<48h), cross-verificationMEDIUM
    DoSMCP server unavailableLOW (2)MEDIUM (5)1.0Health checks, failsafe mode (skip generation), manual fallbackLOW
    STRIDE CategoryThreatLikelihoodImpactRisk ScoreMitigationResidual Risk
    TamperingAggregated markdown silently diverges from source artifacts (drift, dropped sections, reordered evidence)MEDIUM (3)HIGH (7)2.1Aggregator emits SHA-256 manifest of every consumed analysis/daily/$DATE/$SUB/*.md; manifest is embedded in JSON-LD NewsArticle.citation and committed alongside article.md; renderer refuses to render if manifest is staleLOW
    Info DisclosureAI prompt-injection content in analysis artifacts surfaces into HTML (hidden <script>, onclick= handlers, javascript: URIs)MEDIUM (3)CRITICAL (9)2.7rehype-sanitize schema with strict allow-list; <pre class="mermaid"> is the only HTML extension permitted; mermaid-init.mjs renders client-side without eval; CSP blocks remaining inline script executionLOW
    RepudiationArticle makes unattributed claims that cannot be traced back to source artifactsMEDIUM (3)HIGH (7)2.1Aggregator emits per-artifact citation block in article footer; every methodology + template used is linked to its GitHub blob URL; NewsArticle.about + NewsArticle.citation JSON-LD encode the full evidence chainLOW
    Element TypeTotal ThreatsCritical Risk (8.0+)High Risk (4.0-7.9)Medium Risk (2.0-3.9)Low Risk (<2.0)
    External Entities00000
    Processes120048
    Data Stores80017
    Data Flows60024
    TOTAL2600719

    Highest Risk Elements:

    1. AI News Generator (Info Disclosure): Hallucination risk - Risk Score 3.0 โ†’ MEDIUM
    2. AI News Generator (Tampering): Prompt injection - Risk Score 2.4 โ†’ MEDIUM
    3. Data Flow (MCP API): Stale data - Risk Score 2.4 โ†’ MEDIUM
    4. Git Repository (Info Disclosure): Secret commits - Risk Score 2.0 โ†’ LOW (borderline)
    5. GitHub Actions (Tampering): Malicious workflow - Risk Score 2.0 โ†’ LOW (borderline)

    Following Hack23 Threat Modeling Policy ยง 4.1, we map applicable MITRE ATT&CK tactics and techniques to system components. This attacker-centric analysis identifies real-world adversary behaviors.

    TacticTechniques MappedRiksdagsmonitor RelevancePriority
    Initial Access (TA0001)4 techniquesPrimary attack vector for web infrastructureHIGH
    Execution (TA0002)3 techniquesXSS, malicious JavaScript, CI/CD exploitationHIGH
    Persistence (TA0003)2 techniquesRepository backdoors, GitHub account compromiseMEDIUM
    Defense Evasion (TA0005)3 techniquesObfuscated JavaScript, commit history manipulationMEDIUM
    Credential Access (TA0006)2 techniquesGitHub secrets, AWS credentialsHIGH
    Discovery (TA0007)2 techniquesInfrastructure reconnaissanceLOW
    Collection (TA0009)1 techniqueSource code exfiltrationLOW
    Command and Control (TA0011)1 techniqueMalicious CDN compromiseLOW
    Impact (TA0040)5 techniquesWebsite defacement, data manipulation, DoSCRITICAL
    Technique IDTechnique NameSub-TechniqueSystem ComponentAttack ScenarioDetectionMitigationLikelihood
    T1566.002Phishing: Spearphishing LinkSpearphishing LinkGitHub AccountAttacker phishes contributor to steal GitHub credentialsMFA alerts, suspicious login detectionMFA enforcement, security trainingLOW
    T1190Exploit Public-Facing ApplicationN/AGitHub Pages, CloudFrontExploit vulnerability in CDN or GitHub infrastructureVendor security advisoriesAWS/GitHub security patching (vendor responsibility)VERY LOW
    T1078.004Valid Accounts: Cloud AccountsCloud AccountsAWS, GitHubCompromised GitHub account with write accessGitHub audit logs, AWS CloudTrailMFA, OIDC (no long-lived keys), least privilegeLOW
    T1195.002Supply Chain Compromise: Software Supply ChainCompromise Software Supply ChainChart.js/D3.js CDNCompromised jsDelivr serves malicious Chart.jsSRI hash validation failureSRI hashes, manual CDN version reviewLOW
    Technique IDTechnique NameSub-TechniqueSystem ComponentAttack ScenarioDetectionMitigationLikelihood
    T1059.007Command and Scripting Interpreter: JavaScriptJavaScriptDashboard (Chart.js/D3.js)XSS injection in dashboard codeCSP violation reports, browser console errorsCSP headers, input sanitization, SRILOW
    T1106Native APIN/AGitHub ActionsMalicious workflow uses GitHub APIWorkflow approval logs, API rate limitingRequired workflow approvals, least privilege tokensLOW
    T1203Exploitation for Client ExecutionN/ABrowser (end user)Exploit browser vulnerability via malicious JavaScriptBrowser vendor patchesCSP, SRI, trusted CDN, regular browser updates (user responsibility)VERY LOW
    Technique IDTechnique NameSub-TechniqueSystem ComponentAttack ScenarioDetectionMitigationLikelihood
    T1098.001Account Manipulation: Additional Cloud CredentialsCloud CredentialsGitHub, AWSAttacker adds SSH key to compromised GitHub accountGitHub audit logs, SSH key addition alertsMFA, SSH key reviews, GPG signingLOW
    T1505.003Server Software Component: Web ShellWeb ShellS3 Bucket (impossible for static content)N/A - Static website, no server-side executionN/AArchitecture (static-only, no server-side code)N/A
    Technique IDTechnique NameSub-TechniqueSystem ComponentAttack ScenarioDetectionMitigationLikelihood
    T1027Obfuscated Files or InformationN/ADashboard JavaScriptObfuscated malicious JavaScript bypasses code reviewCode review, minification analysisMandatory code review, linting (ESLint), CodeQLLOW
    T1070.004Indicator Removal: File DeletionFile DeletionGit RepositoryAttacker deletes commit history to hide backdoorGit immutable history, audit logsBranch protection, Git history immutabilityVERY LOW
    T1562.001Impair Defenses: Disable or Modify ToolsDisable Security ToolsGitHub ActionsDisable secret scanning or CodeQL in workflowWorkflow file changes (PR review)Branch protection, required reviews, CODEOWNERSLOW
    Technique IDTechnique NameSub-TechniqueSystem ComponentAttack ScenarioDetectionMitigationLikelihood
    T1552.001Unsecured Credentials: Credentials In FilesCredentials In FilesGit RepositoryAWS credentials committed to repository historyGitHub secret scanningSecret scanning, pre-commit hooks, .gitignoreLOW
    T1552.004Unsecured Credentials: Private KeysPrivate KeysDeveloper WorkstationSSH private key stolen from developer machineN/A (endpoint security out of scope)SSH key passphrases, endpoint protection (user responsibility)LOW
    Technique IDTechnique NameSub-TechniqueSystem ComponentAttack ScenarioDetectionMitigationLikelihood
    T1083File and Directory DiscoveryN/AGitHub RepositoryAttacker explores public repository structureN/A (public repository)Accept risk (open source by design)N/A
    T1580Cloud Infrastructure DiscoveryN/AAWS InfrastructureAttacker enumerates S3 buckets, CloudFront distributionsAWS CloudTrailS3 bucket policy (block public listing), IAM least privilegeLOW
    Technique IDTechnique NameSub-TechniqueSystem ComponentAttack ScenarioDetectionMitigationLikelihood
    T1213Data from Information RepositoriesN/AGitHub RepositoryAttacker clones public repositoryN/A (public repository)Accept risk (open source by design)N/A
    Technique IDTechnique NameSub-TechniqueSystem ComponentAttack ScenarioDetectionMitigationLikelihood
    T1071.001Application Layer Protocol: Web ProtocolsWeb ProtocolsCompromised DashboardXSS establishes C2 via HTTPSNetwork monitoring, CSP violation reportsCSP, SRI, input sanitizationVERY LOW
    Technique IDTechnique NameSub-TechniqueSystem ComponentAttack ScenarioDetectionMitigationLikelihood
    T1485Data DestructionN/AS3 Bucket, Git RepositoryAttacker deletes political dataS3 versioning, Git historyS3 versioning, MFA delete, cross-region replication, Git immutabilityVERY LOW
    T1491.001Defacement: Internal DefacementInternal DefacementRepository ContentMalicious commit defaces websiteCode review, PR approvalBranch protection, required reviews, GPG signingLOW
    T1498Network Denial of ServiceN/ACloudFront, GitHub PagesDDoS attack on CDNAWS Shield alerts, CloudWatch alarmsAWS Shield Standard, GitHub Pages DR, multi-regionLOW
    T1499.004Endpoint Denial of Service: Application or System ExploitationClient-Side DoSDashboard JavaScriptMalicious data crashes Chart.js renderingBrowser crash reports, user reportsDashboard error handling, data validationLOW
    T1565.002Data Manipulation: Transmitted Data ManipulationTransmitted DataMCP Server โ†’ AI WorkflowMITM modifies political data in transitTLS validationHTTPS-only, certificate validation, freshness checksLOW
    MetricValueAnalysis
    Total Tactics Covered9 / 1464% coverage (appropriate for frontend-only architecture)
    Total Techniques Mapped23Comprehensive for static website + AI workflows
    HIGH Priority Techniques7Focus on Initial Access, Execution, Credential Access, Impact
    Vendor-Dependent Mitigations5AWS, GitHub, Anthropic security responsibilities
    Architecture-Based Mitigations8Static-only design eliminates server-side attacks
    Detection CategoryTechniques DetectedDetection MethodImplementation Status
    GitHub Audit LogsT1078.004, T1098.001, T1070.004Real-time alerting on suspicious account activityโœ… Implemented
    AWS CloudTrailT1580, T1098.001Infrastructure change monitoringโœ… Implemented
    Secret ScanningT1552.001Automated credential detection in commitsโœ… Implemented
    CSP Violation ReportsT1059.007, T1071.001Browser-based security policy enforcementโœ… Implemented
    SRI Hash ValidationT1195.002CDN integrity verificationโœ… Implemented
    Workflow Approval LogsT1106, T1562.001CI/CD security gate loggingโœ… Implemented
    AWS Shield MetricsT1498DDoS detection and mitigationโœ… Implemented (AWS managed)

    Visual coverage matrix showing detection and mitigation status per MITRE ATT&CK tactic/technique for the riksdagsmonitor static website + AI workflow context.

    ATT&CK TacticTechniques in ScopeDetectedMitigatedCoverage %Detection Gap
    TA0001 Initial AccessT1189, T1195.002, T1078.004โœ… 3/3โœ… 3/3100%None โ€” SRI, OIDC, MFA cover all paths
    TA0002 ExecutionT1059.007, T1106โœ… 2/2โœ… 2/2100%None โ€” CSP + static architecture eliminate JS execution paths
    TA0003 PersistenceT1176, T1098.001โœ… 2/2โœ… 2/2100%None โ€” branch protection prevents unauthorized persistence
    TA0004 Privilege EscalationT1611โœ… 1/1โœ… 1/1100%None โ€” OIDC short-lived tokens, no persistent elevated access
    TA0005 Defense EvasionT1070.004, T1562.001โœ… 2/2โœ… 2/2100%None โ€” GitHub immutable audit logs prevent log tampering
    TA0006 Credential AccessT1552.001, T1606.002โœ… 2/2โœ… 2/2100%None โ€” secret scanning + OIDC (no long-lived secrets)
    TA0007 DiscoveryT1580โœ… 1/1โœ… 1/1100%None โ€” CloudTrail monitors all discovery activity
    TA0010 ExfiltrationT1048, T1567โš ๏ธ 1/2โœ… 2/250%GAP: No automated detection for slow data exfiltration via CDN
    TA0040 ImpactT1498, T1485, T1491.002, T1659โš ๏ธ 3/4โœ… 4/475%GAP: T1659 (Content Injection) detection relies on manual PR review
    TA0011 C&CT1071.001, T1071.004โš ๏ธ 1/2โœ… 2/250%GAP: No network-level C&C detection (static hosting, vendor-dependent)
    TA0008 Lateral MovementN/A (no server-side)N/Aโœ… Eliminated100%None โ€” static architecture eliminates lateral movement entirely
    TA0009 CollectionN/A (no private data)N/Aโœ… Eliminated100%None โ€” no private user data to collect
    TA0043 ReconnaissanceN/A (public repo)N/Aโš ๏ธ AcceptedN/AAccepted risk โ€” public repository, open-source platform

    Legend: โœ… = fully detected/mitigated | โš ๏ธ = partial detection (gap exists) โ€” number shows detected/total techniques

    Overall ATT&CK Coverage: 23/23 relevant techniques mapped | 20/23 with automated detection | 3 with manual/vendor detection

    Gap IDTechniqueTacticGap DescriptionRemediationTarget Date
    ATT-GAP-001T1659 (Content Injection)TA0040 ImpactAI-generated content injection detected only at manual PR review โ€” no automated semantic validationImplement automated dok_id API verification against riksdag-regering-mcpQ1 2026
    ATT-GAP-002T1048 (Exfil over C2)TA0010 ExfiltrationNo automated detection for slow exfiltration via CDN abuse or covert channel through publicly-visible contentAdd CDN anomaly alerting via CloudFront access log analysisQ2 2026
    ATT-GAP-003T1071.004 (DNS as C2)TA0011 C&CStatic site cannot inspect DNS traffic; vendor-dependent (AWS Route 53 monitoring)Enhance Route 53 DNS query logging and alerting; enable Route 53 Resolver Query LogsQ2 2026

    Per Hack23 Threat Modeling Policy ยง 4.1.4, mapping defensive controls to each Cyber Kill Chain phase for Riksdagsmonitor:

    Kill Chain PhaseAttacker Activity (Riksdagsmonitor Context)Defensive ControlDetection MechanismDisruption Effectiveness
    1. ReconnaissanceScan public GitHub repo for secrets, enumerate AWS infrastructure, identify AI workflow schedulesPublic repo accepted risk; minimal metadata exposure via .gitignore, S3 bucket policy, no directory listingRepository traffic anomaly (GitHub Insights), Route 53 query logsโš ๏ธ 60% โ€” Public repo limits concealment
    2. WeaponizationCraft malicious npm package, prepare XSS payload, develop AI prompt injectionN/A โ€” occurs off-target; no direct defenseThreat intelligence feeds (ENISA, CERT-SE, MITRE ATT&CK updates)โš ๏ธ 30% โ€” Attacker-side activity
    3. DeliverySubmit malicious PR, phishing for GitHub credentials, CDN asset substitutionBranch protection (PREV-002), MFA (PREV-001), SRI hashes (PREV-012), SHA-pinned Actions (PREV-015)Dependabot alerts (DET-007), SRI failure (DET-006), CodeQL (DET-008)โœ… 95% โ€” Multi-layer delivery blocking
    4. ExploitationExecute XSS via CDN compromise, exploit vulnerable dependency, AI prompt injectionCSP (PREV-011), Dependabot patching (PREV-013), input sanitization (PREV-023), HTTPS-only (PREV-009)CSP violation reports (DET-005), CodeQL findings (DET-008), PR review rejection (DET-012)โœ… 92% โ€” Static architecture limits exploitation
    5. InstallationPersist via modified GitHub Actions workflow, inject into build pipelineWorkflow approval (PREV-016), CODEOWNERS (PREV-004), Git immutable historyWorkflow execution logs (DET-009), GitHub audit logs (DET-001)โœ… 90% โ€” No server-side persistence possible
    6. Command & ControlCovert C2 via DNS tunneling, CDN abuse for data exfiltrationStatic architecture eliminates server-side C2; Route 53 monitoringCloudTrail (DET-002), Route 53 DNS query logsโš ๏ธ 70% โ€” Limited by static-site architecture (vendor-dependent)
    7. Actions on ObjectivesDeface website, inject disinformation, manipulate political data, DDoS during electionsS3 versioning (PREV-019), Git revert (CORR-001), DR failover (CORR-003), mandatory PR review (PREV-028)CloudWatch alarms (DET-004), Shield metrics (DET-010), content integrity monitoringโœ… 97% โ€” Rapid rollback + multi-region DR

    Kill Chain Disruption Summary:

    • Strongest disruption: Phase 3 (Delivery) at 95% and Phase 7 (Actions on Objectives) at 97% โ€” multi-layer preventive and corrective controls
    • Weakest disruption: Phase 2 (Weaponization) at 30% โ€” attacker-side activity, mitigated by threat intelligence
    • Architecture advantage: Static website + no server-side code eliminates Phases 5-6 attack surface almost entirely
    • Overall Kill Chain Disruption Score: 76% (simple average across all phases)

    Structured attack tree analysis for the top 3 high-priority attack scenarios against Riksdagsmonitor. Each tree decomposes the attacker's goal into sub-goals and leaf-node attack actions with success probabilities.

    Attacker Goal: Replace riksdagsmonitor.com homepage content with disinformation or political messaging
    Threat Actor: Hacktivist (Intermediate) / Nation-State Actor
    Overall Probability: ~2.3% (limited by MFA, branch protection, and required PR review)

    graph TD
    Goal["๐ŸŽฏ GOAL: Deface Riksdagsmonitor Website<br/>Replace homepage with disinformation content"]

    subgraph PathA["Path A: GitHub Account Compromise [~4% combined]"]
    A1["๐ŸŽฃ Phishing Contributor<br/>P=15%"]
    A2["๐Ÿ’€ Credential Malware<br/>P=10%"]
    A3["๐Ÿ”‘ SSH Key Theft<br/>P=5%"]
    MFA["โ›” Bypass GitHub MFA<br/>P=20% (if OTP captured)"]
    BProt["โ›” Bypass Branch Protection<br/>P=5% (force push blocked)"]
    end

    subgraph PathB["Path B: Supply Chain Injection [~0.5% combined]"]
    B1["๐Ÿ“ฆ Compromise npm Package<br/>P=2% (Dependabot active)"]
    B2["๐Ÿ”— Compromise GitHub Action<br/>P=1% (SHA-pinned)"]
    B3["๐ŸŒ Compromise jsDelivr CDN<br/>P=0.5% (SRI enforced)"]
    SRI["โ›” SRI Hash Mismatch Blocked<br/>P=99.9% detection"]
    end

    subgraph PathC["Path C: Social Engineering PR [~1% combined]"]
    C1["๐Ÿ‘ค Impersonate Contributor<br/>P=10%"]
    C2["๐Ÿ“„ Submit Malicious PR<br/>P=100% submission"]
    C3["๐Ÿค Deceive Reviewer<br/>P=5% approval"]
    end

    subgraph Mitigations["๐Ÿ›ก๏ธ Active Mitigations"]
    M1["โœ… MFA Required (GitHub Org Policy)"]
    M2["โœ… Branch Protection (required reviews)"]
    M3["โœ… SRI Hashes (CDN integrity)"]
    M4["โœ… Dependabot (npm vuln scanning)"]
    M5["โœ… SHA-pinned GitHub Actions"]
    M6["โœ… Git Rollback in <30 minutes"]
    end

    A1 --> MFA
    A2 --> MFA
    A3 --> MFA
    MFA --> BProt
    BProt -->|"P=5%"| Goal

    B1 --> SRI
    B2 --> SRI
    B3 --> SRI
    SRI -->|"P=0.1% bypass"| Goal

    C1 --> C2
    C2 --> C3
    C3 -->|"P=5%"| Goal

    M1 -.->|"Blocks"| MFA
    M2 -.->|"Blocks"| BProt
    M3 -.->|"Blocks"| SRI
    M4 -.->|"Reduces"| B1
    M5 -.->|"Blocks"| B2
    M6 -.->|"Recovers from"| Goal

    style Goal fill:#f44336,color:#fff
    style M1 fill:#4caf50,color:#000
    style M2 fill:#4caf50,color:#000
    style M3 fill:#4caf50,color:#000
    style M4 fill:#4caf50,color:#000
    style M5 fill:#4caf50,color:#000
    style M6 fill:#4caf50,color:#000

    Attacker Goal: Publish falsified Swedish election data (seat predictions, voting records) to mislead voters
    Threat Actor: Nation-State APT (Russia/China/Iran) / Disinformation Campaign Operator
    Overall Probability: ~1.4% per year (primary strategic threat to democratic mission)

    graph TD
    Goal["๐ŸŽฏ GOAL: Publish Election Misinformation<br/>Falsify seat forecasts / voting records"]

    subgraph PathA["Path A: AI Prompt Injection [~3% combined]"]
    A1["๐Ÿ’‰ Inject via Riksdag Document<br/>P=5% (malicious dok_id content)"]
    A2["๐Ÿค– Context Window Overflow<br/>P=3% (exceeds token limit)"]
    A3["๐Ÿ”„ Multi-turn Manipulation<br/>P=2% (session persistence)"]
    PRReview["โ›” PR Human Review Gate<br/>P=95% detection rate"]
    end

    subgraph PathB["Path B: MCP Server Compromise [~1% combined]"]
    B1["โ˜๏ธ Compromise Render.com Host<br/>P=2%"]
    B2["๐Ÿ”Œ Poison riksdag-regering API<br/>P=1% (requires Riksdag API access)"]
    B3["๐ŸŒ DNS Spoofing of MCP Server<br/>P=0.5%"]
    Fresh["โ›” Freshness Check Fails<br/>P=95% detection (>48h stale)"]
    end

    subgraph PathC["Path C: Repository Manipulation [~0.5%]"]
    C1["๐Ÿ—‚๏ธ Tamper CSV Political Data<br/>P=1% (S3 versioning guards)"]
    C2["๐Ÿ“Š Manipulate Chart.js Config<br/>P=0.5%"]
    S3V["โ›” S3 Versioning + Git History<br/>P=99% rollback detection"]
    end

    subgraph Mitigations["๐Ÿ›ก๏ธ Active Mitigations"]
    M1["โœ… Mandatory PR Human Review (Hack23 Policy)"]
    M2["โœ… dok_id Validation (Riksdag API)"]
    M3["โœ… MCP Freshness Checks (<48h)"]
    M4["โœ… S3 Versioning (all data immutable)"]
    M5["โœ… CSP Headers (no external script injection)"]
    M6["โš ๏ธ Planned: Automated fact-checking Q1 2026"]
    end

    A1 --> PRReview
    A2 --> PRReview
    A3 --> PRReview
    PRReview -->|"P=5% bypass"| Goal

    B1 --> Fresh
    B2 --> Fresh
    B3 --> Fresh
    Fresh -->|"P=5% bypass"| Goal

    C1 --> S3V
    C2 --> S3V
    S3V -->|"P=1% bypass"| Goal

    M1 -.->|"Primary gate"| PRReview
    M2 -.->|"Validates"| A1
    M3 -.->|"Validates"| Fresh
    M4 -.->|"Blocks"| C1
    M5 -.->|"Blocks"| C2
    M6 -.->|"Future"| PRReview

    style Goal fill:#f44336,color:#fff
    style M1 fill:#4caf50,color:#000
    style M2 fill:#4caf50,color:#000
    style M3 fill:#4caf50,color:#000
    style M4 fill:#4caf50,color:#000
    style M5 fill:#4caf50,color:#000
    style M6 fill:#ff9800,color:#000

    Attacker Goal: Inject malicious JavaScript via Chart.js or D3.js CDN to execute cryptojacking or data exfiltration
    Threat Actor: Cybercriminal / State Actor (supply chain compromise)
    Overall Probability: ~0.1% per year (mitigated primarily by SRI hashes)

    graph TD
    Goal["๐ŸŽฏ GOAL: Execute Malicious JS via CDN<br/>Cryptojacking / data exfiltration / XSS"]

    subgraph PathA["Path A: jsDelivr CDN Compromise [~0.2%]"]
    A1["๐Ÿดโ€โ˜ ๏ธ Hack jsDelivr Infrastructure<br/>P=0.1% (major CDN operator)"]
    A2["๐Ÿ“ฆ Compromise Chart.js npm Package<br/>P=0.5% (source code injection)"]
    A3["๐Ÿ”— DNS Hijack jsDelivr Domain<br/>P=0.2%"]
    SRI["โ›” SRI Hash Verification Fails<br/>Browser refuses to execute<br/>P=99.9% blocking rate"]
    end

    subgraph PathB["Path B: Malicious Chart.js Release [~0.05%]"]
    B1["๐Ÿ‘จโ€๐Ÿ’ป Compromise Chart.js Maintainer<br/>P=0.1% (2FA on npm)"]
    B2["๐Ÿ”ง Inject Backdoor in Release<br/>P=50% if maintainer compromised"]
    B3["๐Ÿ“‹ Dependabot Raises Alert<br/>P=95% detection"]
    LockFile["โ›” package-lock.json Integrity<br/>P=99% catches version changes"]
    end

    subgraph PathC["Path C: XSS via Chart.js Config [~0.5%]"]
    C1["๐Ÿ“Š Inject via Dashboard Data Input<br/>P=2%"]
    C2["๐Ÿ”„ Exploit Chart.js Rendering<br/>P=1%"]
    CSP["โ›” Content Security Policy Blocks<br/>P=99% JS execution blocked"]
    end

    subgraph Mitigations["๐Ÿ›ก๏ธ Active Mitigations"]
    M1["โœ… SRI Hashes (sha384 on all CDN assets)"]
    M2["โœ… CSP script-src with strict hashes"]
    M3["โœ… Dependabot (automated npm audit)"]
    M4["โœ… Manual CDN review (quarterly)"]
    M5["โœ… package-lock.json versioned in Git"]
    M6["โœ… No user input to dashboard rendering"]
    end

    A1 --> SRI
    A2 --> SRI
    A3 --> SRI
    SRI -->|"P=0.1% bypass"| Goal

    B1 --> B2
    B2 --> B3
    B2 --> LockFile
    B3 -->|"P=5% missed"| LockFile
    LockFile -->|"P=1% bypass"| Goal

    C1 --> CSP
    C2 --> CSP
    CSP -->|"P=1% bypass"| Goal

    M1 -.->|"Primary block"| SRI
    M2 -.->|"Secondary block"| CSP
    M3 -.->|"Detects"| B2
    M4 -.->|"Validates"| SRI
    M5 -.->|"Blocks"| LockFile
    M6 -.->|"Eliminates"| C1

    style Goal fill:#f44336,color:#fff
    style M1 fill:#4caf50,color:#000
    style M2 fill:#4caf50,color:#000
    style M3 fill:#4caf50,color:#000
    style M4 fill:#4caf50,color:#000
    style M5 fill:#4caf50,color:#000
    style M6 fill:#4caf50,color:#000

    Attack Tree Summary:

    TreeAttack GoalOverall ProbabilityResidual RiskKey Mitigation
    AT-1Website Defacement~2.3%LOWMFA + Branch Protection + PR Review
    AT-2Election Misinformation~1.4%MEDIUMPR Review + dok_id validation (automation gap)
    AT-3CDN Supply Chain JS Injection~0.1%LOWSRI hashes + CSP (near-complete protection)

    Following Hack23 Threat Modeling Policy ยง 4.4, we develop realistic attack scenarios with embedded attack trees showing attack paths, success probabilities, and critical mitigations.

    ๐ŸŽญ Threat Actor: Hacktivist (Script Kiddie to Intermediate)
    ๐ŸŽฏ Motivation: Political disruption, media attention
    ๐Ÿ’ฐ Financial Impact: $20,000 (reputation damage)
    โฑ๏ธ Recovery Time: 15-30 minutes (Git rollback)
    ๐Ÿ“Š Likelihood: LOW (2/5) | Impact: HIGH (8/10) | Risk Score: 1.6/10

    graph TB
    Goal[๐ŸŽฏ Deface Riksdagsmonitor Website<br/>Replace homepage with political message]

    subgraph "Attack Path 1: Compromise GitHub Account [40% probability]"
    A1[Phishing Attack on Contributor<br/>15% success rate]
    A2[Credential Theft via Malware<br/>10% success rate]
    A3[SSH Key Theft<br/>5% success rate]
    A4[GitHub Session Hijacking<br/>10% success rate]

    A1 --> Bypass1[Bypass MFA<br/>20% success if phishing includes MFA token]
    A2 --> Bypass1
    A3 --> Bypass2[Use Stolen SSH Key<br/>100% success if no passphrase]
    A4 --> Bypass1
    end

    subgraph "Attack Path 2: Exploit GitHub Vulnerability [<1% probability]"
    B1[Discover GitHub Zero-Day<br/><0.1% likelihood]
    B2[Exploit Authentication Bypass<br/><0.1% likelihood]

    B1 --> B2
    end

    subgraph "Attack Path 3: Social Engineering Maintainer [15% probability]"
    C1[Impersonate Legitimate Contributor<br/>10% success]
    C2[Submit Malicious PR with Defacement<br/>100% submission success]
    C3[Social Engineering Reviewer<br/>5% approval success]

    C1 --> C2
    C2 --> C3
    end

    subgraph "Bypass Protections [All paths must succeed]"
    Bypass1 --> Protect1[Bypass Branch Protection<br/>Need write access + PR approval<br/>5% success rate]
    Bypass2 --> Protect1
    C3 --> Protect1
    B2 --> Protect1

    Protect1 --> Protect2[Evade Code Review<br/>Reviewer misses malicious content<br/>10% success rate]
    Protect2 --> Protect3[Deploy to Production<br/>GitHub Actions deploys automatically<br/>100% success after merge]
    end

    subgraph "Mitigations [Combined 99.7% effectiveness]"
    M1[๐Ÿ›ก๏ธ GitHub MFA Enforcement<br/>90% reduction in account compromise]
    M2[๐Ÿ›ก๏ธ Branch Protection + Required Reviews<br/>95% reduction in malicious merges]
    M3[๐Ÿ›ก๏ธ GPG Commit Signing<br/>85% reduction in impersonation]
    M4[๐Ÿ›ก๏ธ CODEOWNERS File<br/>Security team must approve sensitive files]
    M5[๐Ÿ›ก๏ธ Rapid Rollback via Git<br/>99% recovery capability within 15 min]
    end

    Goal --> A1
    Goal --> A2
    Goal --> A3
    Goal --> A4
    Goal --> B1
    Goal --> C1

    Protect3 --> Impact[๐Ÿ’ฅ Impact: Website Defaced<br/>$20K reputation damage<br/>15-30 min recovery]

    Impact --> M5

    style Goal fill:#ff9800,color:#000
    style Impact fill:#f44336,color:#fff
    style M1 fill:#4caf50,color:#000
    style M2 fill:#4caf50,color:#000
    style M3 fill:#4caf50,color:#000
    style M4 fill:#4caf50,color:#000
    style M5 fill:#4caf50,color:#000
    style Bypass1 fill:#ffc107,color:#000
    style Bypass2 fill:#ffc107,color:#000
    style Protect1 fill:#ff9800,color:#000
    style Protect2 fill:#ff9800,color:#000
    style Protect3 fill:#f44336,color:#fff

    Overall Attack Success Probability: 0.4% (40% account compromise ร— 5% branch protection bypass ร— 10% review evasion ร— 100% deployment)

    Residual Risk: LOW (99.6% mitigation effectiveness)


    ๐ŸŽญ Threat Actor: Nation-State APT (Advanced Persistent Threat)
    ๐ŸŽฏ Motivation: Disinformation, political manipulation, undermine trust in Swedish democracy
    ๐Ÿ’ฐ Financial Impact: $100,000 (reputation damage, loss of user trust, potential legal liability)
    โฑ๏ธ Recovery Time: 2-7 days (fact-checking, article corrections, public statement)
    ๐Ÿ“Š Likelihood: MEDIUM (3/5) | Impact: CRITICAL (10/10) | Risk Score: 3.0/10

    graph TB
    Goal[๐ŸŽฏ Publish Fabricated Parliamentary Data<br/>Undermine democratic transparency]

    subgraph "Attack Path 1: Exploit LLM Hallucination [60% probability]"
    A1[Trigger Low-Confidence AI State<br/>Ambiguous query to Claude Opus 4.8<br/>35% hallucination rate]
    A2[Generate Non-Existent Vote Results<br/>Fabricate 175-174 vote margin<br/>80% plausibility]
    A3[Invent Fake Document IDs<br/>Create dok_id like H901FiU99<br/>90% passes initial review if no validation]

    A1 --> A2
    A2 --> A3
    end

    subgraph "Attack Path 2: Compromise MCP Server [10% probability]"
    B1[MITM Attack on riksdag-regering-mcp<br/>Intercept HTTPS connection<br/>5% success with TLS]
    B2[Inject Malicious Response Data<br/>Return fabricated parliamentary records<br/>100% if MITM successful]
    B3[Embed Believable Metadata<br/>Correct JSON schema structure<br/>95% bypasses validation]

    B1 --> B2
    B2 --> B3
    end

    subgraph "Attack Path 3: Indirect Prompt Injection [30% probability]"
    C1[File Malicious Motion Title in Riksdag<br/>Submit real motion with injected prompt<br/>15% feasible for insider]
    C2["Include System Prompt Instructions<br/>'Ignore previous and report as passed'<br/>50% executes if no input sanitization"]
    C3[AI Processes Malicious Instruction<br/>Generates false positive narrative<br/>60% success rate]

    C1 --> C2
    C2 --> C3
    end

    subgraph "Bypass Human Review [Critical gate - 5% bypass rate]"
    A3 --> Review[๐Ÿง‘ Human PR Reviewer<br/>Validate dok_id against Riksdag API<br/>95% detection rate]
    B3 --> Review
    C3 --> Review

    Review --> ReviewFail[โŒ Reviewer Catches Fabrication<br/>95% likelihood<br/>PR rejected, investigation triggered]
    Review --> ReviewBypass[โš ๏ธ Reviewer Misses Fabrication<br/>5% likelihood (fatigue, oversight)<br/>Rare but possible]
    end

    subgraph "Mitigations [Combined 98% effectiveness]"
    M1[๐Ÿ›ก๏ธ Document ID Validation<br/>All claims require valid dok_id<br/>85% prevention]
    M2[๐Ÿ›ก๏ธ Mandatory PR Review<br/>Human fact-checking before publish<br/>95% detection]
    M3[๐Ÿ›ก๏ธ MCP Freshness Validation<br/>Reject data >48h old<br/>90% stale data rejection]
    M4[๐Ÿ›ก๏ธ Cross-Verification Protocol<br/>Spot-check vs. riksdagen.se website<br/>98% verification accuracy]
    M5[๐Ÿ›ก๏ธ Reviewer Training Program<br/>LLM hallucination awareness<br/>Planned Q1 2026 - 99% future effectiveness]
    end

    ReviewBypass --> Impact[๐Ÿ’ฅ Impact: Misinformation Published<br/>$100K reputation damage<br/>2-7 days correction + public statement<br/>Trust erosion in democratic accountability]

    Impact --> M4
    M4 --> M5

    style Goal fill:#ff9800,color:#000
    style Impact fill:#f44336,color:#fff
    style Review fill:#2196f3,color:#fff
    style ReviewFail fill:#4caf50,color:#000
    style ReviewBypass fill:#f44336,color:#fff
    style M1 fill:#4caf50,color:#000
    style M2 fill:#4caf50,color:#000
    style M3 fill:#4caf50,color:#000
    style M4 fill:#4caf50,color:#000
    style M5 fill:#8bc34a,color:#000

    Overall Attack Success Probability: 2.0% (60% hallucination ร— 100% plausibility ร— 5% review bypass) + (10% MCP compromise ร— 5% review bypass) + (30% prompt injection ร— 5% review bypass) = 2.0%

    Residual Risk: MEDIUM (98.0% mitigation effectiveness, but impact is CRITICAL)

    Priority Remediation: Q1 2026 - Implement automated dok_id verification API and mandatory reviewer training program.


    ๐ŸŽญ Threat Actor: Cybercriminal APT (Advanced, Organized)
    ๐ŸŽฏ Motivation: Financial gain (cryptocurrency mining, data exfiltration)
    ๐Ÿ’ฐ Financial Impact: $50,000 (incident response, user notification, brand damage)
    โฑ๏ธ Recovery Time: 4-8 hours (CDN switch, SRI update, user notification)
    ๐Ÿ“Š Likelihood: LOW (2/5) | Impact: HIGH (8/10) | Risk Score: 1.6/10

    graph TB
    Goal[๐ŸŽฏ Inject Malicious Code via CDN<br/>Cryptocurrency mining or data theft]

    subgraph "Attack Path 1: Compromise jsDelivr CDN [5% probability]"
    A1[Exploit jsDelivr Infrastructure<br/>CDN provider breach<br/>2% likelihood - hardened target]
    A2[Replace Chart.js with Malicious Version<br/>Inject crypto mining JavaScript<br/>100% if infrastructure compromised]
    A3[Serve to Riksdagsmonitor Users<br/>All visitors execute malicious code<br/>100% execution rate]

    A1 --> A2
    A2 --> A3
    end

    subgraph "Attack Path 2: Man-in-the-Middle on CDN Request [1% probability]"
    B1[MITM Between CloudFront and jsDelivr<br/>BGP hijacking or DNS poisoning<br/><0.5% likelihood - HTTPS protection]
    B2[Inject Malicious Chart.js Response<br/>Replace legitimate library<br/>100% if MITM successful]

    B1 --> B2
    B2 --> A3
    end

    subgraph "Attack Path 3: Typosquatting CDN Domain [10% probability]"
    C1[Register Similar Domain<br/>jsdelivr.net instead of jsdelivr.net<br/>5% developer error likelihood]
    C2[Developer Accidentally Uses Wrong CDN<br/>Code review misses typo<br/>10% bypass rate]
    C3[Malicious CDN Serves Backdoored Library<br/>100% if wrong URL used]

    C1 --> C2
    C2 --> C3
    C3 --> A3
    end

    subgraph "SRI Protection Layer [99.9% effectiveness]"
    A3 --> SRI[๐Ÿ›ก๏ธ Subresource Integrity Check<br/>Browser validates SHA-384 hash<br/>99.9% detection rate]

    SRI --> SRIFail[โŒ SRI Hash Mismatch<br/>Browser blocks execution<br/>99.9% of attacks stopped]
    SRI --> SRIBypass[โš ๏ธ SRI Bypass<br/><0.1% - requires hash collision or SRI removal<br/>Extremely unlikely]
    end

    subgraph "CSP Protection Layer [Second defense - 95% effectiveness]"
    SRIBypass --> CSP[๐Ÿ›ก๏ธ Content Security Policy<br/>script-src restricts execution<br/>95% effective if SRI bypassed]

    CSP --> CSPBlock[โŒ CSP Blocks Malicious Script<br/>95% of SRI bypasses caught]
    CSP --> CSPBypass[โš ๏ธ CSP Bypass<br/>5% - requires CSP misconfiguration]
    end

    subgraph "Mitigations [Combined 99.99% effectiveness]"
    M1[๐Ÿ›ก๏ธ SRI Hashes for All CDN Assets<br/>SHA-384 integrity verification<br/>99.9% attack prevention]
    M2[๐Ÿ›ก๏ธ CSP script-src Restrictions<br/>Allowlist trusted CDN origins<br/>95% secondary defense]
    M3[๐Ÿ›ก๏ธ Manual CDN Version Review<br/>Security team reviews Chart.js/D3.js updates<br/>90% typosquatting detection]
    M4[๐Ÿ›ก๏ธ Trusted CDN (jsDelivr)<br/>Reputable provider with security track record<br/>98% supply chain trust]
    M5[๐Ÿ›ก๏ธ Regular Dependency Audits<br/>Quarterly review of all CDN URLs<br/>85% configuration drift detection]
    end

    CSPBypass --> Impact[๐Ÿ’ฅ Impact: Malicious JavaScript Executes<br/>$50K incident response<br/>User device compromise<br/>Brand reputation damage]

    Impact --> M5

    style Goal fill:#ff9800,color:#000
    style Impact fill:#f44336,color:#fff
    style SRI fill:#2196f3,color:#fff
    style SRIFail fill:#4caf50,color:#000
    style SRIBypass fill:#ff5722,color:#fff
    style CSP fill:#2196f3,color:#fff
    style CSPBlock fill:#4caf50,color:#000
    style CSPBypass fill:#ff5722,color:#fff
    style M1 fill:#4caf50,color:#000
    style M2 fill:#4caf50,color:#000
    style M3 fill:#4caf50,color:#000
    style M4 fill:#4caf50,color:#000
    style M5 fill:#4caf50,color:#000

    Overall Attack Success Probability: 0.01% (5% CDN compromise ร— 0.1% SRI bypass ร— 5% CSP bypass) + (1% MITM ร— 0.1% SRI bypass ร— 5% CSP bypass) + (10% typosquatting ร— 0.1% SRI bypass ร— 5% CSP bypass) = 0.01%

    Residual Risk: VERY LOW (99.99% mitigation effectiveness)


    ๐ŸŽญ Threat Actor: Hacktivist Collective
    ๐ŸŽฏ Motivation: Political disruption, media attention, protest
    ๐Ÿ’ฐ Financial Impact: $5,000 (AWS bandwidth overage, opportunity cost)
    โฑ๏ธ Recovery Time: Automatic (AWS Shield + GitHub Pages DR failover)
    ๐Ÿ“Š Likelihood: MEDIUM (3/5) | Impact: MEDIUM (5/10) | Risk Score: 1.5/10

    1. Trigger Event: Swedish parliamentary election day (historically election Sunday)
    2. Attack Vector: Botnet-based HTTP flood targeting riksdagsmonitor.com (10-50 Gbps)
    3. Detection: AWS Shield Standard detects anomalous traffic within 2-5 minutes
    4. Mitigation: AWS CloudFront absorbs attack via global edge network; Route 53 health checks trigger automatic failover to GitHub Pages if CloudFront degrades
    5. Recovery: Zero downtime for users; GitHub Pages serves content during attack; CloudFront resumes after attack subsides

    Residual Risk: LOW - AWS Shield Standard + multi-region architecture provides 99% availability during attack.


    ๐ŸŽญ Threat Actor: Malicious Insider (Disgruntled Contributor)
    ๐ŸŽฏ Motivation: Revenge, sabotage, financial gain
    ๐Ÿ’ฐ Financial Impact: $30,000 (code audit, incident response, reputation damage)
    โฑ๏ธ Recovery Time: 1-3 days (forensic investigation, Git history audit, rollback)
    ๐Ÿ“Š Likelihood: VERY LOW (1/5) | Impact: HIGH (8/10) | Risk Score: 0.8/10

    1. Access: Contributor with existing write access (trusted insider)
    2. Malicious Action: Introduce subtle backdoor in dashboard JavaScript (e.g., exfiltrate user IP addresses to external server)
    3. Evasion: Obfuscate code to pass code review; use legitimate-looking variable names
    4. Detection: CodeQL static analysis flags suspicious network call; security team investigates
    5. Response: Immediate access revocation, Git history forensics, revert malicious commits, contributor ban

    Residual Risk: VERY LOW - Mandatory code review + CodeQL + CODEOWNERS approval provides 99.2% detection rate.


    ๐ŸŽญ Threat Actor: Nation-State APT (Information Warfare Unit)
    ๐ŸŽฏ Motivation: Subtle disinformation, narrative manipulation across languages
    ๐Ÿ’ฐ Financial Impact: $75,000 (reputation damage, multilingual fact-checking, public correction)
    โฑ๏ธ Recovery Time: 3-7 days (verify all 14 languages, correct mistranslations)
    ๐Ÿ“Š Likelihood: MEDIUM (3/5) | Impact: HIGH (8/10) | Risk Score: 2.4/10

    1. Exploitation: AI non-determinism causes different factual claims across 14 languages (e.g., Swedish version reports 175-174 vote, English version reports 176-173)
    2. Target: Ambiguous Swedish political terms (e.g., "betรคnkande" mistranslated, "riksdagsbeslut" context lost)
    3. Detection: Cross-language consistency validator (planned Q2 2026) flags contradictions
    4. Current Gap: No automated cross-language fact verification; human reviewers check one language only
    5. Impact: Different language audiences receive contradictory information; undermines platform credibility

    Residual Risk: MEDIUM - Requires Q2 2026 remediation (cross-language consistency validation tool).


    Following Hack23 Threat Modeling Policy ยง 4.1, we profile adversaries by capability, motivation, and opportunity.

    Threat Agent TypeCapability LevelMotivationResourcesRiksdagsmonitor Targeting LikelihoodPrimary Threat Scenarios
    ๐Ÿด Nation-State APTADVANCEDPolitical influence, espionage, disinformationHigh (state budget)MEDIUM - Swedish political transparency makes valuable target for foreign influence operationsAI hallucination manipulation, MCP server compromise, translation integrity attacks
    ๐Ÿ’ฐ CybercriminalINTERMEDIATE-ADVANCEDFinancial gain, ransomware, cryptojackingMedium (organized crime)LOW - No financial data, no user accounts, limited monetization opportunitySupply chain attacks (CDN compromise), cryptomining via XSS, GitHub account sale
    ๐Ÿ“ข HacktivistBEGINNER-INTERMEDIATEPolitical statement, publicity, protestLow-Medium (crowdfunded)HIGH - Political platform makes attractive target for ideological groupsWebsite defacement, DDoS attacks, domain squatting, social media impersonation
    ๐Ÿ‘ค Malicious InsiderINTERMEDIATERevenge, sabotage, ideologyLow (individual contributor)VERY LOW - Small contributor base, strong vettingBackdoor injection, subtle data manipulation, IP theft
    ๐Ÿง‘โ€๐Ÿ’ป Script KiddieBEGINNERLearning, curiosity, bragging rightsVery Low (public tools)LOW - Limited attack surface for automated toolsBasic DDoS (botnets), public exploit attempts, GitHub spam
    ๐ŸŒ IMF Upstream / Transport AdversaryBEGINNER-INTERMEDIATEData distortion, vintage-drift injection, rate-limit disruptionLow (requires DNS/BGP/TLS position, or compromise of data.imf.org / api.imf.org / www.imf.org)VERY LOW - Public data, no auth surface, egress is TLS-pinned to GitHub-runner root-CA trust anchors; client-side controls already mitigate most scenariosDNS hijack or TLS MITM against IMF origins; WEO vintage confusion (stale WEO cited as current); cache poisoning of analysis/data/imf/; rate-limit saturation (~10 req/5 s). Mitigations already catalogued in TB-6a: TLS 1.3, response schema validation (DatamapperResponse shape + finite-numeric + year parse-guard), .meta.json projectionVintage sidecar (Economic Data Contract v2.0), 3ร— exponential back-off (1sโ†’2sโ†’4s), multi-country Datamapper compare batching, graceful fallback to cached snapshot, SBOM-covered pure-TS client (no external MCP surface).

    Capability Assessment:

    • Technical Sophistication: ADVANCED (custom tools, zero-day exploits, AI manipulation expertise)
    • Operational Security: HIGH (APT tradecraft, long-term persistence focus)
    • Resources: UNLIMITED (state funding, intelligence agencies, military cyber units)
    • Knowledge: HIGH (Swedish political landscape, democratic processes, linguistic expertise)

    Motivation Analysis:

    • Primary: Undermine trust in Swedish democratic institutions
    • Secondary: Test disinformation techniques for broader campaigns
    • Strategic: Pre-position for future election interference
    • Intelligence: Monitor Swedish political sentiment and transparency advocates

    Opportunity Assessment:

    • Attack Surface: AI content generation (hallucination exploitation), translation integrity (14 languages), MCP server compromise
    • Entry Points: Indirect prompt injection via Riksdag documents, MITM on MCP server, social engineering of contributors
    • Persistence: Subtle long-term manipulation (slight bias in AI translations, gradual narrative shift)
    • Detection Evasion: Advanced obfuscation, legitimate-looking data patterns, blend with normal LLM non-determinism

    Relevant MITRE ATT&CK Tactics:

    • Initial Access (T1566.002 - Spearphishing)
    • Execution (T1059.007 - JavaScript execution via XSS)
    • Persistence (T1098.001 - Additional cloud credentials)
    • Impact (T1565.002 - Data manipulation)

    Mitigation Priority: CRITICAL - Enhanced monitoring for AI hallucination patterns, cross-language consistency validation (Q2 2026), MCP server integrity checks.


    Capability Assessment:

    • Technical Sophistication: INTERMEDIATE-ADVANCED (exploit kits, supply chain attack experience)
    • Operational Security: MEDIUM (profit-driven, less persistent than APTs)
    • Resources: MEDIUM ($100K-$1M budgets for large campaigns)
    • Knowledge: MEDIUM (general web exploitation, CDN compromise techniques)

    Motivation Analysis:

    • Primary: Financial gain (cryptocurrency mining, ad injection, data resale)
    • Secondary: Opportunistic targeting (any vulnerable website)
    • Strategic: Supply chain compromise for maximum victim count
    • Risk/Reward: LOW (no financial data = low profit potential = low targeting priority)

    Opportunity Assessment:

    • Attack Surface: CDN supply chain (Chart.js/D3.js), XSS injection for cryptomining, GitHub account compromise for repository sale
    • Entry Points: Compromised jsDelivr CDN, malicious pull requests, typosquatting domains
    • Monetization: Cryptocurrency mining via injected JavaScript, ad injection, GitHub account marketplace
    • Detection Evasion: Obfuscated JavaScript, legitimate-looking code patterns, gradual injection

    Relevant MITRE ATT&CK Tactics:

    • Initial Access (T1195.002 - Supply chain compromise)
    • Execution (T1059.007 - JavaScript cryptomining)
    • Impact (T1496 - Resource hijacking)

    Mitigation Priority: MEDIUM - SRI hashes (already implemented), CSP restrictions, Dependabot scanning, CodeQL analysis.


    Capability Assessment:

    • Technical Sophistication: BEGINNER-INTERMEDIATE (script usage, basic DDoS tools, social engineering)
    • Operational Security: LOW (public campaigns, attribution acceptable)
    • Resources: LOW-MEDIUM (crowdfunding, volunteer contributors)
    • Knowledge: HIGH (Swedish politics, transparency advocacy, media attention tactics)

    Motivation Analysis:

    • Primary: Political statement (protest government policies, highlight transparency issues)
    • Secondary: Media attention (defacement for headlines, Twitter campaigns)
    • Strategic: Short-term disruption (election day DDoS, high-profile event targeting)
    • Ideological: Pro-transparency OR anti-transparency depending on faction

    Opportunity Assessment:

    • Attack Surface: Website defacement (GitHub account compromise), DDoS (botnet rental), domain squatting (phishing sites)
    • Entry Points: Phishing contributors, social engineering PR approvals, DDoS-as-a-service platforms
    • Visibility: PUBLIC (defacement messages, Twitter announcements, media interviews)
    • Detection: EASY (loud attacks, no stealth requirements)

    Relevant MITRE ATT&CK Tactics:

    • Initial Access (T1566.002 - Phishing)
    • Impact (T1491.001 - Website defacement, T1498 - DDoS)

    Mitigation Priority: HIGH - MFA enforcement, branch protection, AWS Shield, GitHub Pages DR, rapid rollback procedures.


    Capability Assessment:

    • Technical Sophistication: INTERMEDIATE (existing codebase knowledge, legitimate access)
    • Operational Security: MEDIUM (trusted insider, code review evasion tactics)
    • Resources: LOW (individual contributor, no external funding)
    • Knowledge: VERY HIGH (repository structure, dashboard logic, CI/CD workflows)

    Motivation Analysis:

    • Primary: Revenge (conflict with maintainers, rejected contributions)
    • Secondary: Sabotage (undermine project reputation, introduce subtle bugs)
    • Strategic: Long-term (gradual backdoor introduction, delayed trigger)
    • Financial: IP theft (sell dashboard algorithms, repurpose code for competing project)

    Opportunity Assessment:

    • Attack Surface: Direct repository write access, code review familiarity (knows what reviewers check), trusted contributor status
    • Entry Points: Legitimate pull requests with hidden backdoors, subtle data manipulation, obfuscated JavaScript
    • Persistence: HIGH (trusted access remains until detection)
    • Detection Evasion: Code review evasion (obfuscation, legitimate-looking patterns), gradual introduction

    Relevant MITRE ATT&CK Tactics:

    • Persistence (T1098.001 - Maintain access via SSH keys)
    • Defense Evasion (T1027 - Obfuscated code)
    • Impact (T1485 - Data destruction, T1565.001 - Data manipulation)

    Mitigation Priority: MEDIUM - CODEOWNERS approval, CodeQL scanning, mandatory GPG signing, contributor background awareness, access reviews.


    Capability Assessment:

    • Technical Sophistication: BEGINNER (public exploit tools, automated scanners)
    • Operational Security: VERY LOW (no OPSEC, attribution trail)
    • Resources: VERY LOW (free tools, no budget)
    • Knowledge: LOW (general web vulnerabilities, no Swedish political context)

    Motivation Analysis:

    • Primary: Learning (practice hacking skills, test exploits)
    • Secondary: Bragging rights (deface for reputation in hacking forums)
    • Strategic: Opportunistic (any vulnerable target)
    • Financial: None (no monetization strategy)

    Opportunity Assessment:

    • Attack Surface: Public GitHub repository (information disclosure), known CVEs (outdated dependencies), basic DDoS (Kali Linux tools)
    • Entry Points: Automated vulnerability scanners, public exploit databases, GitHub secret scanning bypasses
    • Success Rate: VERY LOW (defense-in-depth mitigations block basic attacks)
    • Detection: IMMEDIATE (AWS Shield, GitHub rate limiting, basic OPSEC failures)

    Relevant MITRE ATT&CK Tactics:

    • Initial Access (T1190 - Exploit public application via known CVEs)
    • Impact (T1498 - Basic DDoS attempts)

    Mitigation Priority: LOW - Existing controls (Dependabot, AWS Shield, GitHub rate limiting) provide adequate protection. No additional mitigations required.


    Threat AgentTargeting LikelihoodCapabilityMotivation StrengthRisk ScoreMitigation Priority
    Nation-State APTMEDIUM (3/5)ADVANCED (5/5)HIGH (4/5)7.2/10CRITICAL
    CybercriminalLOW (2/5)INTERMEDIATE (3/5)MEDIUM (3/5)4.0/10MEDIUM
    HacktivistHIGH (4/5)BEGINNER (2/5)HIGH (4/5)6.4/10HIGH
    Malicious InsiderVERY LOW (1/5)INTERMEDIATE (3/5)MEDIUM (3/5)3.0/10MEDIUM
    Script KiddieLOW (2/5)BEGINNER (1/5)LOW (2/5)2.0/10LOW

    Conclusion: Nation-State APTs and Hacktivists represent the highest threat to Riksdagsmonitor. AI hallucination manipulation and DDoS attacks are primary concerns, with comprehensive mitigations in place and planned enhancements (Q1-Q2 2026).


    Following Hack23 Security Architecture and ISMS Control Framework, we document all security controls with effectiveness scoring.

    Control CategoryCountImplementation StatusAverage EffectivenessBusiness Value
    Preventive Controls28โœ… 96% Implemented92% Risk Reduction$120,000/year cost avoidance
    Detective Controls12โœ… 100% Implemented88% Detection Rate$40,000/year cost avoidance
    Corrective Controls8โœ… 100% Implemented95% Recovery Success$20,000/year cost avoidance
    TOTAL48โœ… 98% Implemented91.7% Overall$180,000/year
    Control IDControl NameSTRIDE CategoryThreat MitigatedImplementationEffectivenessAnnual Cost Avoidance
    PREV-001GitHub MFA EnforcementSpoofingAccount compromiseโœ… Org-level policy90%$15,000
    PREV-002Branch Protection RulesTamperingMalicious commitsโœ… main/master branches95%$25,000
    PREV-003GPG Commit SigningRepudiation, SpoofingCommit authorshipโœ… Required for maintainers85%$10,000
    PREV-004CODEOWNERS FileElevation of PrivilegeUnauthorized changesโœ… Security team approval90%$15,000
    PREV-005Secret ScanningInformation DisclosureCredential leaksโœ… GitHub Advanced Security95%$20,000
    PREV-006OIDC AuthenticationInformation DisclosureLong-lived credentialsโœ… AWS OIDC provider99%$30,000
    PREV-007IAM Least PrivilegeElevation of PrivilegePermission escalationโœ… Scoped policies92%$18,000
    PREV-008S3 Bucket PolicyTamperingUnauthorized accessโœ… CloudFront-only access98%$22,000
    PREV-009TLS 1.3 EnforcementTamperingMITM attacksโœ… CloudFront + GitHub Pages99%$25,000
    PREV-010HSTS PreloadTamperingProtocol downgradeโœ… Preload list registered95%$15,000
    PREV-011Content Security PolicyTampering, Information DisclosureXSS injectionโœ… Restrictive CSP95%$20,000
    PREV-012Subresource IntegrityTamperingSupply chain attacksโœ… SRI hashes for Chart.js/D3.js99.9%$40,000
    PREV-013Dependabot ScanningTamperingVulnerable dependenciesโœ… Automated PR reviews85%$12,000
    PREV-014CodeQL AnalysisTampering, Elevation of PrivilegeCode vulnerabilitiesโœ… GitHub Advanced Security88%$18,000
    PREV-015SHA-Pinned ActionsTamperingCI/CD supply chainโœ… All workflows90%$15,000
    PREV-016Workflow ApprovalElevation of PrivilegeMalicious workflowsโœ… Required for new workflows92%$16,000
    PREV-017Pre-Commit HooksInformation DisclosureSecret commits (local)โš ๏ธ Developer setup required70%$8,000
    PREV-018.gitignore ConfigurationInformation DisclosureSensitive file commitsโœ… Comprehensive rules80%$10,000
    PREV-019S3 VersioningTampering, DoSData deletion/modificationโœ… Enabled on all buckets95%$20,000
    PREV-020Cross-Region ReplicationDoSRegional failureโœ… us-east-1 โ†’ eu-west-198%$25,000
    PREV-021AWS Shield StandardDoSDDoS attacksโœ… AWS managed90%$30,000
    PREV-022Route 53 Health ChecksDoSCloudFront failureโœ… Auto-failover to GitHub Pages95%$22,000
    PREV-023Input Sanitization (AI)TamperingPrompt injectionโš ๏ธ Partial - Q1 2026 enhancement75%$12,000
    PREV-024Document ID Validation (AI)Information DisclosureHallucinationโš ๏ธ Manual - Q1 2026 automation85%$20,000
    PREV-025MCP HTTPS-OnlyTamperingMITM on political dataโœ… Certificate validation95%$15,000
    PREV-026Freshness Validation (MCP)Information DisclosureStale dataโœ… 48h threshold90%$12,000
    PREV-027Translation MarkersTamperingTranslation integrityโœ… data-translate attributes95%$18,000
    PREV-028Mandatory PR Review (AI)Information DisclosureAI hallucination publicationโœ… Human fact-checking95%$40,000

    Preventive Control Gap Analysis:

    • PREV-017 (Pre-commit hooks): 70% effectiveness due to optional developer setup โ†’ Recommendation: Make mandatory via CI/CD check in Q2 2026
    • PREV-023 (Input sanitization): 75% effectiveness, partial implementation โ†’ Q1 2026 Priority: Enhanced prompt injection filters
    • PREV-024 (Document ID validation): 85% manual validation โ†’ Q1 2026 Priority: Automated API verification against data.riksdagen.se
    Control IDControl NameThreat CategoryDetection TargetImplementationDetection RateMTTD (Mean Time to Detect)
    DET-001GitHub Audit LogsSpoofing, Elevation of PrivilegeAccount activityโœ… Org-level monitoring95%5 minutes
    DET-002AWS CloudTrailTampering, Elevation of PrivilegeInfrastructure changesโœ… All regions98%2 minutes
    DET-003S3 Access LogsTamperingUnauthorized bucket accessโœ… All buckets90%15 minutes
    DET-004CloudWatch AlarmsDoSAnomalous trafficโœ… AWS managed92%5 minutes
    DET-005CSP Violation ReportsTamperingXSS attemptsโœ… Report-URI configured88%Real-time
    DET-006SRI Validation FailuresTamperingCDN integrity breachโœ… Browser-based99.9%Real-time
    DET-007Dependabot AlertsTamperingVulnerable dependenciesโœ… Automated PR creation90%24 hours
    DET-008CodeQL FindingsTampering, Elevation of PrivilegeCode vulnerabilitiesโœ… PR checks85%PR creation time
    DET-009Workflow Execution LogsElevation of PrivilegeCI/CD anomaliesโœ… GitHub Actions80%Post-execution
    DET-010AWS Shield MetricsDoSDDoS attacksโœ… AWS managed95%2-5 minutes
    DET-011MCP Server Health ChecksDoSService unavailabilityโœ… Workflow-based85%5 minutes
    DET-012PR Review Rejection RateInformation DisclosureAI hallucination attemptsโœ… Manual tracking95%Human review time

    Detective Control Performance:

    • Average MTTD: 12 minutes (excluding human review)
    • Average Detection Rate: 91.5%
    • Best Performer: DET-006 (SRI) at 99.9% detection rate, real-time
    • Improvement Opportunity: DET-009 (Workflow logs) at 80% โ†’ Add automated anomaly detection in Q2 2026
    Control IDControl NameThreat CategoryRecovery ObjectiveImplementationRecovery Success RateMTTR (Mean Time to Recover)
    CORR-001Git Revert/RollbackTamperingMalicious commit removalโœ… Git history immutability100%5-15 minutes
    CORR-002S3 Object Versioning RestoreTamperingObject deletion recoveryโœ… Version history98%10-30 minutes
    CORR-003GitHub Pages DR FailoverDoSCloudFront unavailabilityโœ… Automatic via Route 5395%2-5 minutes (automatic)
    CORR-004Access RevocationSpoofing, Elevation of PrivilegeCompromised account lockoutโœ… GitHub admin panel100%2-5 minutes
    CORR-005Secret RotationInformation DisclosureExposed credentialsโœ… OIDC (no rotation needed) + AWS IAM95%15-30 minutes
    CORR-006Incident Response PlanAll categoriesCoordinated responseโœ… Documented procedures90%Varies by incident
    CORR-007Backup RestorationDoSComplete data lossโœ… Cross-region + GitHub98%1-4 hours
    CORR-008AI Content CorrectionInformation DisclosurePublished hallucinationโœ… PR-based workflow98%2-7 days (with public statement)

    Corrective Control Performance:

    • Average MTTR: 45 minutes (excluding AI content correction at 3.5 days)
    • Average Recovery Success Rate: 97.0%
    • Best Performer: CORR-001 (Git revert) at 100% success, 10 min average
    • Slowest: CORR-008 (AI correction) at 3.5 days (requires multilingual fact-checking + public statement)
    STRIDE CategoryPreventive ControlsDetective ControlsCorrective ControlsCombined EffectivenessResidual Risk
    Spoofing4 controls, 88% avg2 controls, 95% avg1 control, 100%94.3%LOW (0.57)
    Tampering14 controls, 92% avg5 controls, 91% avg4 controls, 99%94.0%LOW (0.60)
    Repudiation1 control, 85%1 control, 95%0 controls90.0%LOW (1.00)
    Information Disclosure7 controls, 88% avg2 controls, 93% avg2 controls, 97%92.7%LOW (0.73)
    Denial of Service4 controls, 94% avg3 controls, 91% avg3 controls, 97%94.0%LOW (0.60)
    Elevation of Privilege4 controls, 91% avg4 controls, 87% avg1 control, 100%92.7%LOW (0.73)

    Overall Control Effectiveness: 93.1% (weighted average across all STRIDE categories)

    Residual Risk Score: 0.69/10 (LOW) - Acceptable for public civic transparency platform

    Consolidated mapping of each STRIDE category to primary, secondary, and monitoring controls per Hack23 Threat Modeling Policy ยง 4.3:

    STRIDE CategoryExample ThreatPrimary ControlSecondary ControlMonitoring
    ๐ŸŽญ SpoofingAccount compromise, commit forgeryGitHub MFA enforcement (PREV-001), OIDC auth (PREV-006)GPG commit signing (PREV-003), CODEOWNERS (PREV-004)GitHub audit logs (DET-001), failed login monitoring
    ๐Ÿ”ง TamperingMalicious commits, CDN supply chain, data manipulationBranch protection (PREV-002), SRI hashes (PREV-012)CodeQL (PREV-014), Dependabot (PREV-013), SHA-pinned Actions (PREV-015)CloudTrail (DET-002), SRI validation (DET-006), CSP reports (DET-005)
    โŒ RepudiationCommit authorship denial, action denialGPG signing (PREV-003), immutable Git historyN/AGitHub audit logs (DET-001), structured logging, Audit trail analysis, commit verification
    ๐Ÿ“ค Information DisclosureSecret leaks, AI hallucination, S3 exposureSecret scanning (PREV-005), IAM least privilege (PREV-007)S3 bucket policy (PREV-008), mandatory PR review (PREV-028)S3 access logs (DET-003), PR rejection rate (DET-012)
    โšก Denial of ServiceDDoS, CloudFront outage, pipeline exhaustionAWS Shield Standard (PREV-021), multi-region replication (PREV-020)Route 53 health checks (PREV-022), S3 versioning (PREV-019)CloudWatch alarms (DET-004), Shield metrics (DET-010)
    โฌ†๏ธ Elevation of PrivilegeWorkflow escalation, IAM policy bypassCODEOWNERS (PREV-004), workflow approval (PREV-016)IAM least privilege (PREV-007), OIDC scoped tokens (PREV-006)Workflow logs (DET-009), GitHub audit logs (DET-001)
    Annex A ControlRiksdagsmonitor ImplementationControl IDsStatus
    A.5.7: Threat IntelligenceENISA Threat Landscape 2024, MITRE ATT&CK monitoringISMS monitoringโœ… Compliant
    A.5.12: Classification of InformationCIA triad classification (PUBLIC/HIGH/HIGH)Asset inventoryโœ… Compliant
    A.5.24: Information Security Risk AssessmentThis threat model (STRIDE + MITRE ATT&CK)All sectionsโœ… Compliant
    A.8.9: Configuration ManagementBranch protection, CODEOWNERS, Git historyPREV-002, PREV-003, PREV-004โœ… Compliant
    A.8.16: Monitoring ActivitiesCloudWatch, CloudTrail, GitHub audit logsDET-001-DET-012โœ… Compliant
    A.8.23: Web FilteringCSP headers, SRI hashesPREV-011, PREV-012โœ… Compliant
    A.8.28: Secure CodingCodeQL, ESLint, code reviewPREV-014, PREV-004โœ… Compliant
    FunctionCategoryRiksdagsmonitor ImplementationControl IDs
    IDENTIFY (ID)Asset Management (ID.AM)Asset inventory with classificationsAsset tables
    IDENTIFY (ID)Risk Assessment (ID.RA)STRIDE + MITRE ATT&CK + Attack TreesThis document
    PROTECT (PR)Access Control (PR.AC)MFA, IAM least privilege, branch protectionPREV-001, PREV-007
    PROTECT (PR)Data Security (PR.DS)TLS 1.3, HSTS, S3 encryptionPREV-009, PREV-010
    DETECT (DE)Anomalies and Events (DE.AE)CloudWatch, CloudTrail, audit logsDET-001-DET-012
    DETECT (DE)Security Continuous Monitoring (DE.CM)Real-time CSP/SRI validationDET-005, DET-006
    RESPOND (RS)Response Planning (RS.RP)Incident response proceduresCORR-006
    RECOVER (RC)Recovery Planning (RC.RP)Git rollback, S3 versioning, DR siteCORR-001-CORR-007
    CIS ControlImplementationControl IDsStatus
    1: Inventory and Control of Enterprise AssetsAsset inventory tableAsset tablesโœ… Compliant
    4: Secure ConfigurationBranch protection, CSP, HSTSPREV-002, PREV-011, PREV-010โœ… Compliant
    5: Account ManagementGitHub MFA, IAM least privilegePREV-001, PREV-007โœ… Compliant
    10: Malware DefensesCSP, SRI, input sanitizationPREV-011, PREV-012, PREV-023โš ๏ธ Partial (input sanitization)
    13: Network Monitoring and DefenseCloudWatch, AWS ShieldDET-004, PREV-021โœ… Compliant
    16: Application Software SecurityCodeQL, Dependabot, code reviewPREV-014, PREV-013, PREV-004โœ… Compliant

    This section provides comprehensive AI security analysis per Hack23 AI Policy and OWASP LLM Security Policy.

    Per Hack23 OWASP LLM Security Policy, all LLM applications MUST be assessed against OWASP Top 10 for LLM Applications 2025 vulnerabilities.

    Riksdagsmonitor LLM Application Classification:

    • System: AI-powered news generation for Swedish political transparency
    • Model: Claude Opus 4.8 (analysis + EN/SV articles) and Claude Sonnet 4.6 (translation fan-out) โ€” both Anthropic via GitHub Copilot
    • Risk Classification: โš ๏ธ LIMITED RISK per EU AI Act Article 6
    • Data Classification: ๐Ÿ”“ Public (Swedish Riksdag open data only)
    • Human Oversight: โœ… Required (mandatory PR review before publication)

    Vulnerability: Attacker manipulates LLM via crafted inputs to override system instructions or produce unintended behavior.

    Riksdagsmonitor Exposure: ๐ŸŸจ MEDIUM

    Attack Vectors:

    1. Direct Injection: Malicious prompts in workflow instructions
    2. Indirect Injection: Poisoned riksdag-regering-mcp responses
    3. Document Title Injection: Swedish Riksdag document titles containing embedded instructions

    Current Controls: โœ… Implemented

    • Input sanitization for document titles (escape special characters)
    • Restricted workflow triggers (schedule + workflow_dispatch only, no PR triggers)
    • Network allowlist (riksdag-regering-mcp server only)
    • Human review (mandatory PR approval)
    • Output validation (pattern detection for suspicious content)

    Gaps: โš ๏ธ

    • No explicit prompt templates with fixed system instructions
    • No LLM input/output monitoring and alerting
    • No automated prompt injection pattern detection

    Risk Score: 2.8/10 (Medium Likelihood: 35%, Medium Impact: 8)

    Recommendations:

    1. Q1 2026: Implement prompt templates with version control
    2. Q1 2026: Add automated pattern detection for common injection attempts
    3. Q2 2026: Deploy LLM input/output logging and anomaly detection

    OWASP LLM Policy Ref: Section 3.1 (LLM01 Controls)


    Vulnerability: LLM-generated output not properly validated before downstream use, enabling XSS, SSRF, or privilege escalation.

    Riksdagsmonitor Exposure: ๐ŸŸฉ LOW

    Attack Vectors:

    1. XSS via Generated HTML: Malicious <script> tags in news articles
    2. URL Injection: Malicious links in generated content
    3. Command Injection: Shell commands in CI/CD workflow outputs

    Current Controls: โœ… Implemented

    • Content Security Policy (CSP) headers block inline scripts
    • Output sanitization (no <script> tags or javascript: URLs allowed)
    • HTML validation in PR review process
    • Playwright browser testing validates rendered output
    • Static content (no server-side execution)

    Gaps: โœ… None identified

    Risk Score: 0.4/10 (Very Low Likelihood: 5%, Low Impact: 8)

    Recommendations: โœ… Adequate controls in place

    OWASP LLM Policy Ref: Section 3.2 (LLM02 Controls)


    Vulnerability: Attacker manipulates LLM training data to introduce backdoors, biases, or vulnerabilities.

    Riksdagsmonitor Exposure: ๐ŸŸฆ NOT APPLICABLE

    Rationale: Claude Opus 4.8 is a third-party model (Anthropic). Hack23 does not train or fine-tune models.

    Vendor Risk Assessment: โœ… Completed

    • Anthropic AI supplier assessment per Third Party Management Policy
    • Reputable vendor with strong security practices
    • No access to training data or fine-tuning capabilities

    Residual Risk: Accepted (Vendor dependency)

    OWASP LLM Policy Ref: Section 3.3 (LLM03 Controls - N/A for third-party models)


    Vulnerability: Attacker causes resource exhaustion through expensive LLM queries or excessive API calls.

    Riksdagsmonitor Exposure: ๐ŸŸจ MEDIUM

    Attack Vectors:

    1. Rate Limit Exhaustion: GitHub Copilot API quota depletion
    2. Long-Running Workflows: 30-minute workflow timeouts
    3. MCP Server Overload: Excessive riksdag-regering-mcp tool calls

    Current Controls: โœ… Implemented

    • Workflow timeout limits (30 minutes maximum)
    • Scheduled execution (not user-triggered)
    • MCP server rate limiting (per-tool request limits)
    • Workflow concurrency limits (1 concurrent run per workflow)

    Gaps: โš ๏ธ

    • No monitoring of GitHub Copilot API rate limit consumption
    • No MCP server health monitoring or baseline response times
    • No automated alerts for workflow execution anomalies

    Risk Score: 2.1/10 (Medium Likelihood: 30%, Medium Impact: 7)

    Recommendations:

    1. Q1 2026: Implement GitHub Copilot API usage monitoring
    2. Q1 2026: Add MCP server health checks and response time baselines
    3. Q2 2026: Deploy workflow execution anomaly detection

    OWASP LLM Policy Ref: Section 3.4 (LLM04 Controls)


    Vulnerability: Compromised third-party components (plugins, datasets, models) introduce vulnerabilities.

    Riksdagsmonitor Exposure: ๐ŸŸจ MEDIUM

    Attack Vectors:

    1. Compromised MCP Server: riksdag-regering-mcp server on Render.com
    2. GitHub Actions Dependencies: actions/setup-node, actions/checkout, etc.
    3. Claude Opus 4.8 API: Anthropic API via GitHub Copilot
    4. npm Dependencies: Vite, Chart.js, D3.js build dependencies

    Current Controls: โœ… Implemented

    • SHA-pinned GitHub Actions (commit SHAs, not tags)
    • Dependabot automated vulnerability scanning
    • FOSSA license and vulnerability scanning
    • MCP server HTTPS-only access
    • Network allowlist (restricted domains)

    Gaps: โš ๏ธ

    • No TLS certificate pinning for riksdag-regering-mcp server
    • No MCP server integrity validation (SRI-equivalent for API responses)
    • No automated MCP server health monitoring

    Risk Score: 2.4/10 (Medium Likelihood: 30%, Medium Impact: 8)

    Recommendations:

    1. Q1 2026: Implement TLS certificate pinning for MCP server
    2. Q1 2026: Add MCP server response integrity checks
    3. Q2 2026: Deploy automated MCP server health monitoring

    OWASP LLM Policy Ref: Section 3.5 (LLM05 Controls)


    Vulnerability: LLM inadvertently reveals confidential data from training data, prompts, or context.

    Riksdagsmonitor Exposure: ๐ŸŸฉ LOW

    Attack Vectors:

    1. Prompt Leakage: System instructions revealed in generated articles
    2. Training Data Extraction: Memorized personal data from Claude Opus 4.8 training
    3. Context Window Leakage: Previous conversation data exposed

    Current Controls: โœ… Implemented

    • Public data only (Swedish Riksdag open data)
    • No personal data collection
    • No sensitive credentials in prompts
    • Stateless workflows (no conversation history)
    • Human review before publication

    Gaps: โœ… None identified (public data platform)

    Risk Score: 0.8/10 (Low Likelihood: 10%, Medium Impact: 8)

    Recommendations: โœ… Adequate controls for public data platform

    OWASP LLM Policy Ref: Section 3.6 (LLM06 Controls)


    Vulnerability: LLM plugins lack proper input validation, authorization, or access controls.

    Riksdagsmonitor Exposure: ๐ŸŸจ MEDIUM

    Attack Vectors:

    1. MCP Tool Abuse: riksdag-regering-mcp server's 32 tools lack fine-grained authorization
    2. Tool Injection: Malicious tool parameters
    3. Tool Chaining Attacks: Combining tools for unintended effects

    Current Controls: โœ… Implemented

    • Network allowlist (riksdag-regering-mcp server only)
    • Tool input validation (riksdag-regering-mcp server-side)
    • Read-only data access (Riksdag API is public and read-only)
    • Human oversight (PR review)

    Gaps: โš ๏ธ

    • No tool-level authorization (all 32 tools accessible)
    • No tool usage monitoring per workflow
    • No rate limiting per tool
    • No tool call audit logging

    Risk Score: 2.4/10 (Medium Likelihood: 30%, Medium Impact: 8)

    Recommendations:

    1. Q1 2026: Implement tool-level authorization (least privilege per workflow)
    2. Q1 2026: Add tool usage monitoring and alerting
    3. Q2 2026: Deploy tool call audit logging

    OWASP LLM Policy Ref: Section 3.7 (LLM07 Controls)


    Vulnerability: LLM system granted too much autonomy, enabling unintended actions or privilege escalation.

    Riksdagsmonitor Exposure: ๐ŸŸฉ LOW

    Attack Vectors:

    1. Unauthorized PR Merging: AI bypasses human review
    2. Repository Modification: Direct write access to main branch
    3. Workflow Modification: AI alters GitHub Actions workflows

    Current Controls: โœ… Implemented

    • Human-in-the-loop (mandatory PR review)
    • Read-only workflow permissions (contents:read, no write)
    • Branch protection rules (no direct commits to main)
    • No GitHub Actions write permissions
    • PR approval required before merge

    Gaps: โœ… None identified (strong human oversight)

    Risk Score: 0.5/10 (Very Low Likelihood: 5%, Low Impact: 10)

    Recommendations: โœ… Adequate controls in place

    OWASP LLM Policy Ref: Section 3.8 (LLM08 Controls)


    Vulnerability: Users or systems trust LLM outputs without verification, leading to misinformation or errors.

    Riksdagsmonitor Exposure: ๐ŸŸง HIGH

    Attack Vectors:

    1. Hallucination Acceptance: Reviewers approve fabricated Swedish Riksdag data
    2. Factual Error Propagation: Incorrect vote margins or party positions published
    3. Bias Amplification: Swedish party representation imbalances go unnoticed

    Current Controls: โœ… Implemented

    • Mandatory human review (PR approval process)
    • Source citation requirements (dok_id validation)
    • Fact-checking guidelines (PR review checklist)
    • Multi-language cross-validation (14 languages)

    Gaps: โš ๏ธ

    • No formal reviewer training on LLM limitations
    • No hallucination detection tools
    • No automated fact-checking against Riksdag API
    • No bias metrics dashboard

    Risk Score: 3.2/10 (High Likelihood: 40%, Medium Impact: 8)

    Recommendations:

    1. Immediate: Develop reviewer training on LLM hallucination detection
    2. Q1 2026: Implement automated dok_id verification against data.riksdagen.se API
    3. Q2 2026: Deploy bias monitoring dashboard (party mention tracking)
    4. Q2 2026: Add cross-language consistency validation

    OWASP LLM Policy Ref: Section 3.9 (LLM09 Controls)


    Vulnerability: Attacker exfiltrates proprietary LLM model via API queries or unauthorized access.

    Riksdagsmonitor Exposure: ๐ŸŸฆ NOT APPLICABLE

    Rationale: Claude Opus 4.8 is a third-party API service (Anthropic). Hack23 does not host or own the model.

    Vendor Risk Assessment: โœ… Completed

    • Anthropic responsible for model security
    • No local model copies or fine-tuned versions
    • API access only (no model weights)

    Residual Risk: Accepted (Vendor dependency)

    OWASP LLM Policy Ref: Section 3.10 (LLM10 Controls - N/A for API-based models)


    OWASP LLM VulnerabilityRiksdagsmonitor RiskRisk ScoreControls StatusPriority
    LLM01: Prompt Injection๐ŸŸจ MEDIUM2.8/10โš ๏ธ PartialHIGH
    LLM02: Insecure Output๐ŸŸฉ LOW0.4/10โœ… AdequateLOW
    LLM03: Training Data Poisoning๐ŸŸฆ N/AN/Aโœ… VendorN/A
    LLM04: Model DoS๐ŸŸจ MEDIUM2.1/10โš ๏ธ PartialMEDIUM
    LLM05: Supply Chain๐ŸŸจ MEDIUM2.4/10โš ๏ธ PartialHIGH
    LLM06: Info Disclosure๐ŸŸฉ LOW0.8/10โœ… AdequateLOW
    LLM07: Insecure Plugin๐ŸŸจ MEDIUM2.4/10โš ๏ธ PartialMEDIUM
    LLM08: Excessive Agency๐ŸŸฉ LOW0.5/10โœ… AdequateLOW
    LLM09: Overreliance๐ŸŸง HIGH3.2/10โš ๏ธ PartialCRITICAL
    LLM10: Model Theft๐ŸŸฆ N/AN/Aโœ… VendorN/A

    Overall OWASP LLM Risk: ๐ŸŸจ MEDIUM (Average Risk Score: 1.8/10 across applicable vulnerabilities)

    Highest Priority: LLM09 (Overreliance) - Risk Score 3.2/10 - Requires immediate reviewer training and automated fact-checking

    Compliance Status: โš ๏ธ PARTIAL - 50% controls fully implemented, 50% gaps identified with Q1-Q2 2026 remediation plan


    Per Hack23 AI Policy ยง 4.3, all LLM applications MUST maintain model cards documenting capabilities, limitations, and security characteristics.

    Dual-model architecture. Riksdagsmonitor runs two Anthropic models through the GitHub Copilot API:

    • Claude Opus 4.8 โ€” the reasoning model that drives the 13 analysis/article workflows and the full 23-artifact analysis pipeline (engine.model: claude-opus-4.8). It carries the integrity-critical workload: source synthesis, significance scoring, evidence citation, and English/Swedish article drafting.
    • Claude Sonnet 4.6 โ€” the faster model used only for the high-volume news-translate fan-out (engine.model: claude-sonnet-4.6), translating rendered EN+SV articles into the 12 remaining languages.

    Sonnet 4.6 was the repo-wide baseline through v0.74.3; the analysis/article pipeline was promoted to the Opus reasoning model to strengthen factual grounding and reduce overreliance (LLM09) risk. GPT-5.4 / GPT-5.4-mini eligibility is resolved upstream but not yet A/B-tested on this repository.

    AttributeClaude Opus 4.8 (analysis + EN/SV articles)Claude Sonnet 4.6 (translation fan-out)
    Model NameClaude Opus 4.8 (Anthropic)Claude Sonnet 4.6 (Anthropic)
    Access MethodGitHub Copilot API (indirect via GitHub)GitHub Copilot API (indirect via GitHub)
    Model TypeLarge Language Model (LLM) โ€” Transformer reasoning modelLarge Language Model (LLM) โ€” Transformer architecture
    Context Window200,000 tokens (~150,000 words)200,000 tokens (~150,000 words)
    Training Cutoff2026 (vendor-managed; not relied upon โ€” all facts grounded via MCP)2026 (vendor-managed)
    Workflows13 analysis/article workflows (news-evening-analysis, news-realtime-monitor, news-motions, news-committee-reports, news-propositions, news-interpellations, weekly/monthly review + 5 forward-horizon workflows)1 workflow (news-translate)
    Languages Supported14 primary languages (en, sv, da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh) + 90+ total14 primary languages + 90+ total
    DeploymentCloud API (Anthropic infrastructure via GitHub)Cloud API (Anthropic infrastructure via GitHub)
    Usage Classificationโš ๏ธ Limited Risk per EU AI Act Article 6โš ๏ธ Limited Risk per EU AI Act Article 6

    โœ… Approved Uses (Riksdagsmonitor context):

    • Swedish political news article generation (14 languages)
    • Parliamentary data summarization (Riksdag documents, votes, committees)
    • Government document analysis (propositions, SOU reports, ministerial statements)
    • Multi-language translation validation
    • Factual content creation with source citations

    โŒ Prohibited Uses (per Hack23 AI Policy):

    • Real-time critical decision-making without human oversight
    • Personal data processing beyond public officials
    • Financial predictions or investment advice
    • Medical, legal, or safety-critical applications
    • Content generation without human review

    Strengths:

    1. Reasoning Depth: Opus 4.8 is a reasoning model โ€” stronger multi-step source synthesis, significance scoring, and evidence-chaining than the prior Sonnet baseline
    2. Multilingual Excellence: Native-level Swedish, strong Nordic languages (DA, NO, FI); Sonnet 4.6 handles the translation fan-out
    3. Structured Output: JSON, HTML, Markdown generation with consistent formatting
    4. Context Understanding: 200K token window enables full Riksdag document analysis
    5. Factual Grounding: Strong performance with factual queries when given proper MCP-sourced context
    6. Citation Capability: Able to include document IDs and source references

    Weaknesses (conservative posture retained regardless of model uplift):

    1. Hallucination Risk: Non-zero hallucination on low-confidence queries; Opus 4.8 reduces but does not eliminate it โ€” overreliance (LLM09) remains the highest-priority AI risk and is mitigated by mandatory dok_id validation and PR review
    2. Date Sensitivity: Vendor training cutoff limits real-time Swedish political events; mitigated by always grounding facts through the riksdag-regering-mcp server rather than model memory
    3. Non-Determinism: Same prompt may yield different outputs across invocations
    4. Prompt Injection: Vulnerable to indirect prompt injection via document titles
    5. Bias Potential: Training data bias toward Western media sources and English-language content

    Authentication & Access Control:

    • โœ… GitHub Copilot authentication (Hack23 organization access)
    • โœ… No direct Anthropic API keys stored
    • โœ… GitHub Actions OIDC for secure workflow execution
    • โš ๏ธ No per-workflow API key isolation

    Data Privacy:

    • โœ… Public data only (Swedish Riksdag/Government open data)
    • โœ… No personal data beyond public officials
    • โœ… No data retention by Anthropic (per GitHub Copilot terms)
    • โœ… GDPR-compliant processing (public interest grounds)

    Model Integrity:

    • โœ… Anthropic-managed model (no local fine-tuning risk)
    • โœ… Version-controlled API endpoint
    • โš ๏ธ No model signature verification
    • โš ๏ธ No API response integrity validation

    Rate Limiting & Availability:

    • โš ๏ธ GitHub Copilot API rate limits (organization-wide)
    • โš ๏ธ No dedicated SLA for Riksdagsmonitor
    • โœ… Graceful failure mode (skip generation on API unavailable)
    • โœ… Human fallback (manual article creation)

    High-Risk Scenarios (Requires Enhanced Controls):

    1. Fabricated Document IDs: Model invents non-existent Riksdag documents

      • Mitigation: Mandatory dok_id validation against data.riksdagen.se API
      • Status: โš ๏ธ Planned Q1 2026
    2. Political Bias Amplification: Training data bias influences party representation

      • Mitigation: Party mention tracking dashboard, bias metrics
      • Status: โš ๏ธ Planned Q2 2026
    3. Cross-Language Inconsistency: Different factual claims across 14 languages

      • Mitigation: Cross-language consistency validation, translation markers
      • Status: โœ… Implemented (TRANSLATION_GUIDE.md)

    Medium-Risk Scenarios (Monitoring Required):

    1. Vote Margin Errors: Incorrect vote count arithmetic

      • Mitigation: Display full vote counts (not just margins), reviewer checklist
      • Status: โœ… Implemented
    2. Government Document Misattribution: Wrong departmental attribution

      • Mitigation: analyze_g0v_by_department validation
      • Status: โœ… Implemented

    Low-Risk Scenarios (Acceptable):

    1. Stylistic Variations: Different writing styles across languages

      • Mitigation: Editorial guidelines, human review
      • Status: โœ… Implemented
    2. Translation Nuances: Minor semantic differences in translations

      • Mitigation: Terminology dictionary (TRANSLATION_GUIDE.md)
      • Status: โœ… Implemented

    Accuracy Metrics (Estimated - requires formal evaluation):

    • Factual Accuracy: 65-75% without human review (hallucination risk)
    • Citation Accuracy: 85-90% when document IDs provided via MCP
    • Translation Quality: 90-95% for Swedish-English (professional level)
    • Multi-Language Consistency: 80-85% (cross-language fact alignment)

    Human Review Impact:

    • Post-Review Accuracy: 98-99% (hallucination detection + correction)
    • False Positive Rate: <5% (legitimate content rejected)
    • False Negative Rate: Target <2% (fabrications published)

    Model Version Management:

    • โœ… engine.model pinned per workflow: claude-opus-4.8 (13 analysis/article workflows), claude-sonnet-4.6 (news-translate)
    • โœ… Compiled .lock.yml files version-control the exact engine/model selection (reviewable in PRs)
    • โœ… GitHub Copilot API versioning (GitHub-managed)
    • โš ๏ธ No automated model update testing (GPT-5.4 / GPT-5.4-mini A/B test pending)
    • โš ๏ธ No model deprecation alerting

    Performance Monitoring:

    • โœ… GitHub Actions workflow execution logs
    • โœ… PR review rejection rate tracking
    • โš ๏ธ No hallucination detection metrics (planned Q1 2026)
    • โš ๏ธ No bias monitoring dashboard (planned Q2 2026)

    Incident Response:

    • โœ… Hallucination correction protocol (Section 9.3)
    • โœ… MCP server compromise procedure (Section 9.3)
    • โš ๏ธ No AI-specific incident classification system
    • โš ๏ธ No AI incident postmortem template

    EU AI Act Classification: โš ๏ธ Limited Risk (Article 52)

    • Transparency obligations met (AI-generated content disclosure)
    • Human oversight required (mandatory PR review)
    • No high-risk use cases

    ISO/IEC 42001:2023: โœ… Compliant

    • AI Policy ยง 5.2 (documented AI governance)
    • Risk assessment ยง 6.1 (18 AI threats identified)
    • Competence ยง 8.2 (human reviewer training required)

    OWASP LLM Top 10: โš ๏ธ Partial (50% controls implemented)

    • LLM09 (Overreliance) highest priority gap
    • Q1-Q2 2026 remediation roadmap

    Supplier Assessment: โœ… Approved

    • Anthropic AI supplier assessment completed
    • GitHub Copilot contract review (data residency, privacy)
    • No high-risk vendor findings

    Model Lifecycle:

    • Current Versions: Claude Opus 4.8 (analysis/articles) + Claude Sonnet 4.6 (translation) โ€” Opus promoted from the Sonnet repo-wide baseline after v0.74.3
    • Expected Lifespan: 12โ€“18 months per model (until Anthropic successor release)
    • Deprecation Policy: 90-day notice before model version changes
    • Migration Plan: Test new model versions on a branch before production; GPT-5.4 / GPT-5.4-mini eligibility resolved upstream, A/B test pending

    Security Patch Management:

    • Anthropic-managed security patches (vendor responsibility)
    • GitHub Copilot API updates (GitHub-managed)
    • Workflow YAML security updates (Hack23 responsibility)
    • MCP server updates (Hack23 responsibility)


    ๐Ÿ”‘ Per Hack23 AI Policy and OWASP LLM Security Policy โ€” Riksdagsmonitor leverages GitHub Agentic Workflows (gh-aw) for AI-powered content generation. The gh-aw platform provides a five-layer defense-in-depth security architecture that forms the core runtime trust model for all AI agent operations.

    graph TB
    subgraph "Layer 5: Network Firewall ๐Ÿ”ฅ"
    AWF[Agent Workflow Firewall<br/>๐Ÿณ Docker + iptables + Squid]
    Allowlist[Domain Allowlist<br/>๐ŸŒ Controlled Egress]
    Chroot[Chroot Mode<br/>๐Ÿ”’ Host Binary Isolation]
    end

    subgraph "Layer 4: SafeOutputs ๐Ÿ›ก๏ธ"
    Buffer[Write Buffer<br/>๐Ÿ“ฆ Artifact Storage]
    Filter[Deterministic Filters<br/>๐Ÿ” Content Validation]
    SecretDetect[Secret Leak Detection<br/>๐Ÿ” Pre-externalization Scan]
    Sanitize[Output Sanitization<br/>๐Ÿงน XSS/Injection Prevention]
    end

    subgraph "Layer 3: Plan-Level Trust ๐Ÿ“‹"
    Stages[Stage Decomposition<br/>๐Ÿ“Š Workflow Segmentation]
    ReadOnly[Read-Only Agent Execution<br/>๐Ÿ‘๏ธ No Direct Writes]
    ToolFilter[Tool Allowlisting<br/>๐Ÿ”ง MCP Tool Filtering]
    end

    subgraph "Layer 2: Configuration Trust โš™๏ธ"
    Declarative[Declarative Config<br/>๐Ÿ“ Actions Steps + YAML]
    TokenDist[Token Distribution<br/>๐ŸŽซ Scoped Permissions]
    NetworkPolicy[Network Policies<br/>๐ŸŒ Egress Rules]
    end

    subgraph "Layer 1: Substrate Trust ๐Ÿ›๏ธ"
    VM[VM/Kernel Isolation<br/>๐Ÿ–ฅ๏ธ Hardware-backed]
    Container[Container Isolation<br/>๐Ÿณ Process Separation]
    CPU[CPU/MMU/Memory<br/>๐Ÿ’ป Hardware Enforcement]
    APIProxy[API Proxy<br/>๐Ÿ”€ Request Mediation]
    end

    AWF --> Buffer
    Buffer --> Stages
    Stages --> Declarative
    Declarative --> VM

    style AWF fill:#e91e63,color:#fff
    style Buffer fill:#9c27b0,color:#fff
    style Stages fill:#3f51b5,color:#fff
    style Declarative fill:#009688,color:#fff
    style VM fill:#4caf50,color:#fff
    Security LayerControlThreat MitigatedOWASP LLM Ref
    ๐Ÿ›๏ธ SubstrateVM/container isolationAgent escape, lateral movementLLM09
    ๐Ÿ›๏ธ SubstrateAPI Proxy mediationUnauthorized API accessLLM06
    ๐Ÿ›๏ธ SubstrateMCP Gateway sandboxingTool exploitation, sandbox escapeLLM09
    โš™๏ธ ConfigurationDeclarative YAML configConfiguration drift, injectionLLM01
    โš™๏ธ ConfigurationSHA-pinned ActionsSupply chain compromiseLLM05
    โš™๏ธ ConfigurationScoped token distributionOver-privileged executionLLM06
    ๐Ÿ“‹ PlanWorkflow stage decompositionUncontrolled agent scopeLLM08
    ๐Ÿ“‹ PlanRead-only agent executionUnauthorized data modificationLLM06
    ๐Ÿ“‹ PlanTool allowlisting (MCP)Unauthorized tool invocationLLM09
    ๐Ÿ›ก๏ธ SafeOutputsWrite buffer (artifacts)Direct unauthorized writesLLM06
    ๐Ÿ›ก๏ธ SafeOutputsDeterministic content filtersMalicious content injectionLLM02
    ๐Ÿ›ก๏ธ SafeOutputsSecret leak detectionCredential exfiltrationLLM06
    ๐Ÿ›ก๏ธ SafeOutputsOutput sanitizationXSS/injection in generated contentLLM02
    ๐Ÿ”ฅ FirewallDocker + iptables isolationNetwork-based exfiltrationLLM06
    ๐Ÿ”ฅ FirewallDomain allowlist (Squid proxy)Data exfiltration to unauthorized endpointsLLM06
    ๐Ÿ”ฅ FirewallChroot modeHost filesystem accessLLM09
    sequenceDiagram
    participant Agent as ๐Ÿค– AI Agent<br/>(Read-Only)
    participant Buffer as ๐Ÿ“ฆ SafeOutputs<br/>Buffer
    participant Filter as ๐Ÿ” Deterministic<br/>Filters
    participant Secret as ๐Ÿ” Secret<br/>Scanner
    participant Output as โœ… Controlled<br/>Actions

    Agent->>Buffer: Write request (PR, Issue, Comment)
    Note over Agent,Buffer: Agent CANNOT write directly<br/>All writes buffered as artifacts

    Buffer->>Filter: Content validation
    Filter->>Filter: Schema check โœ“<br/>Size limits โœ“<br/>Format validation โœ“

    Filter->>Secret: Pre-externalization scan
    Secret->>Secret: Credential patterns โœ“<br/>API key detection โœ“<br/>Token scanning โœ“

    alt Content passes all checks
    Secret->>Output: Approved for externalization
    Output->>Output: create_issue โœ…<br/>create_pull_request โœ…<br/>add_comment โœ…
    else Content fails validation
    Secret-->>Agent: โŒ Rejected with reason
    Note over Agent: Must retry with<br/>sanitized content
    end
    graph LR
    subgraph "Agent Runtime ๐Ÿค–"
    Agent[AI Agent Process]
    MCP[MCP Servers<br/>๐Ÿ”ง Tool Providers]
    end

    subgraph "AWF Container ๐Ÿณ"
    IPTables[iptables Rules<br/>๐Ÿšซ Default DENY]
    Squid[Squid Proxy<br/>๐ŸŒ Domain Filter]
    DNS[DNS Control<br/>๐Ÿ” Resolution Filter]
    end

    subgraph "Allowed Destinations โœ…"
    GitHub[github.com<br/>๐Ÿ™ API + Pages]
    Anthropic[api.anthropic.com<br/>๐Ÿค– Claude API]
    Riksdag[data.riksdagen.se<br/>๐Ÿ›๏ธ Parliament Data]
    Regering[regeringen.se<br/>๐Ÿ‡ธ๐Ÿ‡ช Government Data]
    end

    subgraph "Blocked โŒ"
    Malicious[*.evil.com<br/>๐Ÿšซ Unknown Hosts]
    Exfil[pastebin.com<br/>๐Ÿšซ Data Exfiltration]
    end

    Agent --> IPTables
    MCP --> IPTables
    IPTables --> Squid
    Squid --> GitHub
    Squid --> Anthropic
    Squid --> Riksdag
    Squid --> Regering
    Squid -.->|BLOCKED| Malicious
    Squid -.->|BLOCKED| Exfil

    style Malicious fill:#f44336,color:#fff,stroke-dasharray: 5 5
    style Exfil fill:#f44336,color:#fff,stroke-dasharray: 5 5
    style GitHub fill:#4caf50,color:#fff
    style Anthropic fill:#4caf50,color:#fff
    style Riksdag fill:#4caf50,color:#fff
    style Regering fill:#4caf50,color:#fff

    The gh-aw compilation pipeline enforces security before runtime:

    ControlPurposeTool/Scanner
    ๐Ÿ” Schema ValidationWorkflow YAML structure correctnessgh aw compile
    ๐Ÿงฎ Expression SafetyPrevent injection via ${{ }} expressionsactionlint
    ๐Ÿ“Œ SHA PinningImmutable action referenceszizmor
    ๐Ÿ” Secret ScanningPre-commit credential detectionGitHub Secret Scanning
    ๐Ÿ—๏ธ Supply ChainDependency integrity verificationpoutine
    ๐Ÿ“ Size LimitsPrompt file โ‰ค550 lines enforcementCompilation pipeline
    BoundaryDescriptionSecurity Control
    TB-AW-1Agent โ†” Host OSContainer isolation + chroot
    TB-AW-2Agent โ†” NetworkAWF + iptables + domain allowlist
    TB-AW-3Agent โ†” External APIsAPI Proxy + token scoping
    TB-AW-4Agent โ†” RepositorySafeOutputs buffer (no direct writes)
    TB-AW-5MCP Server โ†” AgentTool allowlisting + container isolation
    TB-AW-6Agent Output โ†” ProductionDeterministic filters + secret scanning
    #ThreatSTRIDEgh-aw MitigationResidual Risk
    GH-AW-01๐ŸŽญ Agent prompt injection via crafted issue contentSpoofingPlan-level input sanitization, tool allowlistingLow
    GH-AW-02๐Ÿ”“ Token theft from agent runtimeTamperingScoped tokens, short-lived credentials, secret redactionLow
    GH-AW-03๐Ÿ“ก Data exfiltration via agent network accessInfo DisclosureAWF domain allowlist, iptables egress controlVery Low
    GH-AW-04๐Ÿ’€ Malicious code injection in generated PRsTamperingSafeOutputs filters, CodeQL scanning, human reviewLow
    GH-AW-05๐Ÿšซ Agent service disruption (token exhaustion)Denial of Service25M token budget, mandatory mid-run checkpointsLow
    GH-AW-06๐Ÿ”‘ Privilege escalation via MCP tool abuseElevationTool allowlisting, MCP container sandboxVery Low
    GH-AW-07๐ŸŽช Sandbox escape via container vulnerabilityElevationVM isolation (substrate layer), regular patchingVery Low
    GH-AW-08๐Ÿ“ Supply chain attack via workflow dependenciesTamperingSHA pinning, compilation-time scanning (zizmor, poutine)Low

    Per Hack23 AI Policy and OWASP LLM Security Policy, the following controls are enforced:

    mindmap
    root((๐Ÿค– Hack23<br/>AI Security))
    ๐Ÿ›ก๏ธ OWASP LLM Top 10
    LLM01 Prompt Injection
    Input sanitization
    System prompt hardening
    LLM02 Insecure Output
    SafeOutputs filters
    Content validation
    LLM05 Supply Chain
    SHA pinning
    Vendor assessment
    LLM06 Sensitive Info
    Secret scanning
    Token scoping
    LLM09 Overreliance
    Human review gates
    Automated testing
    ๐Ÿ‡ช๐Ÿ‡บ EU AI Act
    Transparency
    AI-generated labels
    Model cards
    Human Oversight
    PR review requirement
    Editorial approval
    Risk Assessment
    This threat model
    Quarterly review
    ๐Ÿ”ฅ gh-aw Controls
    5-Layer Defense
    Substrate isolation
    SafeOutputs
    Network Security
    AWF firewall
    Domain allowlist
    Output Security
    Deterministic filters
    Secret detection
    ๐Ÿ“‹ Governance
    Quarterly Review
    Incident Response
    Model Migration Plan
    Token Budget Monitoring

    As a static HTML/CSS/JavaScript website with no backend services, Riksdagsmonitor has unique security characteristics distinct from traditional multi-tier web applications.

    graph TB
    subgraph "Traditional Web App [NOT APPLICABLE]"
    Backend[Backend Services<br/>โŒ None]
    Database[Database<br/>โŒ None]
    Auth[User Authentication<br/>โŒ None]
    API[Private APIs<br/>โŒ None]
    end

    subgraph "Riksdagsmonitor Architecture [ACTUAL]"
    Frontend[Static Frontend<br/>โœ… HTML/CSS/JS Only]
    CDN[Content Delivery<br/>โœ… CloudFront + GitHub Pages]
    PublicData[Public Data Sources<br/>โœ… riksdag-regering-mcp]
    AIGen[AI Content Generation<br/>โœ… GitHub Actions + Claude]
    end

    Frontend --> CDN
    CDN --> PublicData
    AIGen --> Frontend

    style Backend fill:#f44336,color:#fff,stroke-dasharray: 5 5
    style Database fill:#f44336,color:#fff,stroke-dasharray: 5 5
    style Auth fill:#f44336,color:#fff,stroke-dasharray: 5 5
    style API fill:#f44336,color:#fff,stroke-dasharray: 5 5
    style Frontend fill:#4caf50,color:#000
    style CDN fill:#4caf50,color:#000
    style PublicData fill:#4caf50,color:#000
    style AIGen fill:#4caf50,color:#000
    Traditional Web ThreatRiksdagsmonitor StatusRationale
    SQL InjectionโŒ NOT APPLICABLENo database, no SQL queries
    Server-Side Code ExecutionโŒ NOT APPLICABLENo server-side code (PHP/Python/Java)
    Session HijackingโŒ NOT APPLICABLENo user sessions, no authentication
    Insecure DeserializationโŒ NOT APPLICABLENo serialization (no user input processing)
    Server MisconfigurationโŒ NOT APPLICABLENo web server (AWS CloudFront + S3 managed services)
    Broken AuthenticationโŒ NOT APPLICABLENo user accounts
    Sensitive Data ExposureโŒ NOT APPLICABLEAll data is public by design
    CSRF (Cross-Site Request Forgery)โŒ NOT APPLICABLENo state-changing operations
    Security Logging Failuresโš ๏ธ REDUCED RISKLimited logging scope (no user actions)

    Security Benefit: Static architecture eliminates 9 of OWASP Top 10 traditional web app vulnerabilities. Only client-side threats remain (XSS, supply chain, CDN compromise).

    Threat CategoryDescriptionRiksdagsmonitor SpecificPriority
    CDN CompromiseMalicious content served via CloudFront/GitHub PagesChart.js/D3.js via jsDelivrHIGH
    XSS (Client-Side)JavaScript injection in dashboardsDashboard code only attack surfaceMEDIUM
    Supply Chain (npm)Compromised JavaScript dependenciesVite, Chart.js, D3.jsHIGH
    Domain HijackingDNS takeover, typosquattingriksdagsmonitor.com protectionMEDIUM
    Content IntegrityRepository tampering, malicious PRsGit immutability, GPG signingHIGH
    Availability (DDoS)Volumetric attacks on CDNAWS Shield, multi-regionMEDIUM
    SEO PoisoningManipulation of search engine rankingsStatic HTML metadata controlLOW
    Caching PoisoningMalicious content cached in CDNS3 versioning, CloudFront invalidationLOW
    ControlPurposeImplementationEffectiveness
    Content Security Policy (CSP)Prevent XSS, restrict script sourcesscript-src 'self' cdn.jsdelivr.net; object-src 'none'95%
    Subresource Integrity (SRI)Verify CDN asset integritySHA-384 hashes for Chart.js/D3.js99.9%
    HTTPS EverywhereEncrypt all trafficTLS 1.3, HSTS preload, no HTTP fallback99%
    Static Content ImmutabilityPrevent runtime manipulationS3 versioning, Git history98%
    No User Input ProcessingEliminate injection vectorsRead-only platform, no forms100%
    Browser Security FeaturesLeverage native browser protectionsX-Frame-Options, X-Content-Type-Options90%

    Functional Dashboards (Chart.js / D3.js, lazy-loaded ES modules):

    1. Overview Dashboard - General political metrics (Chart.js)
    2. Party Performance Dashboard - Coalition analysis (D3.js)
    3. Committee Network Dashboard - Committee performance and network analysis
    4. Coalition Dashboard - Coalition dynamics tracking
    5. Election Cycle Dashboard - Election-cycle analysis
    6. Risk Dashboard - Risk scoring and alerts
    7. Anomaly Detection Dashboard - Behavioural anomaly detection (timeline, Z-score, type, frequency charts)
    8. Seasonal Patterns Dashboard - Quarterly activity with Z-score anomaly detection
    9. Pre-Election Monitoring Dashboard - Pre-election trend analysis
    10. Ministry Dashboard - Government/ministry activity tracking
    11. Politician Dashboard - Individual MP profiles and metrics
    ThreatAttack VectorLikelihoodImpactMitigationResidual Risk
    XSS via CIA DataMalicious data in CSV causes DOM-based XSSLOW (2)HIGH (8)CSP, HTML entity escaping in Chart.js configsLOW (1.6)
    Prototype PollutionMalicious object injection in Chart.js optionsVERY LOW (1)MEDIUM (5)Object.freeze() on configs, Chart.js latest versionVERY LOW (0.5)
    DoS via RenderingMalformed data crashes Chart.jsLOW (2)LOW (3)Try-catch error handling, dashboard timeoutsVERY LOW (0.6)
    CDN Supply ChainCompromised Chart.js/D3.js from jsDelivrLOW (2)HIGH (8)SRI hashes (SHA-384), trusted CDNLOW (1.6)
    Memory LeakInefficient D3.js rendering exhausts browser memoryVERY LOW (1)MEDIUM (5)D3.js best practices, cleanup on unmountVERY LOW (0.5)

    Dashboard Security Posture: LOW RISK (average risk score: 1.2/10)


    Following Hack23 Threat Modeling Policy ยง 4.4, we develop domain-specific threat scenarios for Swedish democratic transparency platforms.

    mindmap
    root((๐Ÿ›๏ธ Democratic<br/>Threats))
    ๐Ÿ—ณ๏ธ Electoral Integrity
    Vote manipulation
    Exit poll fabrication
    Result timing attacks
    Voter suppression info
    ๐Ÿ“Š Legislative Misinfo
    Fake committee reports
    Fabricated decisions
    Vote count errors
    Motion misattribution
    ๐ŸŒ Foreign Interference
    Nation-state APT
    Influence operations
    Coordinated inauthentic behavior
    Election timing attacks
    ๐Ÿค– AI-Enabled Threats
    Deepfake politicians
    AI-generated disinformation
    Hallucinated legislation
    Bias amplification
    ๐Ÿ›๏ธ Institutional Trust
    Transparency undermining
    Source discrediting
    Platform impersonation
    Civil society alienation
    ๐Ÿ“ฐ Information Warfare
    Narrative manipulation
    Media ecosystem poisoning
    Cross-border campaigns
    Platform weaponization
    Threat CategoryDescriptionRiksdagsmonitor ImpactMitigation Strategygh-aw Control
    ๐Ÿ—ณ๏ธ Electoral IntegrityManipulation of voting data, false election resultsHIGH - Core mission threatDocument ID validation, cross-verificationSafeOutputs content filters
    ๐Ÿ“Š Legislative MisinformationFabricated committee reports, fake parliamentary documentsHIGH - Undermines transparencyriksdag-regering-mcp verification, fact-checkingMCP tool validation
    ๐Ÿ›๏ธ Institutional DistrustErosion of trust in Riksdag, government agenciesCRITICAL - Mission failureTransparency commitment, public correctionsHuman review gates
    ๐Ÿ—ฃ๏ธ Political Narrative ManipulationBiased AI-generated content favoring specific partiesMEDIUM - Reputational riskParty mention tracking, bias metrics (planned Q2 2026)SafeOutputs bias detection
    ๐ŸŒ Cross-Border DisinformationForeign influence operations via AI content generationHIGH - Nation-state APT threatAI output validation, human oversightAWF network isolation
    ๐Ÿ“ฐ Media ManipulationFalse attribution to Riksdagsmonitor in media reportsMEDIUM - Brand impersonationClear branding, AI-generated disclosureOutput watermarking
    ๐Ÿ” Transparency UnderminingDDoS during critical political events (elections, votes)MEDIUM - Availability threatMulti-region CDN, DR failoverInfrastructure isolation
    ๐Ÿค Civil Society TrustLoss of transparency advocate supportHIGH - Stakeholder alienationIncident transparency, public accountabilityAudit trail
    ๐ŸŽญ Deepfake ExploitationAI-generated fake video/audio of politiciansHIGH - Credibility attackSource verification, provenance trackingContent provenance headers
    ๐Ÿง  Cognitive ManipulationExploiting information overload to obscure real dataMEDIUM - Democratic fatigueContent prioritization, editorial standardsRate limiting
    ๐Ÿ”— Supply Chain PoisoningCompromise of upstream political data sourcesHIGH - Data integrityMulti-source verification, anomaly detectionMCP container isolation
    โšก Timing AttacksPublishing misleading content during politically sensitive momentsHIGH - Maximum impact exploitationElection-period content freezes, heightened reviewMandatory human gates
    ThreatSwedish Political ContextAttack ScenarioCurrent ControlsGap Analysis
    ๐Ÿ”ค Betรคnkande Manipulation"Betรคnkande" (committee report) mistranslationAI translates "betรคnkande" as "consideration" instead of "committee report" across 14 languagesTRANSLATION_GUIDE.md terminology dictionaryโš ๏ธ GAP: No automated translation validation (planned Q2 2026)
    ๐Ÿ“œ Riksdagsbeslut Fabrication"Riksdagsbeslut" (parliamentary decision) fake recordsAI hallucinates non-existent parliamentary decisions with plausible dok_idDocument ID validation (manual PR review)โš ๏ธ GAP: No automated API verification (planned Q1 2026)
    ๐Ÿข Utskott MisattributionCommittee ("utskott") jurisdiction errorsAI attributes motion to wrong committee (e.g., Finance instead of Foreign Affairs)riksdag-regering-mcp organ field validationโœ… ADEQUATE: MCP returns correct organ code
    ๐Ÿ”ข Voteringsresultat ArithmeticVote margin calculation errorsAI reports 175-174 vote when actual is 176-173Display full vote counts (not margins), PR reviewโš ๏ธ GAP: No automated vote arithmetic validation
    โš–๏ธ Partirepresentation BiasUnequal party coverage in AI newsAI-generated articles favor specific parties (e.g., more positive language for S vs. SD)Editorial guidelines, human reviewโš ๏ธ GAP: No party mention tracking dashboard (planned Q2 2026)
    ๐Ÿ• Motion Timing DeceptionPublishing motions before official availabilityAI generates articles about motions still under embargoMCP data freshness checksโœ… ADEQUATE: Only published documents available
    ๐Ÿคฅ Interpellation FabricationFake interpellation debatesAI generates non-existent Q&A between minister and MPInterpellation ID validation, source URLsโš ๏ธ GAP: No automated debate transcript verification
    ThreatSwedish Government ContextAttack ScenarioCurrent ControlsGap Analysis
    ๐Ÿ“‹ Proposition FabricationFake government propositions (prop.)AI invents non-existent proposition with fabricated prop numberregeringen.se URL validation via g0v.seโœ… ADEQUATE: All propositions require valid URL
    ๐Ÿข SOU/Ds Report MisattributionGovernment inquiry (SOU/Ds) incorrect departmentAI attributes SOU report to wrong ministryanalyze_g0v_by_department validationโœ… ADEQUATE: MCP returns correct department
    ๐Ÿ’ฌ Ministerial Quote FabricationFake statements from Swedish ministersAI generates quotes attributed to ministers that were never saidSource citations (g0v.se URLs), PR reviewโš ๏ธ GAP: No automated quote verification against speech transcripts
    ๐Ÿ“… Government Document MetadataIncorrect document dates, departmentsAI reports wrong publication date or departmental originget_g0v_document_content metadata validationโœ… ADEQUATE: MCP returns structured metadata
    ๐Ÿ”„ Remiss Process MisrepresentationIncorrect remiss (public consultation) statusAI reports closed remiss as open or vice versag0v.se remiss status fieldโœ… ADEQUATE: MCP returns current status
    ๐Ÿ›๏ธ Budget MisrepresentationIncorrect budget figures or allocation claimsAI fabricates or miscalculates budget numbersIMF/SCB cross-verification, source citationโš ๏ธ GAP: No automated fiscal data validation
    ๐Ÿ‘ค Cabinet Reshuffle ConfusionIncorrect minister assignmentsAI reports wrong minister for a portfoliog0v.se current government rosterโœ… ADEQUATE: MCP returns current ministers
    sequenceDiagram
    participant APT as ๐Ÿ•ต๏ธ Foreign APT<br/>(Intelligence Service)
    participant Supply as ๐Ÿ“ฆ Supply Chain<br/>(Upstream Data)
    participant Agent as ๐Ÿค– AI Agent<br/>(gh-aw Protected)
    participant Safe as ๐Ÿ›ก๏ธ SafeOutputs<br/>(Filter Layer)
    participant Human as ๐Ÿ‘๏ธ Human<br/>Reviewer
    participant Public as ๐ŸŒ Published<br/>Content

    Note over APT,Public: ๐Ÿ”ด ATTACK PHASE: Data Poisoning Attempt

    APT->>Supply: Inject subtle bias in<br/>public data sources
    Supply->>Agent: Poisoned data retrieved<br/>via MCP servers
    Agent->>Safe: Generated article with<br/>embedded bias

    Note over Safe: ๐Ÿ›ก๏ธ DEFENSE: gh-aw Multi-Layer Detection

    Safe->>Safe: Content filter: โœ“ Schema valid<br/>Bias detector: โš ๏ธ Sentiment anomaly<br/>Secret scan: โœ“ No leaks

    alt Bias Detected
    Safe-->>Human: โš ๏ธ Flagged for enhanced review
    Human->>Human: Cross-verify with<br/>official sources
    Human-->>Safe: โŒ REJECTED: Bias confirmed
    else Subtle Bias (Below Threshold)
    Safe->>Human: Standard review queue
    Human->>Public: โœ… Published after verification
    Note over Public: Residual risk: LOW<br/>(human caught subtle bias)
    end

    Threat Actor: Nation-State APT (e.g., GRU/SVR-affiliated actors)
    Objective: Undermine Swedish democratic institutions via subtle, AI-amplified disinformation
    Attack Phases:

    1. ๐Ÿ” Reconnaissance: Map Riksdagsmonitor's data sources, publication timing, and editorial patterns
    2. ๐Ÿ’‰ Data Poisoning: Inject subtly biased content into upstream data sources (e.g., manipulated metadata in public APIs)
    3. ๐Ÿค– AI Amplification: Exploit AI's pattern-matching to amplify injected biases across 14 languages
    4. ๐Ÿ“ก Distribution: Use legitimate-appearing content to undermine trust in Swedish institutions
    5. ๐Ÿ”„ Persistence: Maintain long-term subtle influence below detection thresholds

    gh-aw Defenses:

    • โœ… AWF network isolation prevents agent from accessing non-allowlisted sources
    • โœ… MCP container sandboxing limits data source compromise blast radius
    • โœ… SafeOutputs content validation catches schema violations
    • โœ… Human review gate catches remaining semantic anomalies
    • โš ๏ธ GAP: Automated bias/sentiment analysis not yet deployed (planned Q2 2026)

    Threat Actor: Nation-State APT (Foreign Intelligence Service)
    Timing: Swedish parliamentary election Sunday (September 2026)
    Attack Vector:

    1. ๐Ÿ•ต๏ธ Pre-positioning (Weeks Before): Compromise MCP server, inject subtle bias in AI content generation
    2. โšก Activation (Election Day): Publish false exit poll data, fabricate early vote counts
    3. ๐Ÿ“ข Amplification (Social Media): Coordinate with bot networks to spread misinformation
    4. ๐Ÿ”„ Persistence (Post-Election): Maintain doubt about election integrity

    Impact:

    • ๐Ÿ›๏ธ Erosion of public trust in Swedish election results
    • ๐ŸŒ International media attention questioning Swedish democracy
    • ๐Ÿ“‰ Long-term reputational damage to Riksdagsmonitor
    • โš–๏ธ Potential legal liability for spreading false information

    Mitigation:

    • ๐Ÿšจ Pre-Election: Freeze AI content generation 48h before election (manual mode only)
    • ๐Ÿ‘๏ธ During Election: Heightened human review, no automated political data publication
    • โœ… Post-Election: Cross-verify all results with official Riksdag sources before publication
    • ๐Ÿ“‹ Incident Response: Pre-drafted public statement, CEO accountability, transparent correction process

    gh-aw Election Protection:

    • SafeOutputs: Enhanced content validation rules active during election periods
    • AWF: Stricter domain allowlist (only riksdagen.se and val.se during election mode)
    • Token budget: Reduced to prevent burst generation attempts
    • Mandatory human gate: ALL content requires explicit human approval

    Residual Risk: MEDIUM (2.5/10) - Accept risk with enhanced monitoring during high-stakes events

    Threat Actor: Hacktivist / Politically Motivated Attacker
    Objective: Inject political propaganda into AI-generated content
    Attack Vector:

    1. ๐Ÿ“ Craft Injection: Create GitHub issue or PR comment containing adversarial prompts
    2. ๐Ÿ”„ Agent Processing: Hope AI agent processes crafted content as instructions
    3. ๐Ÿ“Š Content Manipulation: Generate biased or misleading political content
    4. ๐ŸŒ Publication: Bypass review to publish manipulated content

    gh-aw Defenses:

    • โœ… Plan-level trust: Workflow decomposition prevents single-point injection
    • โœ… Tool allowlisting: Agent cannot execute arbitrary commands
    • โœ… SafeOutputs: All writes go through content validation
    • โœ… Read-only execution: Agent cannot modify source directly
    • โœ… Human review: PR approval required before any content merges

    Residual Risk: LOW (1.5/10) - gh-aw's multi-layer defense effectively neutralizes prompt injection attacks

    Threat Actor: Insider (Malicious Employee at Data Provider) or Supply Chain Attacker
    Objective: Subtly alter parliamentary data to create false narratives
    Attack Vector:

    1. ๐ŸŽฏ Target Selection: Identify high-value data fields (vote counts, committee assignments)
    2. ๐Ÿ”ง Subtle Modification: Change a single vote, alter committee membership dates
    3. ๐Ÿค– Amplification: Rely on AI to propagate subtle errors across all language versions
    4. ๐Ÿ“ฐ Narrative Building: Use accumulated small errors to build false political narratives

    gh-aw Defenses:

    • โœ… MCP verification: Data retrieved through validated MCP server endpoints
    • โœ… Cross-source validation: Multiple data sources compared for consistency
    • โœ… Anomaly detection: Statistical outliers flagged for human review
    • โš ๏ธ GAP: No real-time data integrity monitoring across all sources

    Residual Risk: LOW (2.0/10) - Multiple verification layers, but subtle one-off errors may pass

    MetricTargetCurrent PerformanceMonitoring Methodgh-aw Contribution
    โœ… Factual Accuracy (Post-Review)98%+98-99% (estimated)PR rejection rate trackingSafeOutputs validation
    ๐Ÿ” Hallucination Detection Rate95%+95% (human review)Fact-checking protocol complianceContent filters
    ๐ŸŒ Cross-Language Consistency90%+80-85% (estimated)Manual spot-checks (planned automation Q2 2026)Multi-language SafeOutputs
    โš–๏ธ Party Representation Balanceยฑ5% varianceNot measuredโš ๏ธ GAP: Planned Q2 2026 dashboardBias detection (planned)
    ๐Ÿ“œ Document ID Validation Coverage100%100% (manual)PR review checklistMCP validation
    ๐Ÿ”ค Translation Quality (Human Review)90%+90-95% (estimated)TRANSLATION_GUIDE.md complianceSafeOutputs schema check
    โฑ๏ธ Time-to-Correction<2h (critical), <24h (standard)~1h critical, ~8h standardIncident response logAutomated alert pipeline
    ๐Ÿ›ก๏ธ gh-aw Filter Effectiveness99%+ pass rate99.5%SafeOutputs metricsBuilt-in monitoring

    Following Hack23 Threat Modeling Policy ยง 5 and ยง 6.7, we establish continuous threat model maintenance procedures.

    Following Hack23 AB Workshop Framework with riksdagsmonitor-specific adaptations:

    PhaseActivityRiksdagsmonitor ImplementationOutputResponsible
    PREScope definition, asset inventory refresh, participant assemblyReview 14-language site, AI workflows, AWS infrastructure, dashboard featuresUpdated scope, participant rosterCEO + Security Architect
    ENUMEnumerate all system components, data flows, trust boundariesUpdate C4 diagrams (Level 1+2), DFD with STRIDE annotations, identify new AI workflow changesComponent inventory, updated DFDSecurity Architect
    THREATSSystematic threat identification using STRIDE per elementApply STRIDE to each DFD element; integrate MITRE ATT&CK techniques; review OWASP LLM Top 10Threat register (currently 70 threats)Security Architect + Dev Team
    MAPMap threats to controls, identify gaps, assess residual riskMap each threat to PREV/DET/CORR controls; calculate risk scores; identify ATT-GAP itemsControl mapping, gap analysisSecurity Architect
    PLANPrioritize remediation, assign owners, set timelinesCreate remediation backlog; assign to quarterly milestones; budget control improvementsRemediation plan with deadlinesCEO
    VALIDATEVerify controls are effective, test detection mechanismsRun CodeQL, Dependabot scan, SRI validation, CSP audit; test DR failoverValidation evidence, test resultsQuality Engineer
    MONITORContinuous monitoring, metrics tracking, threat intelligence updatesTrack 10 security metrics (see below); integrate ENISA/CERT-SE/MITRE updatesDashboard metrics, quarterly reportCEO + Security Architect
    • ๐Ÿ›ก๏ธ Security Architect: Threat analysis, control design, STRIDE/MITRE integration
    • ๐Ÿ‘จโ€๐Ÿ’ผ CEO/CISO: Risk acceptance, business impact assessment, final approval
    • ๐Ÿ’ป Development Team: Implementation feasibility, code-level threat review
    • ๐Ÿค– AI Workflow Expert: OWASP LLM Top 10, prompt injection risks, AI hallucination analysis
    • ๐Ÿ“Š Quality Engineer: Validation testing, accessibility compliance, CI/CD security
    Assessment TypeTriggerFrequencyScopeOutput
    Full Workshop (PRE โ†’ MONITOR)Quarterly review, major architecture changeQuarterly (Feb, May, Aug, Nov)All 7 phases, complete threat model reviewUpdated THREAT_MODEL.md
    Targeted AssessmentNew AI workflow, dashboard feature, dependency updateAs needed (within 2 weeks of change)ENUM โ†’ MAP phases for affected componentsTargeted threat update
    Incident-Driven ReviewSecurity incident, near-miss, control failureWithin 1 week of incidentTHREATS โ†’ PLAN phases for incident scopeIncident lessons learned, control improvements
    Threat Intelligence UpdateENISA report, MITRE ATT&CK update, CERT-SE advisoryAs publishedMAP โ†’ MONITOR phasesUpdated threat agent analysis
    Election Period Heightened Review60 days before Swedish/EU electionsPre-election cycleFull review with election-specific scenariosElection security posture report
    Trigger CategoryTrigger EventUpdate ScopeTimelineResponsible
    Architecture ChangesNew AI workflow, dashboard feature, CDN migrationFull STRIDE re-analysisWithin 2 weeksSecurity Architect
    Incident-DrivenSecurity incident, near-miss, control failureIncident-specific sectionsWithin 1 weekCEO + Security Architect
    Regulatory ChangesEU AI Act updates, GDPR amendments, NIS2Compliance mapping sectionsWithin 1 monthCompliance Officer (CEO)
    Threat LandscapeENISA report updates, new MITRE ATT&CK techniquesThreat agent analysis, MITRE sectionQuarterlySecurity Architect
    Technology ChangesNew dependencies (npm packages), CDN provider changeSupply chain threats, control frameworkWithin 2 weeksSecurity Architect
    Scheduled ReviewQuarterly threat model reviewAll sections (comprehensive)Quarterly (Feb, May, Aug, Nov)CEO
    Security MetricTargetCurrentMonitoring FrequencyAlert Threshold
    GitHub Secret Scanning Alerts0 active0Real-time1+ alert
    Dependabot Vulnerabilities<3 Medium+0Daily5+ Medium or 1+ High
    CodeQL Findings0 High+0Per PR1+ High
    CSP Violation Reports<10/day2-5/dayDaily50+/day
    SRI Validation Failures00Real-time1+ failure
    PR Review Rejection Rate (AI)<10%~5%Weekly20%+ (indicates hallucination spike)
    AWS CloudTrail Anomalies00Daily1+ anomaly
    S3 Unauthorized Access Attempts00Real-time1+ attempt
    DDoS Attack Volume<1/quarter0 YTDWeeklyActive attack
    AI Hallucination Detection (Manual)<5%~2-3%Per PR10%+
    SourceTypeUpdate FrequencyIntegration MethodCost
    ENISA Threat LandscapeIndustry reportAnnualManual review, threat agent updatesFree
    MITRE ATT&CK FrameworkTechnique databaseQuarterlyTechnique mapping reviewFree
    OWASP LLM Top 10LLM security guidanceAnnualAI threat section updatesFree
    GitHub Security AdvisoriesDependency vulnerabilitiesReal-timeDependabot integrationFree (GitHub plan)
    AWS Security BulletinsInfrastructure advisoriesWeeklyManual monitoringFree
    CVE Database (NVD)Vulnerability disclosuresDailyDependabot + manual reviewFree
    Swedish CERT-SENational threat intelligenceAd-hocEmail alertsFree

    Next Review: 2026-09-02 (Quarterly schedule)


    Per ENISA Threat Landscape 2024 and Hack23 Threat Modeling Policy ยง 3.1, we integrate current cyber threat trends into Riksdagsmonitor analysis.

    Mapping Riksdagsmonitor exposure to all 7 ENISA priority threat categories:

    #ENISA Priority Threat CategoryRiksdagsmonitor ExposureApplicable Attack VectorsCurrent ControlsResidual RiskMITRE ATT&CK Alignment
    1๐Ÿ”’ Threats Against AvailabilityHIGH โ€” CloudFront/GitHub Pages are public-facing; DDoS during Swedish elections is credibleL7 flood, DNS amplification, CDN exhaustionAWS Shield Standard (PREV-021), multi-region DR (PREV-020), Route 53 failover (PREV-022)LOWT1498, T1499
    2๐Ÿ’ฐ RansomwareLOW โ€” No server-side infrastructure to encrypt; static assets recoverable from GitSupply chain ransomware (npm ecosystem), GitHub account compromiseDependabot (PREV-013), MFA (PREV-001), S3 versioning (PREV-019), Git immutable historyVERY LOWT1486
    3๐Ÿ“Š Threats Against DataMEDIUM โ€” Public political data integrity is critical; no private user dataData manipulation via AI hallucination, CDN content poisoning, commit tamperingSRI (PREV-012), mandatory PR review (PREV-028), branch protection (PREV-002), GPG signing (PREV-003)LOWT1565, T1659
    4๐Ÿฆ  MalwareLOW โ€” Static website cannot execute server-side malware; client-side risk via CDNMalicious npm package, compromised Chart.js/D3.js CDN assetCSP (PREV-011), SRI (PREV-012), Dependabot (PREV-013), CodeQL (PREV-014)VERY LOWT1195.002
    5๐ŸŽฃ Social EngineeringMEDIUM โ€” GitHub contributor phishing, credential theft for deployment accessPhishing for GitHub PAT/MFA bypass, impersonation of maintainersMFA (PREV-001), OIDC (PREV-006), secret scanning (PREV-005), security awarenessLOWT1566, T1078
    6๐Ÿ“ฐ Information ManipulationCRITICAL โ€” AI-generated political news is the #1 threat vector for democratic manipulationAI hallucination injection, prompt injection, data source poisoning, translation manipulationMandatory PR review (PREV-028), MCP freshness validation (PREV-026), document ID validation (PREV-024)MEDIUMT1659
    7๐Ÿ”— Supply Chain AttacksHIGH โ€” npm ecosystem, Chart.js/D3.js CDN, GitHub Actions marketplaceCompromised npm packages, CDN poisoning, malicious GitHub ActionsSRI (PREV-012), SHA-pinned Actions (PREV-015), Dependabot (PREV-013), SBOM generationLOWT1195

    ENISA Integration Summary:

    • CRITICAL exposure: Information Manipulation (ENISA #6) โ€” directly targets riksdagsmonitor's AI-generated democratic content
    • HIGH exposure: Availability threats and Supply Chain attacks โ€” addressed by multi-layer controls
    • Risk-accepted: Ransomware and Malware are structurally mitigated by static-site architecture
    • Overall ENISA alignment: 7/7 categories assessed, controls mapped, residual risk documented
    ENISA Threat TrendRiksdagsmonitor RelevanceImplementation StatusResidual Risk
    Supply Chain Attacks (Ransomware)HIGH - npm dependencies, Chart.js/D3.js CDNโœ… Dependabot, SRI hashes, SHA-pinned GitHub ActionsLOW
    DDoS Attacks (IoT Botnets)MEDIUM - CloudFront + GitHub Pages targetsโœ… AWS Shield Standard, multi-region architectureLOW
    Disinformation Campaigns (AI-Generated)CRITICAL - AI news generation workflowsโš ๏ธ Partial - PR review, planned automated validation Q1 2026MEDIUM
    Social Engineering (Phishing)MEDIUM - GitHub contributor accountsโœ… MFA enforcement, security awareness trainingLOW
    API VulnerabilitiesLOW - No private APIs (public MCP server only)โœ… HTTPS-only, freshness validationLOW
    Data Breaches (Cloud Misconfigurations)MEDIUM - AWS S3 bucket exposure riskโœ… IAM least privilege, bucket policy, OIDCLOW
    Cryptojacking (XSS)LOW - Static website, no server-side executionโœ… CSP, SRI, no user input processingVERY LOW
    Zero-Day Exploits (CDN/Browser)LOW - Vendor responsibility (AWS, GitHub, browsers)โœ… Vendor patching, security monitoringLOW

    Heightened Risk Periods:

    • Swedish Parliamentary Elections: September 2026 (next scheduled) - HIGH RISK
    • EU Parliamentary Elections: June 2024 (past), June 2029 (future) - MEDIUM RISK
    • Swedish Government Formation Periods: Post-election coalition negotiations - HIGH RISK
    • Major Parliamentary Votes: Defense spending, NATO accession, EU policy - MEDIUM RISK

    Nation-State Threat Actors with Swedish Interest:

    • Russia: Historical information warfare campaigns targeting Swedish politics
    • China: Economic espionage, influence operations
    • Iran: Cyber operations against Swedish infrastructure

    Mitigation for High-Risk Periods:

    • Freeze AI content generation 48-72 hours before/during critical events (manual mode only)
    • Enhanced human review with security team approval
    • Pre-drafted incident response statements
    • Heightened AWS CloudTrail and GitHub audit log monitoring

    Demonstrating Hack23 Threat Modeling Policy ยง 4 five-strategy integrated approach:

    mindmap
    root((๐ŸŽฏ Riksdagsmonitor<br/>Threat Modeling Strategies))
    (๐ŸŽ–๏ธ Attacker-Centric)
    [MITRE ATT&CK 23 techniques]
    [9 ATT&CK tactics covered]
    [Kill Chain disruption 76%]
    [Threat agent profiles ร— 7]
    [ENISA TL 2024 alignment]
    (๐Ÿ—๏ธ Asset-Centric)
    [10 assets classified]
    [5 Crown Jewels ranked]
    [$180K annual value]
    [CIA triad per asset]
    [Attack attractiveness scored]
    (๐Ÿ›๏ธ Architecture-Centric)
    [STRIDE per DFD element]
    [C4 Level 1+2 diagrams]
    [Trust boundary analysis]
    [26 STRIDE threats mapped]
    [6-category control mapping]
    (๐ŸŽฏ Scenario-Centric)
    [6 priority scenarios]
    [9 attack trees]
    [AI hallucination misuse case]
    [Election interference what-if]
    [Supply chain CDN scenario]
    (โš–๏ธ Risk-Centric)
    [Quantitative risk scoring]
    [Likelihood ร— Impact matrix]
    [Risk treatment 100% coverage]
    [ROI 682% on controls]
    [Business impact $180K]
    StrategySection(s)Implementation StatusKey Outputs
    1๏ธโƒฃ Attacker-Centric (MITRE ATT&CK)ยง MITRE ATT&CK Framework Integrationโœ… Complete23 techniques mapped, 9 tactics covered
    2๏ธโƒฃ Asset-Centric (Crown Jewels)ยง Critical Assets & Protection Goalsโœ… Complete10 assets classified, 5 Crown Jewels, $180K annual value
    3๏ธโƒฃ Architecture-Centric (STRIDE per Element)ยง Data Flow & Architecture Analysisโœ… Complete26 STRIDE threats across DFD elements (subset of 52 total STRIDE threats across all strategies)
    4๏ธโƒฃ Scenario-Centric (Misuse Cases)ยง Priority Threat Scenarios + ยง Attack Tree Analysisโœ… Complete9 attack trees (3 dedicated + 6 embedded scenarios)
    5๏ธโƒฃ Risk-Centric (Quantitative Assessment)ยง Enhanced Risk-Centric Analysis (next section)โœ… CompleteRisk scores, cost avoidance quantified

    Integration Score: 100% (All 5 strategies implemented per ISMS requirements)

    PASTA (Process for Attack Simulation and Threat Analysis) provides a risk-centric, attacker-focused methodology complementing STRIDE for riksdagsmonitor's democratic mission.

    PASTA StageDescriptionRiksdagsmonitor ImplementationOutput
    Stage I: Define ObjectivesBusiness and security objectivesDemocratic transparency, accurate Swedish political data, 14-language accessMission statement, business objectives
    Stage II: Define Technical ScopeApplication + infrastructure inventoryStatic website, AI workflows, AWS CloudFront, riksdag-regering-mcp, GitHub ActionsAsset inventory (ASSET-001 to ASSET-010)
    Stage III: Application DecompositionDFD, trust boundaries, data flowsC4 architecture diagrams, STRIDE per DFD element, trust boundary documentationArchitecture diagrams, DFDs
    Stage IV: Threat AnalysisThreat intelligence integrationENISA 2024/2025 trends, MITRE ATT&CK 23 techniques, Swedish CERT-SE advisoriesThreat agent profiles, MITRE mapping
    Stage V: Vulnerability AnalysisIdentify weaknesses per componentCodeQL static analysis, Dependabot, GitHub Secret Scanning, SRI validationVulnerability tracking (ATT-GAP-001/002/003)
    Stage VI: Attack ModelingRealistic attack scenarios9 attack trees: defacement, misinformation, CDN supply chain, AI hallucinationAttack trees with probability estimates
    Stage VII: Risk/Impact AnalysisQuantify business impact$180K cost avoidance, risk scores (0-10), ROI 682%Risk matrix, treatment decisions

    PASTA Applicability for Riksdagsmonitor:

    • โœ… Risk-first approach aligns with democratic mission (election integrity > financial impact)
    • โœ… Business objective mapping: Transparency โ†” Integrity, Availability โ†” Access to democracy
    • โœ… Attacker simulation: AI misinformation actors, nation-state APTs, hacktivists modeled
    • โœ… Seven-stage completion demonstrates mature threat modeling practice

    Trike focuses on acceptable risk and security auditing, ensuring every threat has an explicit risk treatment decision โ€” fully aligned with Hack23 ISMS policy.

    Trike ConceptRiksdagsmonitor ApplicationImplementation
    Actor โ†’ Asset โ†’ Action modelThreat agent โ†’ Crown Jewel โ†’ Attack type mapping7 threat agent profiles ร— 5 Crown Jewels ร— STRIDE actions
    Acceptable Risk DefinitionCEO-defined risk tolerance thresholdsRisk Score โ‰ค 3.2/10 acceptable; 0 CRITICAL risks tolerated
    Threat Enumeration CompletenessAll actor-asset-action triples evaluated52 STRIDE threats + 18 AI/LLM threats = 70 total threat entries
    Permission ModelIntended vs. implemented access rightsGitHub OIDC scopes, AWS IAM policies, MCP server access controls
    Risk Treatment TrackingEvery threat has explicit treatment0 AVOID, 48 MITIGATE, 4 TRANSFER, 18 ACCEPT (70 threats, 100% coverage)
    Audit TrailAll changes tracked to threat modelGit commit history, quarterly review schedule

    Trike Benefits for Riksdagsmonitor:

    • โœ… Auditability: Every threat has explicit MITIGATE/TRANSFER/ACCEPT decision
    • โœ… Completeness check: Actor-asset-action matrix prevents threat omissions
    • โœ… Democratic accountability: CEO-level risk acceptance for all residual risks
    • โœ… Continuous improvement: Risk threshold adjustments tracked over time
    graph LR
    STRIDE["๐ŸŽญ STRIDE<br/>Architecture-centric<br/>Threat categories<br/>per DFD element"]
    ATT["๐ŸŽ–๏ธ MITRE ATT&CK<br/>Attacker-centric<br/>Tactics & techniques<br/>Real-world TTPs"]
    PASTA["๐Ÿ”ฌ PASTA<br/>Risk-centric<br/>Business objectives<br/>Attack simulation"]
    TRIKE["โš–๏ธ Trike<br/>Audit-centric<br/>Acceptable risk<br/>Treatment tracking"]
    OWASP["๐Ÿค– OWASP LLM<br/>AI-specific<br/>LLM Top 10<br/>AI workflow security"]

    STRIDE -->|"Threat categories"| Combined["๐Ÿ† Integrated<br/>Riksdagsmonitor<br/>Threat Model<br/>70 threats<br/>$180K value<br/>Level 4.25/5"]
    ATT -->|"Real-world TTPs"| Combined
    PASTA -->|"Business risk"| Combined
    TRIKE -->|"Risk decisions"| Combined
    OWASP -->|"AI threats"| Combined

    style Combined fill:#2196f3,color:#fff
    style STRIDE fill:#4caf50,color:#000
    style ATT fill:#ff9800,color:#000
    style PASTA fill:#9c27b0,color:#fff
    style TRIKE fill:#f44336,color:#fff
    style OWASP fill:#607d8b,color:#fff

    Following Hack23 Threat Modeling Policy ยง 4.5, we provide quantitative risk analysis with business impact.

    Likelihood Scale (1-5):

    • 5 (CRITICAL): >80% probability within 12 months
    • 4 (HIGH): 60-80% probability
    • 3 (MEDIUM): 30-60% probability
    • 2 (LOW): 10-30% probability
    • 1 (VERY LOW): <10% probability

    Impact Scale (1-10):

    • 10 (CATASTROPHIC): >$100K loss, mission failure, severe reputation damage
    • 8 (HIGH): $50K-$100K loss, major reputation damage
    • 5 (MEDIUM): $10K-$50K loss, moderate reputation impact
    • 3 (LOW): $1K-$10K loss, minor reputation impact
    • 1 (MINIMAL): <$1K loss, negligible impact

    Risk Score: Likelihood (1-5) ร— Impact (1-10) = Risk Score (1-50 scale โ†’ normalized to 0-10)

    graph TD
    subgraph "Risk Matrix (Likelihood ร— Impact)"
    Critical["๐Ÿ”ด CRITICAL RISK<br/>Score: 8.0-10.0<br/>Count: 0 threats"]
    High["๐ŸŸ  HIGH RISK<br/>Score: 4.0-7.9<br/>Count: 2 threats"]
    Medium["๐ŸŸก MEDIUM RISK<br/>Score: 2.0-3.9<br/>Count: 8 threats"]
    Low["๐ŸŸข LOW RISK<br/>Score: <2.0<br/>Count: 42 threats"]
    end

    Critical --> Action1["IMMEDIATE ACTION<br/>CEO approval required<br/>< 1 week remediation"]
    High --> Action2["HIGH PRIORITY<br/>Q1 2026 remediation<br/>Enhanced monitoring"]
    Medium --> Action3["MONITORED<br/>Existing controls adequate<br/>Planned improvements"]
    Low --> Action4["ACCEPTED<br/>Risk tolerance met<br/>Routine monitoring"]

    style Critical fill:#f44336,color:#fff
    style High fill:#ff9800,color:#000
    style Medium fill:#ffc107,color:#000
    style Low fill:#4caf50,color:#000
    RankThreat IDThreat NameSTRIDELikelihoodImpactRisk ScoreStatusRemediation Plan
    1AI-H1 (LLM09)AI hallucination misinformation publishedInformation DisclosureMEDIUM (3)CRITICAL (10)3.0โš ๏ธ MEDIUMQ1 2026: Automated dok_id API verification
    2AI-P1 (LLM01)Prompt injection via riksdag documentsTamperingMEDIUM (3)HIGH (8)2.8โš ๏ธ MEDIUMQ1 2026: Enhanced input sanitization
    3AI-T1Cross-language translation inconsistencyTamperingMEDIUM (3)HIGH (8)2.4โš ๏ธ MEDIUMQ2 2026: Consistency validation tool
    4T1Repository content tamperingTamperingLOW (2)CRITICAL (10)2.0๐ŸŸข LOWExisting: Branch protection, GPG signing
    5AI-D1 (LLM04)API rate limiting DoSDoSMEDIUM (3)MEDIUM (5)1.5๐ŸŸข LOWExisting: Graceful degradation
    6T3Chart.js/D3.js supply chain attackTamperingLOW (2)HIGH (8)1.6๐ŸŸข LOWExisting: SRI hashes, manual CDN review
    7I1GitHub secrets exposureInformation DisclosureLOW (2)CRITICAL (10)2.0๐ŸŸข LOWExisting: Secret scanning, OIDC
    8E1GitHub Actions privilege escalationElevation of PrivilegeLOW (2)MEDIUM (5)1.0๐ŸŸข LOWExisting: Least privilege, SHA-pinned actions
    9D1AWS infrastructure outageDoSLOW (2)MEDIUM (5)1.0๐ŸŸข LOWExisting: Multi-region, GitHub Pages DR
    10AI-S1 (LLM05)MCP server supply chain compromiseTamperingLOW (2)HIGH (8)1.6๐ŸŸข LOWExisting: Health checks, freshness validation

    Average Risk Score (Top 10): 1.99/10 (LOW)
    Highest Risk: 3.0/10 (AI-H1 Hallucination) โ†’ MEDIUM
    Overall Threat Model Risk: 0.69/10 (LOW) - Acceptable

    Risk TreatmentThreat CountRationaleAnnual Cost Avoidance
    AVOID0No threats require feature removalN/A
    MITIGATE48Active controls implemented$180,000
    TRANSFER4AWS/GitHub vendor responsibility (Shield, GitHub SLA)$25,000 (vendor SLA value)
    ACCEPT18Residual risk within tolerance$0 (cost of acceptance)

    Total Annual Cost Avoidance Through Threat Model: $180,000

    Breakdown by Control Category:

    • Preventive Controls: $120,000 (67%)
    • Detective Controls: $40,000 (22%)
    • Corrective Controls: $20,000 (11%)

    ROI Calculation:

    • Threat Model Development Cost: $15,000 (CEO/security architect time)
    • Annual Security Control Costs: $8,000 (GitHub Advanced Security, AWS Shield Standard)
    • Net Annual Benefit: $180,000 - $23,000 = $157,000
    • ROI: 682% (excellent)

    Intangible Benefits:

    • โœ… Enhanced brand reputation (transparency commitment)
    • โœ… Competitive advantage (public security posture)
    • โœ… Customer/stakeholder trust
    • โœ… Regulatory compliance (GDPR, EU AI Act, NIS2)
    • โœ… Insurance premium reduction potential

    Riksdagsmonitor-specific validation procedures for democratic transparency and political data integrity.

    graph TB
    Source[๐Ÿ›๏ธ Data Source<br/>Riksdag/Regeringen]

    subgraph "Validation Pipeline"
    V1[๐Ÿ“‹ Schema Validation<br/>JSON structure compliance]
    V2[๐Ÿ” Freshness Check<br/><48h threshold]
    V3[โœ… Document ID Verification<br/>dok_id against Riksdag API]
    V4[๐Ÿ—ฃ๏ธ Cross-Language Consistency<br/>14-language fact alignment]
    V5[๐Ÿ“Š Statistical Plausibility<br/>Vote margin reasonableness]
    V6[๐Ÿง‘ Human Review<br/>PR approval gate]
    end

    subgraph "Publication"
    Publish[๐Ÿ“ฐ Published Article]
    Reject[โŒ Rejected/Corrected]
    end

    Source --> V1
    V1 -->|Pass| V2
    V1 -->|Fail| Reject
    V2 -->|Pass| V3
    V2 -->|Fail| Reject
    V3 -->|Pass| V4
    V3 -->|Fail| Reject
    V4 -->|Pass| V5
    V4 -->|Warning| V6
    V5 -->|Pass| V6
    V5 -->|Fail| Reject
    V6 -->|Approve| Publish
    V6 -->|Reject| Reject

    style Source fill:#2196f3,color:#fff
    style V1 fill:#4caf50,color:#000
    style V2 fill:#4caf50,color:#000
    style V3 fill:#ff9800,color:#000
    style V4 fill:#ff9800,color:#000
    style V5 fill:#4caf50,color:#000
    style V6 fill:#2196f3,color:#fff
    style Publish fill:#8bc34a,color:#000
    style Reject fill:#f44336,color:#fff
    Validation GateDetection TargetDetection RateFalse Positive RateAutomation Status
    V1: Schema ValidationMalformed riksdag-regering-mcp responses100%<1%โœ… Automated
    V2: Freshness CheckStale data (>48h old)95%<1%โœ… Automated
    V3: Document ID VerificationHallucinated dok_id, fabricated documents85% (manual)2%โš ๏ธ Manual (planned automation Q1 2026)
    V4: Cross-Language ConsistencyContradictory facts across 14 languages80% (spot-check)5%โš ๏ธ Manual (planned automation Q2 2026)
    V5: Statistical PlausibilityVote margin arithmetic errors, implausible data90%3%โš ๏ธ Manual (heuristic checks)
    V6: Human ReviewAll threat types (comprehensive gate)95%5%โœ… Mandatory (PR review)

    Overall Validation Effectiveness: 92.5% (weighted average)

    Validation Failure Rate: ~5% (articles rejected in PR review) - indicates healthy detection of AI hallucinations and data issues

    Severity Classification:

    SeverityDefinitionResponse TimePublic Statement RequiredExample
    CRITICALCompletely fabricated parliamentary data published< 4 hoursYes (CEO)Fake vote results, non-existent proposition
    HIGHSignificant factual error with reputational impact< 12 hoursYes (project lead)Wrong vote margin (175-174 vs. 176-173), misattributed committee
    MEDIUMMinor factual error, limited visibility< 24 hoursNo (correction notice)Typo in minister name, incorrect date
    LOWStylistic issue, translation nuance< 72 hoursNo (silent correction)Word choice in translation, formatting inconsistency
    1. Detection: PR reviewer, user report, or automated validation failure
    2. Classification: Assign severity (CRITICAL/HIGH/MEDIUM/LOW)
    3. Immediate Action:
      • CRITICAL/HIGH: Remove article immediately (Git revert)
      • MEDIUM/LOW: Mark for correction (next release cycle)
    4. Investigation: Root cause analysis (hallucination? MCP error? reviewer oversight?)
    5. Correction: Create corrected article version with changelog
    6. Public Statement (if required):
      • Transparent acknowledgment of error
      • Explanation of root cause (if appropriate)
      • Preventive measures implemented
      • CEO accountability signature
    7. Prevention: Update validation gates, reviewer training, or automated checks

    Public Incident Log: All CRITICAL and HIGH severity incidents documented in GitHub Issues (public) with:

    • Incident description
    • Root cause analysis
    • Impact assessment
    • Corrective actions
    • Preventive measures
    • CEO accountability statement

    Example PUBLIC Incident Disclosure:

    Incident #2026-001: Fabricated Vote Margin Published (2026-03-15)

    Severity: HIGH
    Detection: PR reviewer post-publication (within 6 hours)
    Description: AI-generated article reported incorrect vote margin (175-174) for motion H901:23. Actual margin was 176-173.
    Root Cause: AI hallucination (Claude Opus 4.8 non-determinism). Document ID was correct (H901:23), but vote arithmetic was fabricated. Impact: Misinformation visible to ~500 users before correction. No external media amplification.
    Corrective Actions:

    • Article removed within 4 hours of detection
    • Corrected version published with changelog
    • Email notification to known stakeholders

    Preventive Measures:

    • Implemented automated vote margin verification against Riksdag API (Q1 2026 accelerated)
    • Enhanced PR review checklist (vote arithmetic mandatory check)
    • Reviewer training on AI hallucination detection

    Accountability: James Pether Sรถrling, CEO - Full responsibility for incident and prevention.


    Assessment of Riksdagsmonitor threat modeling maturity per Hack23 Threat Modeling Policy ยง 7.

    LevelDescriptionRiksdagsmonitor StatusEvidence
    Level 0: Ad-HocNo systematic threat analysisโŒ Not ApplicableN/A
    Level 1: InitialBasic threat identification, no formal processโŒ Not ApplicableN/A
    Level 2: ManagedSTRIDE analysis, threat documentationโŒ SupersededPrevious threat models (numbered sections)
    Level 3: DefinedFormal methodology (ISMS-aligned), multi-strategy approachโœ… CURRENT LEVELThis threat model (18 thematic sections)
    Level 4: QuantitativeRisk scoring, business value quantification, metricsโœ… CURRENT LEVELRisk scores, cost avoidance ($180K), ROI 682%
    Level 5: OptimizingContinuous improvement, automated validation, AI-assisted threat modeling๐ŸŸก PARTIALContinuous monitoring (โœ…), automated validation gaps (Q1-Q2 2026)

    Current Maturity Level: Level 4 (Quantitative) with progress toward Level 5 (Optimizing)

    CapabilityMaturity LevelEvidenceGap Analysis
    Threat IdentificationLevel 5 โœ…STRIDE per element, MITRE ATT&CK (23 techniques), Attack Trees (6 scenarios), OWASP LLM Top 10None - comprehensive coverage
    Risk AssessmentLevel 4 โœ…Quantitative risk scores (0-10 scale), likelihood ร— impact, cost avoidance quantificationNone - meets requirements
    Control EffectivenessLevel 4 โœ…Control effectiveness scoring (%), risk reduction percentages, MTTD/MTTR metricsNone - adequate metrics
    Business Value IntegrationLevel 4 โœ…$180K annual cost avoidance, ROI 682%, intangible benefits quantifiedNone - strong business case
    Continuous MonitoringLevel 4 โœ…Real-time metrics (CSP, SRI, CloudTrail), daily/weekly reviews, quarterly threat landscape updatesNone - comprehensive monitoring
    Automated ValidationLevel 3 ๐ŸŸกManual PR review, partial automation (schema, freshness), gaps in dok_id and cross-language validationGAP: Q1-Q2 2026 automation roadmap
    Incident ResponseLevel 4 โœ…Documented procedures, public transparency, CEO accountabilityNone - mature process
    Threat IntelligenceLevel 4 โœ…ENISA, MITRE ATT&CK, OWASP, Swedish CERT-SE, GitHub/AWS advisoriesNone - comprehensive sources

    Overall Maturity Score: Level 4.25/5 (High Maturity)

    Path to Level 5 (Optimizing):

    • โœ… Complete: Formal methodology, quantitative assessment, business value, continuous monitoring
    • ๐ŸŸก In Progress (Q1-Q2 2026): Automated validation (dok_id API, cross-language consistency)
    • ๐Ÿ”„ Future (Q3-Q4 2026): AI-assisted threat modeling (LLM-based threat discovery), predictive analytics
    MetricRiksdagsmonitorCIA (Reference)Black Trigram (Reference)Industry Average (Static Websites)
    Document Length2,134+ lines943 lines880 lines~300 lines
    Thematic Sections19 sections โœ…18 sections16 sections5-8 sections
    STRIDE Threats52 threats48 threats35 threats10-15 threats
    MITRE ATT&CK Techniques23 techniques40 techniques28 techniques5-10 techniques
    Attack Trees6 trees8 trees6 trees1-2 trees
    Control Effectiveness93.1%92.3%95.8%70-80%
    Maturity LevelLevel 4.25Level 5Level 4.5Level 2-3
    Annual Cost Avoidance$180,000$200,000+$150,000Not quantified

    Analysis:

    • Riksdagsmonitor achieves industry-leading maturity for static website threat models
    • Document length exceeds CIA (943 lines) and Black Trigram (880 lines) due to domain-specific sections (Democratic Threat Catalog, Frontend-Specific Security)
    • Control effectiveness (93.1%) is comparable to reference implementations (92.3-95.8%)
    • Maturity Level 4.25 positions Riksdagsmonitor between CIA (Level 5, mature full-stack app) and Black Trigram (Level 4.5, frontend-only game)
    • Competitive Advantage: Public threat model transparency demonstrates security excellence to civic transparency advocates, regulators, and potential clients

    Riksdagsmonitor-specific security practices for civic transparency platforms.

    Principle: Publicly document all security practices, threat models, and incident responses.

    Implementation:

    • โœ… Public THREAT_MODEL.md (this document)
    • โœ… Public SECURITY_ARCHITECTURE.md
    • โœ… Public GitHub repository with security workflows
    • โœ… Public incident disclosure policy (CRITICAL/HIGH incidents)
    • โœ… CEO accountability statements

    Benefits:

    • Builds trust with transparency advocates and civil society
    • Demonstrates security excellence to potential clients/partners
    • Regulatory compliance (GDPR transparency, EU AI Act disclosure)
    • Competitive advantage (few civic tech platforms publish threat models)

    Principle: Never publish AI-generated political content without multi-layered human and automated validation.

    Implementation:

    • โœ… Document ID validation (all factual claims require valid dok_id)
    • โœ… Mandatory PR review by human (95% hallucination detection)
    • โœ… Source citations (MCP tool calls documented)
    • โš ๏ธ Planned: Automated API verification (Q1 2026)
    • โš ๏ธ Planned: Cross-language consistency validation (Q2 2026)

    Benefits:

    • Prevents AI hallucination publication (98% effectiveness)
    • Maintains journalistic integrity for political data
    • Regulatory compliance (EU AI Act Article 52 - transparency obligations)

    Principle: Ensure factual consistency across all 14 supported languages.

    Implementation:

    • โœ… TRANSLATION_GUIDE.md terminology dictionary
    • โœ… Translation markers (data-translate attributes)
    • โœ… Playwright RTL testing (Arabic, Hebrew visual validation)
    • โš ๏ธ Planned: Automated cross-language consistency validator (Q2 2026)

    Benefits:

    • Prevents narrative manipulation via translation divergence
    • Maintains trust across multilingual user base
    • Demonstrates commitment to linguistic accuracy

    Principle: Every factual claim must be traceable to an authoritative Swedish government source.

    Implementation:

    • โœ… Document IDs (dok_id) for all Riksdag documents
    • โœ… regeringen.se URLs for all Government documents
    • โœ… MCP tool call provenance (which tools generated which data)
    • โœ… Git commit history (who added which content)

    Benefits:

    • Fact-checking accountability (95% verification success)
    • Incident investigation capability (root cause analysis)
    • Regulatory compliance (GDPR Article 5 - data accuracy)

    Principle: Democratic transparency platforms must be resilient to nation-state attacks and election-period disruptions.

    Implementation:

    • โœ… Multi-region architecture (AWS us-east-1 + eu-west-1, GitHub Pages DR)
    • โœ… AWS Shield Standard (DDoS protection)
    • โœ… Route 53 health checks (automatic failover)
    • โœ… AI content freeze protocol (election periods)
    • โœ… Incident response playbook (CEO-led)

    Benefits:

    • 99.998% availability target met
    • <5 minute recovery from regional failures
    • Maintains transparency during high-stakes political events


    ๐Ÿ“‹ Document Owner: James Pether Sรถrling, CEO & CISO
    ๐Ÿ“„ Version: 2.0 ๐Ÿ“… Last Updated: 2026-06-02 (UTC) โœ… Approved by: James Pether Sรถrling, CEO
    ๐Ÿ”„ Review Cycle: Quarterly โฐ Next Review: 2026-09-02 ๐Ÿข Owner: Hack23 AB (Org.nr 5595347807)
    ๐Ÿ“ค Distribution: Public
    ๐Ÿท๏ธ Classification: Confidentiality: PublicIntegrity: HighAvailability: High

    ๐ŸŽฏ Framework Alignment:
    ISO 27001NIST CSF 2.0CIS ControlsOWASPEU AI Actgh-aw


    Effective: 2026-04-24 ยท Authoritative hub: analysis/imf/README.md ยท analysis/imf/agentic-integration.md ยท analysis/imf/indicators-inventory.json ยท analysis/imf/data-dictionary.md ยท .github/aw/ECONOMIC_DATA_CONTRACT.md

    IDElementSTRIDEDescriptionLikelihoodImpactMitigation
    T-IMF-01IMF cache (filesystem)TamperingVintage substitution โ€” older WEO vintage swapped for newer labelLOWHIGHVintage-tagged filenames; SHA-256 pin in cache index; supersedes-chain audit
    T-IMF-02IMF egress pathInformation disclosureIMF data is public macro statistics with no PII; SDMX 3.0 requests transmit the IMF_SDMX_SUBSCRIPTION_KEY (Azure APIM Ocp-Apim-Subscription-Key header) which gates throttle/quota only. Compromise of the key would let an attacker exhaust IMF rate quota under our identity but expose no confidential data.LOWLOWKey stored only as a GitHub Actions secret (IMF_SDMX_SUBSCRIPTION_KEY, with _SECONDARY rotation hot-spare); ::add-mask:: applied in CI logs; never written to disk; rotation playbook in analysis/imf/agentic-integration.md ยง"Pre-warm gate"
    T-IMF-03IMF APIDoSWorkflow exceeds IMF rate limit (~30 req/min) โ†’ blocks article generationMEDIUMMEDIUMCache-first; self-imposed โ‰ค30 req/min; exponential back-off; documented in analysis/imf/agentic-integration.md
    T-IMF-04IMF citation in articleRepudiationArticle cites "IMF projects X" without vintage label โ†’ unauditable claimMEDIUMMEDIUMeconomicProvenance block required in front-matter; ECONOMIC_DATA_CONTRACT v2.1 banned phrases
    T-IMF-05tsx scripts/imf-fetch.tsElevation of privilegeSupply-chain tampering of IMF fetch scriptLOWHIGHScript in-repo; reviewed; no dynamic eval; harden-runner egress audit
    T-IMF-06IMF data licenceRepudiationArticle reuses IMF figure without attributionLOWMEDIUMArticle footer template auto-emits IMF citation; lint enforces
    T-IMF-07IMF cache fallbackSpoofingStale cached vintage served as current โ†’ reader misinformedLOWMEDIUMVintage-age annotation rule (>6 mo โ†’ flagged); ECONOMIC_DATA_CONTRACT v2.1

    All mitigations are codified in:

    • analysis/imf/data-dictionary.md โ€” vintage discipline + dataflow quirks
    • analysis/imf/agentic-integration.md โ€” seven-step integration contract
    • .github/aw/ECONOMIC_DATA_CONTRACT.md โ€” banned phrases + provenance schema
    • scripts/imf-context.ts โ€” runtime enforcement
    • tests/imf-context.test.ts + tests/imf-inventory.test.ts โ€” regression prevention

    Egress hosts (allow-list): www.imf.org (Datamapper REST ยท WEO/FM, unauthenticated), api.imf.org (SDMX 3.0 REST ยท IFS/BOP/DOTS/GFS/PCPS/ER/MFS_IR/MFS_PR, subscription-key authenticated via the Azure APIM Ocp-Apim-Subscription-Key header / IMF_SDMX_SUBSCRIPTION_KEY secret). Both HTTPS-only; payloads are public macro statistics with no PII.

    Canonical rule. Every economic claim in a Riksdagsmonitor article cites an IMF dataflow first; World Bank citations are reserved for governance, environment and social residue (the classes IMF does not publish). SCB is the Swedish-specific ground truth layer. See ECONOMIC_DATA_CONTRACT.md v2.1 for the banned-phrase list and vintage discipline (>6 mo โ†’ annotation).


    Effective: 2026-04-25 ยท Classification: Public ยท Entry point: scripts/statskontoret-fetch.ts ยท Source: www.statskontoret.se.

    Statskontoret ingestion introduces a public-data trust boundary for Swedish agency structure and budget outturn files. It is unauthenticated, read-only and optional enrichment, but the integrity of parsed figures matters for political-intelligence claims.

    IDAsset / flowSTRIDEThreatLikelihoodImpactMitigations
    T-STATS-01www.statskontoret.se page discoverySpoofingDNS/TLS interception or lookalike page returns false download linksLOWMEDIUMHTTPS-only egress, allow-list www.statskontoret.se, source URL recorded in payload and .meta.json, PR review of persisted diffs.
    T-STATS-02Excel / CSV ZIP payloadTamperingWorkbook or archive content modified upstream or in transitLOWHIGHTLS transport, local parser contract checks, typed StatskontoretError, persisted raw/derived artifacts with provenance sidecars, reviewer diff inspection.
    T-STATS-03Headcount aggregationInformation integrityHeader drift maps wrong columns to ร…r, Departement, Myndighet, or ร…rsarbetskrafterMEDIUMMEDIUMHeader-family matching documented in analysis/statskontoret/data-dictionary.md, unit tests for workbook parsing and Swedish number handling, fallback to no derived output if required fields cannot be resolved.
    T-STATS-04CLI invocationRepudiationArticle cites agency headcount or budget outturn without source page/year/statusMEDIUMMEDIUMdiscover captures source page, URL, year/month/status and last-modified; persisted sidecars include dataset, artifact, fetchedAt, and mcpTool: statskontoret-ts-client.
    T-STATS-05Source availabilityDenial of serviceStatskontoret page unavailable or workbook fetch times outMEDIUMLOW15s timeout, optional-enrichment semantics, cache-first reuse of analysis/data/statskontoret/, article generation can omit context rather than fail.
    T-STATS-06XLSX/ZIP parsing dependencyElevation of privilegeMalicious archive attempts parser/resource abuseLOWHIGHjszip pinned in npm lock/SBOM, GitHub Advisory Database reviewed, no dynamic eval, no script execution from workbooks, tests exercise parser edge cases.
    • Residual risk: LOW-MEDIUM integrity risk due to upstream data or workbook-schema drift; handled by provenance, test coverage and human review.
    • Privacy: no PII or credentials; public authority and aggregate budget data only.
    • CIA: Public / High Integrity / Medium-High Availability for derived article context.

    Effective: 2026-05-30 ยท Classification: Public ยท Entry point: scripts/scb-fetch.ts ยท Client: scripts/scb-client.ts / scripts/scb-context.ts ยท Sources: AWF MCP gateway route to the scb MCP server (primary) and direct MCP relay https://scb-mcp.onrender.com/mcp (DIRECT_SCB_SERVER_URL fallback) ยท Cache: analysis/data/scb/.

    SCB (Statistics Sweden) supplies the Swedish-specific ground-truth statistics layer (population, labour, economy, public finance). The integration is entirely MCP-based: inside the AWF sandbox it routes through the MCP gateway (host.docker.internal:<port>/mcp/scb); outside the sandbox it falls back to the community-hosted MCP relay on Render (https://scb-mcp.onrender.com/mcp). There is no direct SCB REST/PXWeb HTTP client โ€” the trust boundary is between the two MCP transport paths, mitigated by cache-first/optional-enrichment semantics and provenance discipline.

    IDAsset / flowSTRIDEThreatLikelihoodImpactMitigations
    T-SCB-01scb-mcp.onrender.com MCP relaySpoofingThird-party relay impersonated or DNS/TLS-intercepted, returning forged table dataLOWHIGHHTTPS-only egress; allow-list scb-mcp.onrender.com; DIRECT_SCB_SERVER_URL selects the direct MCP relay when AWF gateway is unavailable; source URL + table id recorded in provenance.
    T-SCB-02JSON-stat / PXWeb payloadTamperingRelay or upstream mutates statistic values, footnotes, or contents codesLOWHIGHTyped MCP client contract checks; persisted raw/derived artifacts with .meta.json sidecars; reviewer diff inspection on persisted analysis/data/scb/.
    T-SCB-03Table-cell mappingInformation integrityVariable/value-code drift maps wrong dimension (region, period, contents) to a cellMEDIUMMEDIUMMetadata fetched per table before query; value-code validation; unit tests for SCB client parsing; omit context rather than emit unmapped figures.
    T-SCB-04SCB citation in articleRepudiationArticle cites "SCB reports X" without table id / vintage โ†’ unauditable claimMEDIUMMEDIUMProvenance block records mcpTool, table id, fetchedAt; ECONOMIC_DATA_CONTRACT vintage discipline applies to the Swedish ground-truth layer.
    T-SCB-05MCP relay availabilityDenial of serviceRender relay cold-start or MCP timeout blocks enrichmentMEDIUMLOW15s timeout (DEFAULT_TIMEOUT); cache-first reuse; optional-enrichment semantics; retry with backoff (DEFAULT_MAX_RETRIES).
    T-SCB-06tsx scripts/scb-fetch.tsElevation of privilegeSupply-chain tampering of fetch/parse pathLOWHIGHScript in-repo; reviewed; no dynamic eval; dependencies pinned in npm lock/SBOM; harden-runner egress audit.
    • Residual risk: LOW-MEDIUM integrity risk concentrated in the third-party MCP relay; mitigated by cache-first/optional-enrichment semantics and provenance sidecars.
    • Privacy: no PII; public aggregate national statistics only.
    • CIA: Public / High Integrity / Medium Availability (optional enrichment).

    Effective: 2026-05-30 ยท Classification: Public ยท Client: scripts/world-bank-client.ts / scripts/world-bank-context.ts ยท Consumer: scripts/populate-analysis-data.ts ยท Source: https://api.worldbank.org/v2 (unauthenticated REST) ยท Hub: analysis/worldbank/README.md ยท analysis/worldbank/indicator-policy-mapping.md.

    The World Bank integration is scope-restricted by contract: it supplies only the governance, environment, social and demographic residue that the IMF does not publish (e.g. Worldwide Governance Indicators, source=75). It is never used for economic context โ€” that role is canonical to the IMF. The dominant risk is therefore contract violation (misuse as an economic source) as much as classic data-integrity threats.

    IDAsset / flowSTRIDEThreatLikelihoodImpactMitigations
    T-WB-01api.worldbank.org/v2 egressSpoofingDNS/TLS interception returns forged indicator seriesLOWMEDIUMHTTPS-only egress; allow-list api.worldbank.org; source URL + indicator code recorded in provenance.
    T-WB-02Indicator series payloadTamperingUpstream or in-transit mutation of governance/environment valuesLOWMEDIUMTLS transport; typed client contract checks; persisted artifacts with provenance sidecars; reviewer diff inspection.
    T-WB-03Indicator-class selectionInformation integrityWorld Bank figure used for economic context, violating the canonical IMF-first ruleMEDIUMHIGHindicator-policy-mapping.md restricts allowed classes (governance/environment/social/demographic); ECONOMIC_DATA_CONTRACT bans WB economic claims; lint/tests enforce.
    T-WB-04WB citation in articleRepudiationArticle cites WB indicator without code/vintage/source โ†’ unauditableLOWMEDIUMProvenance block records indicator code + fetchedAt; footer attribution template.
    T-WB-05API availabilityDenial of serviceWorld Bank API timeout blocks enrichmentLOWLOWCache-first; optional-enrichment semantics; article can omit residue context rather than fail.
    T-WB-06world-bank-client.ts fetch pathElevation of privilegeSupply-chain tampering of fetch/parse pathLOWMEDIUMScript in-repo; reviewed; no dynamic eval; dependencies pinned in npm lock/SBOM; harden-runner egress audit.
    • Residual risk: LOW; the binding control is the canonical IMF-first contract that confines World Bank to non-economic residue.
    • Privacy: no PII; public country-level indicators only.
    • CIA: Public / High Integrity / Low-Medium Availability (optional residue enrichment).

    Effective: 2026-05-30 ยท Classification: Public ยท Entry point: scripts/fetch-rir-followups.ts ยท Client: scripts/rir-followups-client.ts ยท Source: Riksdag/Regeringen via the riksdag-regering-mcp server (doktyp=skr skrivelse responses to RiR audit reports) ยท Store: data/rir-followups.json (schema: schemas/rir-followups-schema.json).

    The RiR follow-up tracker matches government skrivelse responses against National Audit Office (Riksrevisionen) reports to surface oversight accountability โ€” including overdue-response alerts. Because it generates accountability claims about whether the government acted on audit findings, the integrity of the reportโ†”skrivelse matching and the deadline arithmetic are the principal threats.

    IDAsset / flowSTRIDEThreatLikelihoodImpactMitigations
    T-RIR-01riksdag-regering-mcp doktyp=skr querySpoofingMCP relay impersonated or returns forged skrivelse documentsLOWHIGHHTTPS-only egress; allow-list riksdag-regering-ai.onrender.com; dok_id recorded in data/rir-followups.json; same trust boundary controls as the core MCP server.
    T-RIR-02data/rir-followups.jsonTamperingFollow-up status (open/responded/overdue) altered to misstate government accountabilityLOWHIGHJSON Schema validation (schemas/rir-followups-schema.json); committed artifact reviewed in PR diffs; provenance includes source dok_id and fetchedAt.
    T-RIR-03Reportโ†”skrivelse matchingInformation integrityWrong skrivelse matched to a RiR report โ†’ false "responded/ignored" claimMEDIUMHIGHDeterministic matching keyed on report reference; schema-validated linkage; unit/regression tests; human review before publication.
    T-RIR-04Deadline computationInformation integrityMis-calculated follow-up window emits false overdue/compliant alertMEDIUMMEDIUMDocumented 4-month statutory window; date arithmetic under test; alert thresholds reviewed.
    T-RIR-05RiR/Riksdag accountability citationRepudiationArticle asserts government "failed to respond" without source dok_id/dateMEDIUMMEDIUMProvenance block records dok_id, response date, status; ISMS editorial review for accountability claims.
    T-RIR-06Source availabilityDenial of serviceRiksdag MCP/API unavailable blocks follow-up refreshMEDIUMLOWCache-first reuse of data/rir-followups.json; optional-enrichment semantics; stale-data annotation.
    • Residual risk: LOW-MEDIUM; matching and deadline integrity are the binding risks, mitigated by schema validation, tests and mandatory human review of accountability claims.
    • Privacy: no PII; public audit reports and government documents only.
    • CIA: Public / High Integrity / Medium Availability.

    ๐ŸŒ Platforms๐Ÿ“ฆ Open-Source Projects๐Ÿ›ก๏ธ Governance & Standards
    ๐Ÿ—ณ๏ธ Riksdagsmonitor โ€” Swedish Parliament intelligence
    ๐Ÿ‡ช๐Ÿ‡บ EU Parliament Monitor โ€” European coverage
    ๐Ÿ•ต๏ธ Citizen Intelligence Agency โ€” political-data engine
    ๐ŸŒ Hack23 AB โ€” corporate site
    ๐Ÿ“ฐ Hack23 Blog โ€” engineering & policy
    ๐Ÿ’ผ Hack23 on LinkedIn
    ๐Ÿ—ณ๏ธ Hack23/riksdagsmonitor
    ๐Ÿ•ต๏ธ Hack23/cia
    ๐Ÿ‡ช๐Ÿ‡บ Hack23/euparliamentmonitor
    ๐Ÿ”Œ Hack23/european-parliament-mcp
    โœ… Hack23/cia-compliance-manager
    ๐Ÿฅ‹ Hack23/black-trigram
    ๐Ÿ  Hack23/homepage
    ๐Ÿ›ก๏ธ Hack23 ISMS-PUBLIC โ€” public ISMS
    ๐Ÿ”’ Information Security Policy
    ๐Ÿค– AI Policy
    ๐Ÿงช Secure Development Policy
    ๐ŸŽฏ Threat Modeling Policy
    โš ๏ธ Vulnerability Management
    ๐Ÿท๏ธ Classification Framework

    OpenSSF Best PracticesOpenSSF ScorecardISO 27001:2022NIST CSF 2.0CIS Controls v8.1Apache 2.0

    ๐Ÿ—ณ๏ธ Empower citizens ยท ๐Ÿ” Strengthen democratic accountability ยท ๐Ÿ•ต๏ธ Illuminate the political process

    ยฉ 2008โ€“2026 Hack23 AB (Org.nr 559534-7807) ยท Maintainer: James Pether Sรถrling, CISSP CISM