![]()
๐ก๏ธ Proactive Security Through Structured Threat Analysis
๐ STRIDE โข MITRE ATT&CK โข Static Website โข AI-Powered News โข Democratic Transparency
๐ 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
Included Systems:
Out of Scope:
Integrated with ๐ฏ Hack23 AB Threat Modeling Policy methodology, following the five-strategy integrated approach:
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:
Highest Priority Threats:
| Document | Description | Status | Relevance to Threat Model |
|---|---|---|---|
| ๐ฏ THREAT_MODEL.md โ (this document) | STRIDE, ATT&CK, Attack Trees, Crown Jewels, Risk Analysis | โ Current | Primary document |
| ๐๏ธ ARCHITECTURE.md | C4 Context/Container/Component models | โ Current | System boundaries, trust zones |
| ๐ SECURITY_ARCHITECTURE.md | Security controls implementation (CSP, SRI, IAM) | โ Current | Control effectiveness mapping |
| ๐ฎ FUTURE_SECURITY_ARCHITECTURE.md | Planned security improvements | โ Current | Roadmap for gap closure |
| ๐ DATA_MODEL.md | Political data entities and relationships | โ Current | Data integrity requirements |
| ๐ FLOWCHART.md | Business process and data flows | โ Current | Attack surface identification |
| ๐ STATEDIAGRAM.md | System state transitions and lifecycles | โ Current | State-based threat scenarios |
| ๐ง MINDMAP.md | System conceptual relationships | โ Current | Asset dependency mapping |
| ๐ผ SWOT.md | Strategic analysis and positioning | โ Current | Threat opportunity alignment |
| ๐๏ธ FUTURE_ARCHITECTURE.md | Architectural evolution roadmap | โ Current | Future attack surface changes |
| ๐ FUTURE_DATA_MODEL.md | Enhanced data architecture plans | โ Current | Future data integrity risks |
| ๐ FUTURE_FLOWCHART.md | Improved process workflows | โ Current | Future DFD/STRIDE analysis |
| ๐ FUTURE_STATEDIAGRAM.md | Advanced state management | โ Current | Future state threat scenarios |
| ๐ง FUTURE_MINDMAP.md | Capability expansion plans | โ Current | Future asset identification |
| ๐ผ FUTURE_SWOT.md | Future strategic opportunities | โ Current | Strategic risk forecasting |
| ๐ง WORKFLOWS.md | CI/CD automation and pipelines | โ Current | Pipeline security analysis |
| ๐ก๏ธ CRA-ASSESSMENT.md | EU Cyber Resilience Act conformity | โ Current | CRA compliance evidence |
Overall Security Classification: PUBLIC / HIGH / HIGH (C/I/A)
| Compliance Area | Classification | Implementation Status |
|---|---|---|
| ๐ Regulatory Exposure | Low | Public 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) | Standard | Non-commercial OSS civic transparency platform; self-assessment approach per Recital 18 |
| ๐ค EU AI Act | Limited Risk (Article 52) | Transparency obligations (AI-generated content disclosure), human oversight required, no high-risk use cases |
| ๐ GDPR Data Processing | Public Officials Only | Personal data (names, roles, voting records, intressent_id) from Swedish Riksdag open data; no special-category data (Art. 9) or private individuals |
| ๐ RPO / RTO | RPO: 4-24h / RTO: 1-4h | Daily data pipeline updates, Git version control, S3 versioning; automated multi-region failover |
Total Annual Cost Avoidance Through Security Controls: $52,400
| Characteristic | Value | Security Implications |
|---|---|---|
| Geographic Reach | Global (14 languages) | Multi-region CDN required, translation integrity critical |
| User Base | Public (unlimited) | No authentication, DDoS resilience required |
| Data Volume | ~150 MB static content + 500MB political data (CSV) | S3 versioning, CDN caching, bandwidth management |
| Update Frequency | Daily (data pipeline) + Real-time (news workflows) | CI/CD security critical, rollback procedures essential |
| Availability Target | 99.998% (5.2 minutes/month downtime) | Multi-region architecture, health checks, DR failover |
| Peak Traffic | Swedish 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 Category | Why Valuable (Crown Jewel Rationale) | Primary Threats | Key Controls | Business Value | Annual Cost Avoidance |
|---|---|---|---|---|---|
| ๐ Dashboard Integrity | Political data accuracy drives user trust; manipulation undermines democratic transparency mission | Content manipulation, XSS injection, data tampering | CSP headers, SRI hashes, Git immutability, dual deployment (AWS+GitHub) | $30,000 | |
| ๐ณ๏ธ Parliamentary Data | Swedish Riksdag voting records, committee reports, parliamentary documentsโcore mission asset | Data falsification, integrity compromise, hallucination | CIA platform validation, riksdag-regering-mcp verification, daily pipeline updates, version control | $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 saturation | Egress 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-6a | $10,000 | |
| ๐ง Source Code & Algorithms | Dashboard visualization logic, Chart.js/D3.js integrations, AI workflow orchestration | IP theft, malicious injection, supply chain attacks | Private repo access controls, dependency scanning (Dependabot + CodeQL), GPG commit signing | $15,000 | |
| ๐ Riksdagsmonitor Brand | Market reputation, stakeholder trust, search engine positioning | Domain hijacking, phishing, brand impersonation, SEO poisoning | Domain monitoring, HTTPS enforcement, DNSSEC, HSTS preload, trademark registration | $20,000 | |
| โ๏ธ Infrastructure Config | AWS CloudFront, S3, Route 53 security baseline; GitHub Actions secrets | Infrastructure compromise, misconfiguration, credential exposure | IAM least privilege, OIDC (no long-lived keys), AWS Config rules, secret scanning | $25,000 | |
| ๐ค AI News Content | Automated journalism credibility; trusted source for Swedish political analysis | Prompt injection, hallucination, bias, misinformation | Claude Opus 4.8 with Anthropic guardrails, riksdag-regering-mcp validation, mandatory PR review, fact-checking protocol | $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 Rank | Asset | Crown Jewel Rationale | Attack Attractiveness | Compromise Impact | Protection Priority |
|---|---|---|---|---|---|
| ๐ #1 | ๐ณ๏ธ Election Data Integrity | Accuracy of election predictions, seat forecasts, and voting record aggregation from CIA platform; any manipulation directly undermines democratic accountability | VERY HIGH โ Nation-state actors, political adversaries, election interference campaigns | Catastrophic: Misinformation affects public understanding of Swedish democratic processes, potential election influence | CRITICAL โ Multiple overlapping controls |
| ๐ #2 | ๐ Dashboard Data Accuracy | CIA platform data pipeline integrity and Chart.js/D3.js visualizations; primary channel for political transparency; 14-language real-time display | HIGH โ Data accuracy is core mission; CSP/SRI protect against XSS/CDN tampering | High: Corrupted dashboards erode public trust, could misrepresent party standings or vote outcomes | HIGH โ SRI hashes, CSP, dual-region |
| ๐ #3 | ๐ Multi-Language Content | 14-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 languages | HIGH โ RTL (Arabic/Hebrew) harder to validate; targeted manipulation of specific language communities | High: Language-specific manipulation could spread unchecked; undermines trust of multilingual audience | HIGH โ TRANSLATION_GUIDE.md, Playwright RTL testing |
| ๐ #4 | ๐ CI/CD Pipeline Security | GitHub Actions OIDC, supply chain integrity, SHA-pinned actions, SLSA attestations; compromise enables persistent content injection with no trust boundary to stop it | HIGH โ Supply chain attacks (SolarWinds-pattern) increasingly common against civic platforms | Catastrophic: Persistent backdoor in CI/CD bypasses all publication controls; could inject malicious HTML into all pages | CRITICAL โ OIDC, SHA-pinning, branch protection |
| ๐ #5 | ๐ฐ News Article Credibility | AI-generated (Claude Opus 4.8) daily political news accuracy; journalistic credibility for Swedish parliamentary and government activity reporting | MEDIUM-HIGH โ Prompt injection, hallucination; AI-generated political misinformation campaigns | High: Fabricated parliamentary data damages reputation, could be amplified by external media; EU AI Act liability | HIGH โ Mandatory PR review, dok_id validation |
Crown Jewel Protection Strategy:
| Asset | Confidentiality Goal | Integrity Goal | Availability Goal |
|---|---|---|---|
| Dashboard Code | Public (open source) | HIGH - No unauthorized modifications | HIGH - 99.95% uptime |
| Political Data | Public (Swedish law) | CRITICAL - 100% accuracy required | HIGH - Daily updates essential |
| Infrastructure | Internal (AWS configs) | HIGH - Prevent misconfiguration | CRITICAL - 99.998% target |
| AI Content | Public (after review) | CRITICAL - Zero hallucinations published | MEDIUM - Graceful degradation OK |
| Brand Assets | Public (marketing) | HIGH - Authentic representation | MEDIUM - Backup channels exist |
Complete asset inventory with classifications:
| Asset ID | Asset Name | Type | Classification (C/I/A) | Value | Owner | Location |
|---|---|---|---|---|---|---|
| ASSET-001 | Riksdagsmonitor Website | Application | PUBLIC/HIGH/HIGH | CRITICAL | CEO | GitHub Pages + AWS CloudFront |
| ASSET-002 | Dashboard JavaScript (Chart.js/D3.js) | Application | PUBLIC/HIGH/HIGH | HIGH | CEO | GitHub Repository |
| ASSET-003 | Political Data (CSV) | Data | PUBLIC/HIGH/HIGH | CRITICAL | CEO | S3 buckets (us-east-1, eu-west-1) |
| ASSET-004 | GitHub Repository | Infrastructure | PUBLIC/HIGH/CRITICAL | HIGH | CEO | GitHub.com |
| ASSET-005 | AWS Infrastructure (S3, CloudFront, Route 53) | Infrastructure | INTERNAL/HIGH/CRITICAL | HIGH | CEO | AWS (us-east-1, eu-west-1) |
| ASSET-006 | GitHub Actions Secrets (AWS OIDC) | Credentials | CONFIDENTIAL/CRITICAL/HIGH | CRITICAL | CEO | GitHub Secrets |
| ASSET-007 | AI Workflows (Claude Opus 4.8 + Sonnet 4.6) | Application | PUBLIC/HIGH/MEDIUM | HIGH | CEO | GitHub Actions |
| ASSET-008 | riksdag-regering-mcp Server | Integration | PUBLIC/HIGH/HIGH | HIGH | CEO | Render.com |
| ASSET-009 | Domain Name (riksdagsmonitor.com) | Infrastructure | PUBLIC/HIGH/CRITICAL | CRITICAL | CEO | Route 53 |
| ASSET-010 | Brand & Reputation | Intangible | PUBLIC/HIGH/MEDIUM | HIGH | CEO | N/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 Boundary | Crossing Point | STRIDE Threats | Key Controls |
|---|---|---|---|
| TB-1: Internet โ CloudFront | User HTTPS requests | S: Domain spoofing, T: MITM, D: DDoS | TLS 1.3, HSTS, AWS Shield, Domain monitoring |
| TB-2: Internet โ GitHub Pages | DR failover requests | S: Phishing sites, T: Content injection, D: GitHub outage | HTTPS, Branch protection, GitHub SLA |
| TB-3: CloudFront โ S3 | Internal AWS communication | I: Unauthorized access, E: IAM escalation | OIDC, Least privilege IAM, S3 bucket policy |
| TB-4: GitHub Actions โ AWS | OIDC deployment | I: Secret exposure, E: Privilege escalation | OIDC (no long-lived keys), CloudTrail monitoring |
| TB-5: GitHub Actions โ Claude API | AI content generation | T: Prompt injection, I: Hallucination, R: Non-determinism | Input sanitization, output validation, PR review |
| TB-6: GitHub Actions โ MCP | Political data queries | S: Server impersonation, T: Data manipulation, I: Stale data | HTTPS-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 failure | HTTPS / 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 context | 39 templates in analysis/templates/*.md, 18 methodologies in analysis/methodologies/*.md, and prompt modules under .github/prompts/ shape AI political-intelligence output | T: template or methodology poisoning; R: unaudited prompt changes; I: biased instructions embedded in trusted control plane | Git 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 artifacts | Claude 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 trail | Analysis 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 PR | Validated artifacts are rendered into article content and submitted via safe-output PR path | T: malicious HTML/Markdown payload; I: prompt-injection residue; E: tool-call exfiltration attempt during generation | rehype-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 loading | T: Supply chain attack, I: XSS injection | SRI 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 Category | Threat | Likelihood | Impact | Risk Score | Mitigation |
|---|---|---|---|---|---|
| Spoofing | User impersonates legitimate Swedish citizen (N/A - no auth) | N/A | N/A | N/A | No authentication required (public site) |
| Repudiation | User denies viewing content (N/A - read-only) | N/A | N/A | N/A | No user actions logged (privacy-by-design) |
| STRIDE Category | Threat | Likelihood | Impact | Risk Score | Mitigation | Residual Risk |
|---|---|---|---|---|---|---|
| Spoofing | Attacker impersonates GitHub Actions workflow | LOW (2) | HIGH (8) | 1.6 | OIDC authentication, workflow approvals, audit logs | LOW |
| Tampering | Malicious workflow modification | LOW (2) | CRITICAL (10) | 2.0 | Branch protection, required reviews, GPG signing | LOW |
| Repudiation | Workflow execution denial | VERY LOW (1) | LOW (3) | 0.3 | GitHub audit logs (immutable), CloudTrail | VERY LOW |
| Info Disclosure | Secrets leaked in workflow logs | LOW (2) | HIGH (8) | 1.6 | Secret scanning, masked secrets, OIDC (no long-lived keys) | LOW |
| DoS | Workflow quota exhaustion | MEDIUM (3) | MEDIUM (5) | 1.5 | GitHub quota monitoring, rate limiting, graceful degradation | LOW |
| Elevation of Privilege | Workflow gains excessive permissions | LOW (2) | HIGH (8) | 1.6 | Least privilege IAM, scoped tokens, permission reviews | LOW |
| STRIDE Category | Threat | Likelihood | Impact | Risk Score | Mitigation | Residual Risk |
|---|---|---|---|---|---|---|
| Spoofing | Fake MCP server returns fabricated data | LOW (2) | CRITICAL (10) | 2.0 | HTTPS-only, server health monitoring, cross-verification | LOW |
| Tampering | Prompt injection manipulates AI output | MEDIUM (3) | HIGH (8) | 2.4 | Input sanitization, output validation, PR review | MEDIUM |
| Repudiation | AI-generated content attribution unclear | VERY LOW (1) | MEDIUM (5) | 0.5 | EU AI Act disclosure, workflow logs, attribution metadata | VERY LOW |
| Info Disclosure | Hallucinated parliamentary data published | MEDIUM (3) | CRITICAL (10) | 3.0 | Document ID validation, fact-checking, reviewer training | MEDIUM |
| DoS | API rate limiting blocks content generation | MEDIUM (3) | MEDIUM (5) | 1.5 | Graceful degradation, manual fallback, quota monitoring | LOW |
| Elevation of Privilege | Jailbreak bypasses AI safety guardrails | LOW (2) | HIGH (8) | 1.6 | Anthropic built-in guardrails, output validation, PR review | LOW |
| STRIDE Category | Threat | Likelihood | Impact | Risk Score | Mitigation | Residual Risk |
|---|---|---|---|---|---|---|
| Tampering | Unauthorized S3 object modification | VERY LOW (1) | HIGH (8) | 0.8 | IAM least privilege, S3 versioning, bucket policy, MFA delete | VERY LOW |
| Repudiation | S3 access denial | VERY LOW (1) | LOW (3) | 0.3 | S3 access logs, CloudTrail, versioning history | VERY LOW |
| Info Disclosure | Unauthorized S3 bucket access | VERY LOW (1) | MEDIUM (5) | 0.5 | S3 bucket policy (deny public except CloudFront), IAM roles | VERY LOW |
| DoS | S3 bucket deletion | VERY LOW (1) | HIGH (8) | 0.8 | MFA delete, cross-region replication, GitHub Pages DR | VERY LOW |
| STRIDE Category | Threat | Likelihood | Impact | Risk Score | Mitigation | Residual Risk |
|---|---|---|---|---|---|---|
| Tampering | Repository history rewriting | VERY LOW (1) | HIGH (8) | 0.8 | Branch protection, GPG signed commits, immutable git history | VERY LOW |
| Repudiation | Commit authorship spoofing | VERY LOW (1) | MEDIUM (5) | 0.5 | GPG commit signing (verified commits), GitHub audit logs | VERY LOW |
| Info Disclosure | Secret committed to repository | LOW (2) | CRITICAL (10) | 2.0 | Secret scanning (GitHub), pre-commit hooks, .gitignore | LOW |
| DoS | Repository unavailable | VERY LOW (1) | MEDIUM (5) | 0.5 | GitHub SLA, local clones, multiple contributors | VERY LOW |
| STRIDE Category | Threat | Likelihood | Impact | Risk Score | Mitigation | Residual Risk |
|---|---|---|---|---|---|---|
| Tampering | Man-in-the-Middle attack | VERY LOW (1) | HIGH (8) | 0.8 | TLS 1.3, HSTS preload, Certificate Transparency | VERY LOW |
| Info Disclosure | Traffic sniffing | VERY LOW (1) | LOW (3) | 0.3 | TLS 1.3 encryption, HSTS | VERY LOW |
| DoS | DDoS attack on CloudFront | LOW (2) | MEDIUM (5) | 1.0 | AWS Shield Standard, CloudFront global distribution, GitHub Pages DR | LOW |
| STRIDE Category | Threat | Likelihood | Impact | Risk Score | Mitigation | Residual Risk |
|---|---|---|---|---|---|---|
| Tampering | Response manipulation (MITM) | LOW (2) | CRITICAL (10) | 2.0 | HTTPS-only, TLS certificate validation | LOW |
| Info Disclosure | Stale/incorrect political data | MEDIUM (3) | HIGH (8) | 2.4 | Freshness validation (<48h), cross-verification | MEDIUM |
| DoS | MCP server unavailable | LOW (2) | MEDIUM (5) | 1.0 | Health checks, failsafe mode (skip generation), manual fallback | LOW |
scripts/aggregate-analysis.ts + scripts/render-articles.ts)| STRIDE Category | Threat | Likelihood | Impact | Risk Score | Mitigation | Residual Risk |
|---|---|---|---|---|---|---|
| Tampering | Aggregated markdown silently diverges from source artifacts (drift, dropped sections, reordered evidence) | MEDIUM (3) | HIGH (7) | 2.1 | Aggregator 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 stale | LOW |
| Info Disclosure | AI prompt-injection content in analysis artifacts surfaces into HTML (hidden <script>, onclick= handlers, javascript: URIs) | MEDIUM (3) | CRITICAL (9) | 2.7 | rehype-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 execution | LOW |
| Repudiation | Article makes unattributed claims that cannot be traced back to source artifacts | MEDIUM (3) | HIGH (7) | 2.1 | Aggregator 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 chain | LOW |
| Element Type | Total Threats | Critical Risk (8.0+) | High Risk (4.0-7.9) | Medium Risk (2.0-3.9) | Low Risk (<2.0) |
|---|---|---|---|---|---|
| External Entities | 0 | 0 | 0 | 0 | 0 |
| Processes | 12 | 0 | 0 | 4 | 8 |
| Data Stores | 8 | 0 | 0 | 1 | 7 |
| Data Flows | 6 | 0 | 0 | 2 | 4 |
| TOTAL | 26 | 0 | 0 | 7 | 19 |
Highest Risk Elements:
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.
| Tactic | Techniques Mapped | Riksdagsmonitor Relevance | Priority |
|---|---|---|---|
| Initial Access (TA0001) | 4 techniques | Primary attack vector for web infrastructure | HIGH |
| Execution (TA0002) | 3 techniques | XSS, malicious JavaScript, CI/CD exploitation | HIGH |
| Persistence (TA0003) | 2 techniques | Repository backdoors, GitHub account compromise | MEDIUM |
| Defense Evasion (TA0005) | 3 techniques | Obfuscated JavaScript, commit history manipulation | MEDIUM |
| Credential Access (TA0006) | 2 techniques | GitHub secrets, AWS credentials | HIGH |
| Discovery (TA0007) | 2 techniques | Infrastructure reconnaissance | LOW |
| Collection (TA0009) | 1 technique | Source code exfiltration | LOW |
| Command and Control (TA0011) | 1 technique | Malicious CDN compromise | LOW |
| Impact (TA0040) | 5 techniques | Website defacement, data manipulation, DoS | CRITICAL |
| Technique ID | Technique Name | Sub-Technique | System Component | Attack Scenario | Detection | Mitigation | Likelihood |
|---|---|---|---|---|---|---|---|
| T1566.002 | Phishing: Spearphishing Link | Spearphishing Link | GitHub Account | Attacker phishes contributor to steal GitHub credentials | MFA alerts, suspicious login detection | MFA enforcement, security training | LOW |
| T1190 | Exploit Public-Facing Application | N/A | GitHub Pages, CloudFront | Exploit vulnerability in CDN or GitHub infrastructure | Vendor security advisories | AWS/GitHub security patching (vendor responsibility) | VERY LOW |
| T1078.004 | Valid Accounts: Cloud Accounts | Cloud Accounts | AWS, GitHub | Compromised GitHub account with write access | GitHub audit logs, AWS CloudTrail | MFA, OIDC (no long-lived keys), least privilege | LOW |
| T1195.002 | Supply Chain Compromise: Software Supply Chain | Compromise Software Supply Chain | Chart.js/D3.js CDN | Compromised jsDelivr serves malicious Chart.js | SRI hash validation failure | SRI hashes, manual CDN version review | LOW |
| Technique ID | Technique Name | Sub-Technique | System Component | Attack Scenario | Detection | Mitigation | Likelihood |
|---|---|---|---|---|---|---|---|
| T1059.007 | Command and Scripting Interpreter: JavaScript | JavaScript | Dashboard (Chart.js/D3.js) | XSS injection in dashboard code | CSP violation reports, browser console errors | CSP headers, input sanitization, SRI | LOW |
| T1106 | Native API | N/A | GitHub Actions | Malicious workflow uses GitHub API | Workflow approval logs, API rate limiting | Required workflow approvals, least privilege tokens | LOW |
| T1203 | Exploitation for Client Execution | N/A | Browser (end user) | Exploit browser vulnerability via malicious JavaScript | Browser vendor patches | CSP, SRI, trusted CDN, regular browser updates (user responsibility) | VERY LOW |
| Technique ID | Technique Name | Sub-Technique | System Component | Attack Scenario | Detection | Mitigation | Likelihood |
|---|---|---|---|---|---|---|---|
| T1098.001 | Account Manipulation: Additional Cloud Credentials | Cloud Credentials | GitHub, AWS | Attacker adds SSH key to compromised GitHub account | GitHub audit logs, SSH key addition alerts | MFA, SSH key reviews, GPG signing | LOW |
| T1505.003 | Server Software Component: Web Shell | Web Shell | S3 Bucket (impossible for static content) | N/A - Static website, no server-side execution | N/A | Architecture (static-only, no server-side code) | N/A |
| Technique ID | Technique Name | Sub-Technique | System Component | Attack Scenario | Detection | Mitigation | Likelihood |
|---|---|---|---|---|---|---|---|
| T1027 | Obfuscated Files or Information | N/A | Dashboard JavaScript | Obfuscated malicious JavaScript bypasses code review | Code review, minification analysis | Mandatory code review, linting (ESLint), CodeQL | LOW |
| T1070.004 | Indicator Removal: File Deletion | File Deletion | Git Repository | Attacker deletes commit history to hide backdoor | Git immutable history, audit logs | Branch protection, Git history immutability | VERY LOW |
| T1562.001 | Impair Defenses: Disable or Modify Tools | Disable Security Tools | GitHub Actions | Disable secret scanning or CodeQL in workflow | Workflow file changes (PR review) | Branch protection, required reviews, CODEOWNERS | LOW |
| Technique ID | Technique Name | Sub-Technique | System Component | Attack Scenario | Detection | Mitigation | Likelihood |
|---|---|---|---|---|---|---|---|
| T1552.001 | Unsecured Credentials: Credentials In Files | Credentials In Files | Git Repository | AWS credentials committed to repository history | GitHub secret scanning | Secret scanning, pre-commit hooks, .gitignore | LOW |
| T1552.004 | Unsecured Credentials: Private Keys | Private Keys | Developer Workstation | SSH private key stolen from developer machine | N/A (endpoint security out of scope) | SSH key passphrases, endpoint protection (user responsibility) | LOW |
| Technique ID | Technique Name | Sub-Technique | System Component | Attack Scenario | Detection | Mitigation | Likelihood |
|---|---|---|---|---|---|---|---|
| T1083 | File and Directory Discovery | N/A | GitHub Repository | Attacker explores public repository structure | N/A (public repository) | Accept risk (open source by design) | N/A |
| T1580 | Cloud Infrastructure Discovery | N/A | AWS Infrastructure | Attacker enumerates S3 buckets, CloudFront distributions | AWS CloudTrail | S3 bucket policy (block public listing), IAM least privilege | LOW |
| Technique ID | Technique Name | Sub-Technique | System Component | Attack Scenario | Detection | Mitigation | Likelihood |
|---|---|---|---|---|---|---|---|
| T1213 | Data from Information Repositories | N/A | GitHub Repository | Attacker clones public repository | N/A (public repository) | Accept risk (open source by design) | N/A |
| Technique ID | Technique Name | Sub-Technique | System Component | Attack Scenario | Detection | Mitigation | Likelihood |
|---|---|---|---|---|---|---|---|
| T1071.001 | Application Layer Protocol: Web Protocols | Web Protocols | Compromised Dashboard | XSS establishes C2 via HTTPS | Network monitoring, CSP violation reports | CSP, SRI, input sanitization | VERY LOW |
| Technique ID | Technique Name | Sub-Technique | System Component | Attack Scenario | Detection | Mitigation | Likelihood |
|---|---|---|---|---|---|---|---|
| T1485 | Data Destruction | N/A | S3 Bucket, Git Repository | Attacker deletes political data | S3 versioning, Git history | S3 versioning, MFA delete, cross-region replication, Git immutability | VERY LOW |
| T1491.001 | Defacement: Internal Defacement | Internal Defacement | Repository Content | Malicious commit defaces website | Code review, PR approval | Branch protection, required reviews, GPG signing | LOW |
| T1498 | Network Denial of Service | N/A | CloudFront, GitHub Pages | DDoS attack on CDN | AWS Shield alerts, CloudWatch alarms | AWS Shield Standard, GitHub Pages DR, multi-region | LOW |
| T1499.004 | Endpoint Denial of Service: Application or System Exploitation | Client-Side DoS | Dashboard JavaScript | Malicious data crashes Chart.js rendering | Browser crash reports, user reports | Dashboard error handling, data validation | LOW |
| T1565.002 | Data Manipulation: Transmitted Data Manipulation | Transmitted Data | MCP Server โ AI Workflow | MITM modifies political data in transit | TLS validation | HTTPS-only, certificate validation, freshness checks | LOW |
| Metric | Value | Analysis |
|---|---|---|
| Total Tactics Covered | 9 / 14 | 64% coverage (appropriate for frontend-only architecture) |
| Total Techniques Mapped | 23 | Comprehensive for static website + AI workflows |
| HIGH Priority Techniques | 7 | Focus on Initial Access, Execution, Credential Access, Impact |
| Vendor-Dependent Mitigations | 5 | AWS, GitHub, Anthropic security responsibilities |
| Architecture-Based Mitigations | 8 | Static-only design eliminates server-side attacks |
| Detection Category | Techniques Detected | Detection Method | Implementation Status |
|---|---|---|---|
| GitHub Audit Logs | T1078.004, T1098.001, T1070.004 | Real-time alerting on suspicious account activity | โ Implemented |
| AWS CloudTrail | T1580, T1098.001 | Infrastructure change monitoring | โ Implemented |
| Secret Scanning | T1552.001 | Automated credential detection in commits | โ Implemented |
| CSP Violation Reports | T1059.007, T1071.001 | Browser-based security policy enforcement | โ Implemented |
| SRI Hash Validation | T1195.002 | CDN integrity verification | โ Implemented |
| Workflow Approval Logs | T1106, T1562.001 | CI/CD security gate logging | โ Implemented |
| AWS Shield Metrics | T1498 | DDoS 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 Tactic | Techniques in Scope | Detected | Mitigated | Coverage % | Detection Gap |
|---|---|---|---|---|---|
| TA0001 Initial Access | T1189, T1195.002, T1078.004 | โ 3/3 | โ 3/3 | 100% | None โ SRI, OIDC, MFA cover all paths |
| TA0002 Execution | T1059.007, T1106 | โ 2/2 | โ 2/2 | 100% | None โ CSP + static architecture eliminate JS execution paths |
| TA0003 Persistence | T1176, T1098.001 | โ 2/2 | โ 2/2 | 100% | None โ branch protection prevents unauthorized persistence |
| TA0004 Privilege Escalation | T1611 | โ 1/1 | โ 1/1 | 100% | None โ OIDC short-lived tokens, no persistent elevated access |
| TA0005 Defense Evasion | T1070.004, T1562.001 | โ 2/2 | โ 2/2 | 100% | None โ GitHub immutable audit logs prevent log tampering |
| TA0006 Credential Access | T1552.001, T1606.002 | โ 2/2 | โ 2/2 | 100% | None โ secret scanning + OIDC (no long-lived secrets) |
| TA0007 Discovery | T1580 | โ 1/1 | โ 1/1 | 100% | None โ CloudTrail monitors all discovery activity |
| TA0010 Exfiltration | T1048, T1567 | โ ๏ธ 1/2 | โ 2/2 | 50% | GAP: No automated detection for slow data exfiltration via CDN |
| TA0040 Impact | T1498, T1485, T1491.002, T1659 | โ ๏ธ 3/4 | โ 4/4 | 75% | GAP: T1659 (Content Injection) detection relies on manual PR review |
| TA0011 C&C | T1071.001, T1071.004 | โ ๏ธ 1/2 | โ 2/2 | 50% | GAP: No network-level C&C detection (static hosting, vendor-dependent) |
| TA0008 Lateral Movement | N/A (no server-side) | N/A | โ Eliminated | 100% | None โ static architecture eliminates lateral movement entirely |
| TA0009 Collection | N/A (no private data) | N/A | โ Eliminated | 100% | None โ no private user data to collect |
| TA0043 Reconnaissance | N/A (public repo) | N/A | โ ๏ธ Accepted | N/A | Accepted 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 ID | Technique | Tactic | Gap Description | Remediation | Target Date |
|---|---|---|---|---|---|
| ATT-GAP-001 | T1659 (Content Injection) | TA0040 Impact | AI-generated content injection detected only at manual PR review โ no automated semantic validation | Implement automated dok_id API verification against riksdag-regering-mcp | Q1 2026 |
| ATT-GAP-002 | T1048 (Exfil over C2) | TA0010 Exfiltration | No automated detection for slow exfiltration via CDN abuse or covert channel through publicly-visible content | Add CDN anomaly alerting via CloudFront access log analysis | Q2 2026 |
| ATT-GAP-003 | T1071.004 (DNS as C2) | TA0011 C&C | Static site cannot inspect DNS traffic; vendor-dependent (AWS Route 53 monitoring) | Enhance Route 53 DNS query logging and alerting; enable Route 53 Resolver Query Logs | Q2 2026 |
Per Hack23 Threat Modeling Policy ยง 4.1.4, mapping defensive controls to each Cyber Kill Chain phase for Riksdagsmonitor:
| Kill Chain Phase | Attacker Activity (Riksdagsmonitor Context) | Defensive Control | Detection Mechanism | Disruption Effectiveness |
|---|---|---|---|---|
| 1. Reconnaissance | Scan public GitHub repo for secrets, enumerate AWS infrastructure, identify AI workflow schedules | Public repo accepted risk; minimal metadata exposure via .gitignore, S3 bucket policy, no directory listing | Repository traffic anomaly (GitHub Insights), Route 53 query logs | โ ๏ธ 60% โ Public repo limits concealment |
| 2. Weaponization | Craft malicious npm package, prepare XSS payload, develop AI prompt injection | N/A โ occurs off-target; no direct defense | Threat intelligence feeds (ENISA, CERT-SE, MITRE ATT&CK updates) | โ ๏ธ 30% โ Attacker-side activity |
| 3. Delivery | Submit malicious PR, phishing for GitHub credentials, CDN asset substitution | Branch 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. Exploitation | Execute XSS via CDN compromise, exploit vulnerable dependency, AI prompt injection | CSP (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. Installation | Persist via modified GitHub Actions workflow, inject into build pipeline | Workflow approval (PREV-016), CODEOWNERS (PREV-004), Git immutable history | Workflow execution logs (DET-009), GitHub audit logs (DET-001) | โ 90% โ No server-side persistence possible |
| 6. Command & Control | Covert C2 via DNS tunneling, CDN abuse for data exfiltration | Static architecture eliminates server-side C2; Route 53 monitoring | CloudTrail (DET-002), Route 53 DNS query logs | โ ๏ธ 70% โ Limited by static-site architecture (vendor-dependent) |
| 7. Actions on Objectives | Deface website, inject disinformation, manipulate political data, DDoS during elections | S3 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:
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:
| Tree | Attack Goal | Overall Probability | Residual Risk | Key Mitigation |
|---|---|---|---|---|
| AT-1 | Website Defacement | ~2.3% | LOW | MFA + Branch Protection + PR Review |
| AT-2 | Election Misinformation | ~1.4% | MEDIUM | PR Review + dok_id validation (automation gap) |
| AT-3 | CDN Supply Chain JS Injection | ~0.1% | LOW | SRI 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
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
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
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 Type | Capability Level | Motivation | Resources | Riksdagsmonitor Targeting Likelihood | Primary Threat Scenarios |
|---|---|---|---|---|---|
| ๐ด Nation-State APT | ADVANCED | Political influence, espionage, disinformation | High (state budget) | MEDIUM - Swedish political transparency makes valuable target for foreign influence operations | AI hallucination manipulation, MCP server compromise, translation integrity attacks |
| ๐ฐ Cybercriminal | INTERMEDIATE-ADVANCED | Financial gain, ransomware, cryptojacking | Medium (organized crime) | LOW - No financial data, no user accounts, limited monetization opportunity | Supply chain attacks (CDN compromise), cryptomining via XSS, GitHub account sale |
| ๐ข Hacktivist | BEGINNER-INTERMEDIATE | Political statement, publicity, protest | Low-Medium (crowdfunded) | HIGH - Political platform makes attractive target for ideological groups | Website defacement, DDoS attacks, domain squatting, social media impersonation |
| ๐ค Malicious Insider | INTERMEDIATE | Revenge, sabotage, ideology | Low (individual contributor) | VERY LOW - Small contributor base, strong vetting | Backdoor injection, subtle data manipulation, IP theft |
| ๐งโ๐ป Script Kiddie | BEGINNER | Learning, curiosity, bragging rights | Very Low (public tools) | LOW - Limited attack surface for automated tools | Basic DDoS (botnets), public exploit attempts, GitHub spam |
| ๐ IMF Upstream / Transport Adversary | BEGINNER-INTERMEDIATE | Data distortion, vintage-drift injection, rate-limit disruption | Low (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 scenarios | DNS 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:
Motivation Analysis:
Opportunity Assessment:
Relevant MITRE ATT&CK Tactics:
Mitigation Priority: CRITICAL - Enhanced monitoring for AI hallucination patterns, cross-language consistency validation (Q2 2026), MCP server integrity checks.
Capability Assessment:
Motivation Analysis:
Opportunity Assessment:
Relevant MITRE ATT&CK Tactics:
Mitigation Priority: MEDIUM - SRI hashes (already implemented), CSP restrictions, Dependabot scanning, CodeQL analysis.
Capability Assessment:
Motivation Analysis:
Opportunity Assessment:
Relevant MITRE ATT&CK Tactics:
Mitigation Priority: HIGH - MFA enforcement, branch protection, AWS Shield, GitHub Pages DR, rapid rollback procedures.
Capability Assessment:
Motivation Analysis:
Opportunity Assessment:
Relevant MITRE ATT&CK Tactics:
Mitigation Priority: MEDIUM - CODEOWNERS approval, CodeQL scanning, mandatory GPG signing, contributor background awareness, access reviews.
Capability Assessment:
Motivation Analysis:
Opportunity Assessment:
Relevant MITRE ATT&CK Tactics:
Mitigation Priority: LOW - Existing controls (Dependabot, AWS Shield, GitHub rate limiting) provide adequate protection. No additional mitigations required.
| Threat Agent | Targeting Likelihood | Capability | Motivation Strength | Risk Score | Mitigation Priority |
|---|---|---|---|---|---|
| Nation-State APT | MEDIUM (3/5) | ADVANCED (5/5) | HIGH (4/5) | 7.2/10 | CRITICAL |
| Cybercriminal | LOW (2/5) | INTERMEDIATE (3/5) | MEDIUM (3/5) | 4.0/10 | MEDIUM |
| Hacktivist | HIGH (4/5) | BEGINNER (2/5) | HIGH (4/5) | 6.4/10 | HIGH |
| Malicious Insider | VERY LOW (1/5) | INTERMEDIATE (3/5) | MEDIUM (3/5) | 3.0/10 | MEDIUM |
| Script Kiddie | LOW (2/5) | BEGINNER (1/5) | LOW (2/5) | 2.0/10 | LOW |
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 Category | Count | Implementation Status | Average Effectiveness | Business Value |
|---|---|---|---|---|
| Preventive Controls | 28 | โ 96% Implemented | 92% Risk Reduction | $120,000/year cost avoidance |
| Detective Controls | 12 | โ 100% Implemented | 88% Detection Rate | $40,000/year cost avoidance |
| Corrective Controls | 8 | โ 100% Implemented | 95% Recovery Success | $20,000/year cost avoidance |
| TOTAL | 48 | โ 98% Implemented | 91.7% Overall | $180,000/year |
| Control ID | Control Name | STRIDE Category | Threat Mitigated | Implementation | Effectiveness | Annual Cost Avoidance |
|---|---|---|---|---|---|---|
| PREV-001 | GitHub MFA Enforcement | Spoofing | Account compromise | โ Org-level policy | 90% | $15,000 |
| PREV-002 | Branch Protection Rules | Tampering | Malicious commits | โ main/master branches | 95% | $25,000 |
| PREV-003 | GPG Commit Signing | Repudiation, Spoofing | Commit authorship | โ Required for maintainers | 85% | $10,000 |
| PREV-004 | CODEOWNERS File | Elevation of Privilege | Unauthorized changes | โ Security team approval | 90% | $15,000 |
| PREV-005 | Secret Scanning | Information Disclosure | Credential leaks | โ GitHub Advanced Security | 95% | $20,000 |
| PREV-006 | OIDC Authentication | Information Disclosure | Long-lived credentials | โ AWS OIDC provider | 99% | $30,000 |
| PREV-007 | IAM Least Privilege | Elevation of Privilege | Permission escalation | โ Scoped policies | 92% | $18,000 |
| PREV-008 | S3 Bucket Policy | Tampering | Unauthorized access | โ CloudFront-only access | 98% | $22,000 |
| PREV-009 | TLS 1.3 Enforcement | Tampering | MITM attacks | โ CloudFront + GitHub Pages | 99% | $25,000 |
| PREV-010 | HSTS Preload | Tampering | Protocol downgrade | โ Preload list registered | 95% | $15,000 |
| PREV-011 | Content Security Policy | Tampering, Information Disclosure | XSS injection | โ Restrictive CSP | 95% | $20,000 |
| PREV-012 | Subresource Integrity | Tampering | Supply chain attacks | โ SRI hashes for Chart.js/D3.js | 99.9% | $40,000 |
| PREV-013 | Dependabot Scanning | Tampering | Vulnerable dependencies | โ Automated PR reviews | 85% | $12,000 |
| PREV-014 | CodeQL Analysis | Tampering, Elevation of Privilege | Code vulnerabilities | โ GitHub Advanced Security | 88% | $18,000 |
| PREV-015 | SHA-Pinned Actions | Tampering | CI/CD supply chain | โ All workflows | 90% | $15,000 |
| PREV-016 | Workflow Approval | Elevation of Privilege | Malicious workflows | โ Required for new workflows | 92% | $16,000 |
| PREV-017 | Pre-Commit Hooks | Information Disclosure | Secret commits (local) | โ ๏ธ Developer setup required | 70% | $8,000 |
| PREV-018 | .gitignore Configuration | Information Disclosure | Sensitive file commits | โ Comprehensive rules | 80% | $10,000 |
| PREV-019 | S3 Versioning | Tampering, DoS | Data deletion/modification | โ Enabled on all buckets | 95% | $20,000 |
| PREV-020 | Cross-Region Replication | DoS | Regional failure | โ us-east-1 โ eu-west-1 | 98% | $25,000 |
| PREV-021 | AWS Shield Standard | DoS | DDoS attacks | โ AWS managed | 90% | $30,000 |
| PREV-022 | Route 53 Health Checks | DoS | CloudFront failure | โ Auto-failover to GitHub Pages | 95% | $22,000 |
| PREV-023 | Input Sanitization (AI) | Tampering | Prompt injection | โ ๏ธ Partial - Q1 2026 enhancement | 75% | $12,000 |
| PREV-024 | Document ID Validation (AI) | Information Disclosure | Hallucination | โ ๏ธ Manual - Q1 2026 automation | 85% | $20,000 |
| PREV-025 | MCP HTTPS-Only | Tampering | MITM on political data | โ Certificate validation | 95% | $15,000 |
| PREV-026 | Freshness Validation (MCP) | Information Disclosure | Stale data | โ 48h threshold | 90% | $12,000 |
| PREV-027 | Translation Markers | Tampering | Translation integrity | โ data-translate attributes | 95% | $18,000 |
| PREV-028 | Mandatory PR Review (AI) | Information Disclosure | AI hallucination publication | โ Human fact-checking | 95% | $40,000 |
Preventive Control Gap Analysis:
| Control ID | Control Name | Threat Category | Detection Target | Implementation | Detection Rate | MTTD (Mean Time to Detect) |
|---|---|---|---|---|---|---|
| DET-001 | GitHub Audit Logs | Spoofing, Elevation of Privilege | Account activity | โ Org-level monitoring | 95% | 5 minutes |
| DET-002 | AWS CloudTrail | Tampering, Elevation of Privilege | Infrastructure changes | โ All regions | 98% | 2 minutes |
| DET-003 | S3 Access Logs | Tampering | Unauthorized bucket access | โ All buckets | 90% | 15 minutes |
| DET-004 | CloudWatch Alarms | DoS | Anomalous traffic | โ AWS managed | 92% | 5 minutes |
| DET-005 | CSP Violation Reports | Tampering | XSS attempts | โ Report-URI configured | 88% | Real-time |
| DET-006 | SRI Validation Failures | Tampering | CDN integrity breach | โ Browser-based | 99.9% | Real-time |
| DET-007 | Dependabot Alerts | Tampering | Vulnerable dependencies | โ Automated PR creation | 90% | 24 hours |
| DET-008 | CodeQL Findings | Tampering, Elevation of Privilege | Code vulnerabilities | โ PR checks | 85% | PR creation time |
| DET-009 | Workflow Execution Logs | Elevation of Privilege | CI/CD anomalies | โ GitHub Actions | 80% | Post-execution |
| DET-010 | AWS Shield Metrics | DoS | DDoS attacks | โ AWS managed | 95% | 2-5 minutes |
| DET-011 | MCP Server Health Checks | DoS | Service unavailability | โ Workflow-based | 85% | 5 minutes |
| DET-012 | PR Review Rejection Rate | Information Disclosure | AI hallucination attempts | โ Manual tracking | 95% | Human review time |
Detective Control Performance:
| Control ID | Control Name | Threat Category | Recovery Objective | Implementation | Recovery Success Rate | MTTR (Mean Time to Recover) |
|---|---|---|---|---|---|---|
| CORR-001 | Git Revert/Rollback | Tampering | Malicious commit removal | โ Git history immutability | 100% | 5-15 minutes |
| CORR-002 | S3 Object Versioning Restore | Tampering | Object deletion recovery | โ Version history | 98% | 10-30 minutes |
| CORR-003 | GitHub Pages DR Failover | DoS | CloudFront unavailability | โ Automatic via Route 53 | 95% | 2-5 minutes (automatic) |
| CORR-004 | Access Revocation | Spoofing, Elevation of Privilege | Compromised account lockout | โ GitHub admin panel | 100% | 2-5 minutes |
| CORR-005 | Secret Rotation | Information Disclosure | Exposed credentials | โ OIDC (no rotation needed) + AWS IAM | 95% | 15-30 minutes |
| CORR-006 | Incident Response Plan | All categories | Coordinated response | โ Documented procedures | 90% | Varies by incident |
| CORR-007 | Backup Restoration | DoS | Complete data loss | โ Cross-region + GitHub | 98% | 1-4 hours |
| CORR-008 | AI Content Correction | Information Disclosure | Published hallucination | โ PR-based workflow | 98% | 2-7 days (with public statement) |
Corrective Control Performance:
| STRIDE Category | Preventive Controls | Detective Controls | Corrective Controls | Combined Effectiveness | Residual Risk |
|---|---|---|---|---|---|
| Spoofing | 4 controls, 88% avg | 2 controls, 95% avg | 1 control, 100% | 94.3% | LOW (0.57) |
| Tampering | 14 controls, 92% avg | 5 controls, 91% avg | 4 controls, 99% | 94.0% | LOW (0.60) |
| Repudiation | 1 control, 85% | 1 control, 95% | 0 controls | 90.0% | LOW (1.00) |
| Information Disclosure | 7 controls, 88% avg | 2 controls, 93% avg | 2 controls, 97% | 92.7% | LOW (0.73) |
| Denial of Service | 4 controls, 94% avg | 3 controls, 91% avg | 3 controls, 97% | 94.0% | LOW (0.60) |
| Elevation of Privilege | 4 controls, 91% avg | 4 controls, 87% avg | 1 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 Category | Example Threat | Primary Control | Secondary Control | Monitoring |
|---|---|---|---|---|
| ๐ญ Spoofing | Account compromise, commit forgery | GitHub MFA enforcement (PREV-001), OIDC auth (PREV-006) | GPG commit signing (PREV-003), CODEOWNERS (PREV-004) | GitHub audit logs (DET-001), failed login monitoring |
| ๐ง Tampering | Malicious commits, CDN supply chain, data manipulation | Branch 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) |
| โ Repudiation | Commit authorship denial, action denial | GPG signing (PREV-003), immutable Git history | N/A | GitHub audit logs (DET-001), structured logging, Audit trail analysis, commit verification |
| ๐ค Information Disclosure | Secret leaks, AI hallucination, S3 exposure | Secret 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 Service | DDoS, CloudFront outage, pipeline exhaustion | AWS 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 Privilege | Workflow escalation, IAM policy bypass | CODEOWNERS (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 Control | Riksdagsmonitor Implementation | Control IDs | Status |
|---|---|---|---|
| A.5.7: Threat Intelligence | ENISA Threat Landscape 2024, MITRE ATT&CK monitoring | ISMS monitoring | โ Compliant |
| A.5.12: Classification of Information | CIA triad classification (PUBLIC/HIGH/HIGH) | Asset inventory | โ Compliant |
| A.5.24: Information Security Risk Assessment | This threat model (STRIDE + MITRE ATT&CK) | All sections | โ Compliant |
| A.8.9: Configuration Management | Branch protection, CODEOWNERS, Git history | PREV-002, PREV-003, PREV-004 | โ Compliant |
| A.8.16: Monitoring Activities | CloudWatch, CloudTrail, GitHub audit logs | DET-001-DET-012 | โ Compliant |
| A.8.23: Web Filtering | CSP headers, SRI hashes | PREV-011, PREV-012 | โ Compliant |
| A.8.28: Secure Coding | CodeQL, ESLint, code review | PREV-014, PREV-004 | โ Compliant |
| Function | Category | Riksdagsmonitor Implementation | Control IDs |
|---|---|---|---|
| IDENTIFY (ID) | Asset Management (ID.AM) | Asset inventory with classifications | Asset tables |
| IDENTIFY (ID) | Risk Assessment (ID.RA) | STRIDE + MITRE ATT&CK + Attack Trees | This document |
| PROTECT (PR) | Access Control (PR.AC) | MFA, IAM least privilege, branch protection | PREV-001, PREV-007 |
| PROTECT (PR) | Data Security (PR.DS) | TLS 1.3, HSTS, S3 encryption | PREV-009, PREV-010 |
| DETECT (DE) | Anomalies and Events (DE.AE) | CloudWatch, CloudTrail, audit logs | DET-001-DET-012 |
| DETECT (DE) | Security Continuous Monitoring (DE.CM) | Real-time CSP/SRI validation | DET-005, DET-006 |
| RESPOND (RS) | Response Planning (RS.RP) | Incident response procedures | CORR-006 |
| RECOVER (RC) | Recovery Planning (RC.RP) | Git rollback, S3 versioning, DR site | CORR-001-CORR-007 |
| CIS Control | Implementation | Control IDs | Status |
|---|---|---|---|
| 1: Inventory and Control of Enterprise Assets | Asset inventory table | Asset tables | โ Compliant |
| 4: Secure Configuration | Branch protection, CSP, HSTS | PREV-002, PREV-011, PREV-010 | โ Compliant |
| 5: Account Management | GitHub MFA, IAM least privilege | PREV-001, PREV-007 | โ Compliant |
| 10: Malware Defenses | CSP, SRI, input sanitization | PREV-011, PREV-012, PREV-023 | โ ๏ธ Partial (input sanitization) |
| 13: Network Monitoring and Defense | CloudWatch, AWS Shield | DET-004, PREV-021 | โ Compliant |
| 16: Application Software Security | CodeQL, Dependabot, code review | PREV-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:
Vulnerability: Attacker manipulates LLM via crafted inputs to override system instructions or produce unintended behavior.
Riksdagsmonitor Exposure: ๐จ MEDIUM
Attack Vectors:
Current Controls: โ Implemented
Gaps: โ ๏ธ
Risk Score: 2.8/10 (Medium Likelihood: 35%, Medium Impact: 8)
Recommendations:
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:
<script> tags in news articlesCurrent Controls: โ Implemented
<script> tags or javascript: URLs allowed)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
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:
Current Controls: โ Implemented
Gaps: โ ๏ธ
Risk Score: 2.1/10 (Medium Likelihood: 30%, Medium Impact: 7)
Recommendations:
OWASP LLM Policy Ref: Section 3.4 (LLM04 Controls)
Vulnerability: Compromised third-party components (plugins, datasets, models) introduce vulnerabilities.
Riksdagsmonitor Exposure: ๐จ MEDIUM
Attack Vectors:
Current Controls: โ Implemented
Gaps: โ ๏ธ
Risk Score: 2.4/10 (Medium Likelihood: 30%, Medium Impact: 8)
Recommendations:
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:
Current Controls: โ Implemented
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:
Current Controls: โ Implemented
Gaps: โ ๏ธ
Risk Score: 2.4/10 (Medium Likelihood: 30%, Medium Impact: 8)
Recommendations:
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:
Current Controls: โ Implemented
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:
Current Controls: โ Implemented
Gaps: โ ๏ธ
Risk Score: 3.2/10 (High Likelihood: 40%, Medium Impact: 8)
Recommendations:
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
Residual Risk: Accepted (Vendor dependency)
OWASP LLM Policy Ref: Section 3.10 (LLM10 Controls - N/A for API-based models)
| OWASP LLM Vulnerability | Riksdagsmonitor Risk | Risk Score | Controls Status | Priority |
|---|---|---|---|---|
| LLM01: Prompt Injection | ๐จ MEDIUM | 2.8/10 | โ ๏ธ Partial | HIGH |
| LLM02: Insecure Output | ๐ฉ LOW | 0.4/10 | โ Adequate | LOW |
| LLM03: Training Data Poisoning | ๐ฆ N/A | N/A | โ Vendor | N/A |
| LLM04: Model DoS | ๐จ MEDIUM | 2.1/10 | โ ๏ธ Partial | MEDIUM |
| LLM05: Supply Chain | ๐จ MEDIUM | 2.4/10 | โ ๏ธ Partial | HIGH |
| LLM06: Info Disclosure | ๐ฉ LOW | 0.8/10 | โ Adequate | LOW |
| LLM07: Insecure Plugin | ๐จ MEDIUM | 2.4/10 | โ ๏ธ Partial | MEDIUM |
| LLM08: Excessive Agency | ๐ฉ LOW | 0.5/10 | โ Adequate | LOW |
| LLM09: Overreliance | ๐ง HIGH | 3.2/10 | โ ๏ธ Partial | CRITICAL |
| LLM10: Model Theft | ๐ฆ N/A | N/A | โ Vendor | N/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.
| Attribute | Claude Opus 4.8 (analysis + EN/SV articles) | Claude Sonnet 4.6 (translation fan-out) |
|---|---|---|
| Model Name | Claude Opus 4.8 (Anthropic) | Claude Sonnet 4.6 (Anthropic) |
| Access Method | GitHub Copilot API (indirect via GitHub) | GitHub Copilot API (indirect via GitHub) |
| Model Type | Large Language Model (LLM) โ Transformer reasoning model | Large Language Model (LLM) โ Transformer architecture |
| Context Window | 200,000 tokens (~150,000 words) | 200,000 tokens (~150,000 words) |
| Training Cutoff | 2026 (vendor-managed; not relied upon โ all facts grounded via MCP) | 2026 (vendor-managed) |
| Workflows | 13 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 Supported | 14 primary languages (en, sv, da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh) + 90+ total | 14 primary languages + 90+ total |
| Deployment | Cloud 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):
โ Prohibited Uses (per Hack23 AI Policy):
Strengths:
Weaknesses (conservative posture retained regardless of model uplift):
dok_id validation and PR reviewAuthentication & Access Control:
Data Privacy:
Model Integrity:
Rate Limiting & Availability:
High-Risk Scenarios (Requires Enhanced Controls):
Fabricated Document IDs: Model invents non-existent Riksdag documents
Political Bias Amplification: Training data bias influences party representation
Cross-Language Inconsistency: Different factual claims across 14 languages
Medium-Risk Scenarios (Monitoring Required):
Vote Margin Errors: Incorrect vote count arithmetic
Government Document Misattribution: Wrong departmental attribution
Low-Risk Scenarios (Acceptable):
Stylistic Variations: Different writing styles across languages
Translation Nuances: Minor semantic differences in translations
Accuracy Metrics (Estimated - requires formal evaluation):
Human Review Impact:
Model Version Management:
engine.model pinned per workflow: claude-opus-4.8 (13 analysis/article workflows), claude-sonnet-4.6 (news-translate).lock.yml files version-control the exact engine/model selection (reviewable in PRs)Performance Monitoring:
Incident Response:
EU AI Act Classification: โ ๏ธ Limited Risk (Article 52)
ISO/IEC 42001:2023: โ Compliant
OWASP LLM Top 10: โ ๏ธ Partial (50% controls implemented)
Supplier Assessment: โ Approved
Model Lifecycle:
Security Patch Management:
๐ 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 Layer | Control | Threat Mitigated | OWASP LLM Ref |
|---|---|---|---|
| ๐๏ธ Substrate | VM/container isolation | Agent escape, lateral movement | LLM09 |
| ๐๏ธ Substrate | API Proxy mediation | Unauthorized API access | LLM06 |
| ๐๏ธ Substrate | MCP Gateway sandboxing | Tool exploitation, sandbox escape | LLM09 |
| โ๏ธ Configuration | Declarative YAML config | Configuration drift, injection | LLM01 |
| โ๏ธ Configuration | SHA-pinned Actions | Supply chain compromise | LLM05 |
| โ๏ธ Configuration | Scoped token distribution | Over-privileged execution | LLM06 |
| ๐ Plan | Workflow stage decomposition | Uncontrolled agent scope | LLM08 |
| ๐ Plan | Read-only agent execution | Unauthorized data modification | LLM06 |
| ๐ Plan | Tool allowlisting (MCP) | Unauthorized tool invocation | LLM09 |
| ๐ก๏ธ SafeOutputs | Write buffer (artifacts) | Direct unauthorized writes | LLM06 |
| ๐ก๏ธ SafeOutputs | Deterministic content filters | Malicious content injection | LLM02 |
| ๐ก๏ธ SafeOutputs | Secret leak detection | Credential exfiltration | LLM06 |
| ๐ก๏ธ SafeOutputs | Output sanitization | XSS/injection in generated content | LLM02 |
| ๐ฅ Firewall | Docker + iptables isolation | Network-based exfiltration | LLM06 |
| ๐ฅ Firewall | Domain allowlist (Squid proxy) | Data exfiltration to unauthorized endpoints | LLM06 |
| ๐ฅ Firewall | Chroot mode | Host filesystem access | LLM09 |
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:
| Control | Purpose | Tool/Scanner |
|---|---|---|
| ๐ Schema Validation | Workflow YAML structure correctness | gh aw compile |
| ๐งฎ Expression Safety | Prevent injection via ${{ }} expressions | actionlint |
| ๐ SHA Pinning | Immutable action references | zizmor |
| ๐ Secret Scanning | Pre-commit credential detection | GitHub Secret Scanning |
| ๐๏ธ Supply Chain | Dependency integrity verification | poutine |
| ๐ Size Limits | Prompt file โค550 lines enforcement | Compilation pipeline |
| Boundary | Description | Security Control |
|---|---|---|
| TB-AW-1 | Agent โ Host OS | Container isolation + chroot |
| TB-AW-2 | Agent โ Network | AWF + iptables + domain allowlist |
| TB-AW-3 | Agent โ External APIs | API Proxy + token scoping |
| TB-AW-4 | Agent โ Repository | SafeOutputs buffer (no direct writes) |
| TB-AW-5 | MCP Server โ Agent | Tool allowlisting + container isolation |
| TB-AW-6 | Agent Output โ Production | Deterministic filters + secret scanning |
| # | Threat | STRIDE | gh-aw Mitigation | Residual Risk |
|---|---|---|---|---|
| GH-AW-01 | ๐ญ Agent prompt injection via crafted issue content | Spoofing | Plan-level input sanitization, tool allowlisting | Low |
| GH-AW-02 | ๐ Token theft from agent runtime | Tampering | Scoped tokens, short-lived credentials, secret redaction | Low |
| GH-AW-03 | ๐ก Data exfiltration via agent network access | Info Disclosure | AWF domain allowlist, iptables egress control | Very Low |
| GH-AW-04 | ๐ Malicious code injection in generated PRs | Tampering | SafeOutputs filters, CodeQL scanning, human review | Low |
| GH-AW-05 | ๐ซ Agent service disruption (token exhaustion) | Denial of Service | 25M token budget, mandatory mid-run checkpoints | Low |
| GH-AW-06 | ๐ Privilege escalation via MCP tool abuse | Elevation | Tool allowlisting, MCP container sandbox | Very Low |
| GH-AW-07 | ๐ช Sandbox escape via container vulnerability | Elevation | VM isolation (substrate layer), regular patching | Very Low |
| GH-AW-08 | ๐ Supply chain attack via workflow dependencies | Tampering | SHA 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 Threat | Riksdagsmonitor Status | Rationale |
|---|---|---|
| SQL Injection | โ NOT APPLICABLE | No database, no SQL queries |
| Server-Side Code Execution | โ NOT APPLICABLE | No server-side code (PHP/Python/Java) |
| Session Hijacking | โ NOT APPLICABLE | No user sessions, no authentication |
| Insecure Deserialization | โ NOT APPLICABLE | No serialization (no user input processing) |
| Server Misconfiguration | โ NOT APPLICABLE | No web server (AWS CloudFront + S3 managed services) |
| Broken Authentication | โ NOT APPLICABLE | No user accounts |
| Sensitive Data Exposure | โ NOT APPLICABLE | All data is public by design |
| CSRF (Cross-Site Request Forgery) | โ NOT APPLICABLE | No state-changing operations |
| Security Logging Failures | โ ๏ธ REDUCED RISK | Limited 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 Category | Description | Riksdagsmonitor Specific | Priority |
|---|---|---|---|
| CDN Compromise | Malicious content served via CloudFront/GitHub Pages | Chart.js/D3.js via jsDelivr | HIGH |
| XSS (Client-Side) | JavaScript injection in dashboards | Dashboard code only attack surface | MEDIUM |
| Supply Chain (npm) | Compromised JavaScript dependencies | Vite, Chart.js, D3.js | HIGH |
| Domain Hijacking | DNS takeover, typosquatting | riksdagsmonitor.com protection | MEDIUM |
| Content Integrity | Repository tampering, malicious PRs | Git immutability, GPG signing | HIGH |
| Availability (DDoS) | Volumetric attacks on CDN | AWS Shield, multi-region | MEDIUM |
| SEO Poisoning | Manipulation of search engine rankings | Static HTML metadata control | LOW |
| Caching Poisoning | Malicious content cached in CDN | S3 versioning, CloudFront invalidation | LOW |
| Control | Purpose | Implementation | Effectiveness |
|---|---|---|---|
| Content Security Policy (CSP) | Prevent XSS, restrict script sources | script-src 'self' cdn.jsdelivr.net; object-src 'none' | 95% |
| Subresource Integrity (SRI) | Verify CDN asset integrity | SHA-384 hashes for Chart.js/D3.js | 99.9% |
| HTTPS Everywhere | Encrypt all traffic | TLS 1.3, HSTS preload, no HTTP fallback | 99% |
| Static Content Immutability | Prevent runtime manipulation | S3 versioning, Git history | 98% |
| No User Input Processing | Eliminate injection vectors | Read-only platform, no forms | 100% |
| Browser Security Features | Leverage native browser protections | X-Frame-Options, X-Content-Type-Options | 90% |
Functional Dashboards (Chart.js / D3.js, lazy-loaded ES modules):
| Threat | Attack Vector | Likelihood | Impact | Mitigation | Residual Risk |
|---|---|---|---|---|---|
| XSS via CIA Data | Malicious data in CSV causes DOM-based XSS | LOW (2) | HIGH (8) | CSP, HTML entity escaping in Chart.js configs | LOW (1.6) |
| Prototype Pollution | Malicious object injection in Chart.js options | VERY LOW (1) | MEDIUM (5) | Object.freeze() on configs, Chart.js latest version | VERY LOW (0.5) |
| DoS via Rendering | Malformed data crashes Chart.js | LOW (2) | LOW (3) | Try-catch error handling, dashboard timeouts | VERY LOW (0.6) |
| CDN Supply Chain | Compromised Chart.js/D3.js from jsDelivr | LOW (2) | HIGH (8) | SRI hashes (SHA-384), trusted CDN | LOW (1.6) |
| Memory Leak | Inefficient D3.js rendering exhausts browser memory | VERY LOW (1) | MEDIUM (5) | D3.js best practices, cleanup on unmount | VERY 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 Category | Description | Riksdagsmonitor Impact | Mitigation Strategy | gh-aw Control |
|---|---|---|---|---|
| ๐ณ๏ธ Electoral Integrity | Manipulation of voting data, false election results | HIGH - Core mission threat | Document ID validation, cross-verification | SafeOutputs content filters |
| ๐ Legislative Misinformation | Fabricated committee reports, fake parliamentary documents | HIGH - Undermines transparency | riksdag-regering-mcp verification, fact-checking | MCP tool validation |
| ๐๏ธ Institutional Distrust | Erosion of trust in Riksdag, government agencies | CRITICAL - Mission failure | Transparency commitment, public corrections | Human review gates |
| ๐ฃ๏ธ Political Narrative Manipulation | Biased AI-generated content favoring specific parties | MEDIUM - Reputational risk | Party mention tracking, bias metrics (planned Q2 2026) | SafeOutputs bias detection |
| ๐ Cross-Border Disinformation | Foreign influence operations via AI content generation | HIGH - Nation-state APT threat | AI output validation, human oversight | AWF network isolation |
| ๐ฐ Media Manipulation | False attribution to Riksdagsmonitor in media reports | MEDIUM - Brand impersonation | Clear branding, AI-generated disclosure | Output watermarking |
| ๐ Transparency Undermining | DDoS during critical political events (elections, votes) | MEDIUM - Availability threat | Multi-region CDN, DR failover | Infrastructure isolation |
| ๐ค Civil Society Trust | Loss of transparency advocate support | HIGH - Stakeholder alienation | Incident transparency, public accountability | Audit trail |
| ๐ญ Deepfake Exploitation | AI-generated fake video/audio of politicians | HIGH - Credibility attack | Source verification, provenance tracking | Content provenance headers |
| ๐ง Cognitive Manipulation | Exploiting information overload to obscure real data | MEDIUM - Democratic fatigue | Content prioritization, editorial standards | Rate limiting |
| ๐ Supply Chain Poisoning | Compromise of upstream political data sources | HIGH - Data integrity | Multi-source verification, anomaly detection | MCP container isolation |
| โก Timing Attacks | Publishing misleading content during politically sensitive moments | HIGH - Maximum impact exploitation | Election-period content freezes, heightened review | Mandatory human gates |
| Threat | Swedish Political Context | Attack Scenario | Current Controls | Gap Analysis |
|---|---|---|---|---|
| ๐ค Betรคnkande Manipulation | "Betรคnkande" (committee report) mistranslation | AI translates "betรคnkande" as "consideration" instead of "committee report" across 14 languages | TRANSLATION_GUIDE.md terminology dictionary | โ ๏ธ GAP: No automated translation validation (planned Q2 2026) |
| ๐ Riksdagsbeslut Fabrication | "Riksdagsbeslut" (parliamentary decision) fake records | AI hallucinates non-existent parliamentary decisions with plausible dok_id | Document ID validation (manual PR review) | โ ๏ธ GAP: No automated API verification (planned Q1 2026) |
| ๐ข Utskott Misattribution | Committee ("utskott") jurisdiction errors | AI 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 Arithmetic | Vote margin calculation errors | AI reports 175-174 vote when actual is 176-173 | Display full vote counts (not margins), PR review | โ ๏ธ GAP: No automated vote arithmetic validation |
| โ๏ธ Partirepresentation Bias | Unequal party coverage in AI news | AI-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 Deception | Publishing motions before official availability | AI generates articles about motions still under embargo | MCP data freshness checks | โ ADEQUATE: Only published documents available |
| ๐คฅ Interpellation Fabrication | Fake interpellation debates | AI generates non-existent Q&A between minister and MP | Interpellation ID validation, source URLs | โ ๏ธ GAP: No automated debate transcript verification |
| Threat | Swedish Government Context | Attack Scenario | Current Controls | Gap Analysis |
|---|---|---|---|---|
| ๐ Proposition Fabrication | Fake government propositions (prop.) | AI invents non-existent proposition with fabricated prop number | regeringen.se URL validation via g0v.se | โ ADEQUATE: All propositions require valid URL |
| ๐ข SOU/Ds Report Misattribution | Government inquiry (SOU/Ds) incorrect department | AI attributes SOU report to wrong ministry | analyze_g0v_by_department validation | โ ADEQUATE: MCP returns correct department |
| ๐ฌ Ministerial Quote Fabrication | Fake statements from Swedish ministers | AI generates quotes attributed to ministers that were never said | Source citations (g0v.se URLs), PR review | โ ๏ธ GAP: No automated quote verification against speech transcripts |
| ๐ Government Document Metadata | Incorrect document dates, departments | AI reports wrong publication date or departmental origin | get_g0v_document_content metadata validation | โ ADEQUATE: MCP returns structured metadata |
| ๐ Remiss Process Misrepresentation | Incorrect remiss (public consultation) status | AI reports closed remiss as open or vice versa | g0v.se remiss status field | โ ADEQUATE: MCP returns current status |
| ๐๏ธ Budget Misrepresentation | Incorrect budget figures or allocation claims | AI fabricates or miscalculates budget numbers | IMF/SCB cross-verification, source citation | โ ๏ธ GAP: No automated fiscal data validation |
| ๐ค Cabinet Reshuffle Confusion | Incorrect minister assignments | AI reports wrong minister for a portfolio | g0v.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:
gh-aw Defenses:
Threat Actor: Nation-State APT (Foreign Intelligence Service)
Timing: Swedish parliamentary election Sunday (September 2026)
Attack Vector:
Impact:
Mitigation:
gh-aw Election Protection:
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:
gh-aw Defenses:
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:
gh-aw Defenses:
Residual Risk: LOW (2.0/10) - Multiple verification layers, but subtle one-off errors may pass
| Metric | Target | Current Performance | Monitoring Method | gh-aw Contribution |
|---|---|---|---|---|
| โ Factual Accuracy (Post-Review) | 98%+ | 98-99% (estimated) | PR rejection rate tracking | SafeOutputs validation |
| ๐ Hallucination Detection Rate | 95%+ | 95% (human review) | Fact-checking protocol compliance | Content filters |
| ๐ Cross-Language Consistency | 90%+ | 80-85% (estimated) | Manual spot-checks (planned automation Q2 2026) | Multi-language SafeOutputs |
| โ๏ธ Party Representation Balance | ยฑ5% variance | Not measured | โ ๏ธ GAP: Planned Q2 2026 dashboard | Bias detection (planned) |
| ๐ Document ID Validation Coverage | 100% | 100% (manual) | PR review checklist | MCP validation |
| ๐ค Translation Quality (Human Review) | 90%+ | 90-95% (estimated) | TRANSLATION_GUIDE.md compliance | SafeOutputs schema check |
| โฑ๏ธ Time-to-Correction | <2h (critical), <24h (standard) | ~1h critical, ~8h standard | Incident response log | Automated alert pipeline |
| ๐ก๏ธ gh-aw Filter Effectiveness | 99%+ pass rate | 99.5% | SafeOutputs metrics | Built-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:
| Phase | Activity | Riksdagsmonitor Implementation | Output | Responsible |
|---|---|---|---|---|
| PRE | Scope definition, asset inventory refresh, participant assembly | Review 14-language site, AI workflows, AWS infrastructure, dashboard features | Updated scope, participant roster | CEO + Security Architect |
| ENUM | Enumerate all system components, data flows, trust boundaries | Update C4 diagrams (Level 1+2), DFD with STRIDE annotations, identify new AI workflow changes | Component inventory, updated DFD | Security Architect |
| THREATS | Systematic threat identification using STRIDE per element | Apply STRIDE to each DFD element; integrate MITRE ATT&CK techniques; review OWASP LLM Top 10 | Threat register (currently 70 threats) | Security Architect + Dev Team |
| MAP | Map threats to controls, identify gaps, assess residual risk | Map each threat to PREV/DET/CORR controls; calculate risk scores; identify ATT-GAP items | Control mapping, gap analysis | Security Architect |
| PLAN | Prioritize remediation, assign owners, set timelines | Create remediation backlog; assign to quarterly milestones; budget control improvements | Remediation plan with deadlines | CEO |
| VALIDATE | Verify controls are effective, test detection mechanisms | Run CodeQL, Dependabot scan, SRI validation, CSP audit; test DR failover | Validation evidence, test results | Quality Engineer |
| MONITOR | Continuous monitoring, metrics tracking, threat intelligence updates | Track 10 security metrics (see below); integrate ENISA/CERT-SE/MITRE updates | Dashboard metrics, quarterly report | CEO + Security Architect |
| Assessment Type | Trigger | Frequency | Scope | Output |
|---|---|---|---|---|
| Full Workshop (PRE โ MONITOR) | Quarterly review, major architecture change | Quarterly (Feb, May, Aug, Nov) | All 7 phases, complete threat model review | Updated THREAT_MODEL.md |
| Targeted Assessment | New AI workflow, dashboard feature, dependency update | As needed (within 2 weeks of change) | ENUM โ MAP phases for affected components | Targeted threat update |
| Incident-Driven Review | Security incident, near-miss, control failure | Within 1 week of incident | THREATS โ PLAN phases for incident scope | Incident lessons learned, control improvements |
| Threat Intelligence Update | ENISA report, MITRE ATT&CK update, CERT-SE advisory | As published | MAP โ MONITOR phases | Updated threat agent analysis |
| Election Period Heightened Review | 60 days before Swedish/EU elections | Pre-election cycle | Full review with election-specific scenarios | Election security posture report |
| Trigger Category | Trigger Event | Update Scope | Timeline | Responsible |
|---|---|---|---|---|
| Architecture Changes | New AI workflow, dashboard feature, CDN migration | Full STRIDE re-analysis | Within 2 weeks | Security Architect |
| Incident-Driven | Security incident, near-miss, control failure | Incident-specific sections | Within 1 week | CEO + Security Architect |
| Regulatory Changes | EU AI Act updates, GDPR amendments, NIS2 | Compliance mapping sections | Within 1 month | Compliance Officer (CEO) |
| Threat Landscape | ENISA report updates, new MITRE ATT&CK techniques | Threat agent analysis, MITRE section | Quarterly | Security Architect |
| Technology Changes | New dependencies (npm packages), CDN provider change | Supply chain threats, control framework | Within 2 weeks | Security Architect |
| Scheduled Review | Quarterly threat model review | All sections (comprehensive) | Quarterly (Feb, May, Aug, Nov) | CEO |
| Security Metric | Target | Current | Monitoring Frequency | Alert Threshold |
|---|---|---|---|---|
| GitHub Secret Scanning Alerts | 0 active | 0 | Real-time | 1+ alert |
| Dependabot Vulnerabilities | <3 Medium+ | 0 | Daily | 5+ Medium or 1+ High |
| CodeQL Findings | 0 High+ | 0 | Per PR | 1+ High |
| CSP Violation Reports | <10/day | 2-5/day | Daily | 50+/day |
| SRI Validation Failures | 0 | 0 | Real-time | 1+ failure |
| PR Review Rejection Rate (AI) | <10% | ~5% | Weekly | 20%+ (indicates hallucination spike) |
| AWS CloudTrail Anomalies | 0 | 0 | Daily | 1+ anomaly |
| S3 Unauthorized Access Attempts | 0 | 0 | Real-time | 1+ attempt |
| DDoS Attack Volume | <1/quarter | 0 YTD | Weekly | Active attack |
| AI Hallucination Detection (Manual) | <5% | ~2-3% | Per PR | 10%+ |
| Source | Type | Update Frequency | Integration Method | Cost |
|---|---|---|---|---|
| ENISA Threat Landscape | Industry report | Annual | Manual review, threat agent updates | Free |
| MITRE ATT&CK Framework | Technique database | Quarterly | Technique mapping review | Free |
| OWASP LLM Top 10 | LLM security guidance | Annual | AI threat section updates | Free |
| GitHub Security Advisories | Dependency vulnerabilities | Real-time | Dependabot integration | Free (GitHub plan) |
| AWS Security Bulletins | Infrastructure advisories | Weekly | Manual monitoring | Free |
| CVE Database (NVD) | Vulnerability disclosures | Daily | Dependabot + manual review | Free |
| Swedish CERT-SE | National threat intelligence | Ad-hoc | Email alerts | Free |
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 Category | Riksdagsmonitor Exposure | Applicable Attack Vectors | Current Controls | Residual Risk | MITRE ATT&CK Alignment |
|---|---|---|---|---|---|---|
| 1 | ๐ Threats Against Availability | HIGH โ CloudFront/GitHub Pages are public-facing; DDoS during Swedish elections is credible | L7 flood, DNS amplification, CDN exhaustion | AWS Shield Standard (PREV-021), multi-region DR (PREV-020), Route 53 failover (PREV-022) | LOW | T1498, T1499 |
| 2 | ๐ฐ Ransomware | LOW โ No server-side infrastructure to encrypt; static assets recoverable from Git | Supply chain ransomware (npm ecosystem), GitHub account compromise | Dependabot (PREV-013), MFA (PREV-001), S3 versioning (PREV-019), Git immutable history | VERY LOW | T1486 |
| 3 | ๐ Threats Against Data | MEDIUM โ Public political data integrity is critical; no private user data | Data manipulation via AI hallucination, CDN content poisoning, commit tampering | SRI (PREV-012), mandatory PR review (PREV-028), branch protection (PREV-002), GPG signing (PREV-003) | LOW | T1565, T1659 |
| 4 | ๐ฆ Malware | LOW โ Static website cannot execute server-side malware; client-side risk via CDN | Malicious npm package, compromised Chart.js/D3.js CDN asset | CSP (PREV-011), SRI (PREV-012), Dependabot (PREV-013), CodeQL (PREV-014) | VERY LOW | T1195.002 |
| 5 | ๐ฃ Social Engineering | MEDIUM โ GitHub contributor phishing, credential theft for deployment access | Phishing for GitHub PAT/MFA bypass, impersonation of maintainers | MFA (PREV-001), OIDC (PREV-006), secret scanning (PREV-005), security awareness | LOW | T1566, T1078 |
| 6 | ๐ฐ Information Manipulation | CRITICAL โ AI-generated political news is the #1 threat vector for democratic manipulation | AI hallucination injection, prompt injection, data source poisoning, translation manipulation | Mandatory PR review (PREV-028), MCP freshness validation (PREV-026), document ID validation (PREV-024) | MEDIUM | T1659 |
| 7 | ๐ Supply Chain Attacks | HIGH โ npm ecosystem, Chart.js/D3.js CDN, GitHub Actions marketplace | Compromised npm packages, CDN poisoning, malicious GitHub Actions | SRI (PREV-012), SHA-pinned Actions (PREV-015), Dependabot (PREV-013), SBOM generation | LOW | T1195 |
ENISA Integration Summary:
| ENISA Threat Trend | Riksdagsmonitor Relevance | Implementation Status | Residual Risk |
|---|---|---|---|
| Supply Chain Attacks (Ransomware) | HIGH - npm dependencies, Chart.js/D3.js CDN | โ Dependabot, SRI hashes, SHA-pinned GitHub Actions | LOW |
| DDoS Attacks (IoT Botnets) | MEDIUM - CloudFront + GitHub Pages targets | โ AWS Shield Standard, multi-region architecture | LOW |
| Disinformation Campaigns (AI-Generated) | CRITICAL - AI news generation workflows | โ ๏ธ Partial - PR review, planned automated validation Q1 2026 | MEDIUM |
| Social Engineering (Phishing) | MEDIUM - GitHub contributor accounts | โ MFA enforcement, security awareness training | LOW |
| API Vulnerabilities | LOW - No private APIs (public MCP server only) | โ HTTPS-only, freshness validation | LOW |
| Data Breaches (Cloud Misconfigurations) | MEDIUM - AWS S3 bucket exposure risk | โ IAM least privilege, bucket policy, OIDC | LOW |
| Cryptojacking (XSS) | LOW - Static website, no server-side execution | โ CSP, SRI, no user input processing | VERY LOW |
| Zero-Day Exploits (CDN/Browser) | LOW - Vendor responsibility (AWS, GitHub, browsers) | โ Vendor patching, security monitoring | LOW |
Heightened Risk Periods:
Nation-State Threat Actors with Swedish Interest:
Mitigation for High-Risk Periods:
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]
| Strategy | Section(s) | Implementation Status | Key Outputs |
|---|---|---|---|
| 1๏ธโฃ Attacker-Centric (MITRE ATT&CK) | ยง MITRE ATT&CK Framework Integration | โ Complete | 23 techniques mapped, 9 tactics covered |
| 2๏ธโฃ Asset-Centric (Crown Jewels) | ยง Critical Assets & Protection Goals | โ Complete | 10 assets classified, 5 Crown Jewels, $180K annual value |
| 3๏ธโฃ Architecture-Centric (STRIDE per Element) | ยง Data Flow & Architecture Analysis | โ Complete | 26 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 | โ Complete | 9 attack trees (3 dedicated + 6 embedded scenarios) |
| 5๏ธโฃ Risk-Centric (Quantitative Assessment) | ยง Enhanced Risk-Centric Analysis (next section) | โ Complete | Risk 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 Stage | Description | Riksdagsmonitor Implementation | Output |
|---|---|---|---|
| Stage I: Define Objectives | Business and security objectives | Democratic transparency, accurate Swedish political data, 14-language access | Mission statement, business objectives |
| Stage II: Define Technical Scope | Application + infrastructure inventory | Static website, AI workflows, AWS CloudFront, riksdag-regering-mcp, GitHub Actions | Asset inventory (ASSET-001 to ASSET-010) |
| Stage III: Application Decomposition | DFD, trust boundaries, data flows | C4 architecture diagrams, STRIDE per DFD element, trust boundary documentation | Architecture diagrams, DFDs |
| Stage IV: Threat Analysis | Threat intelligence integration | ENISA 2024/2025 trends, MITRE ATT&CK 23 techniques, Swedish CERT-SE advisories | Threat agent profiles, MITRE mapping |
| Stage V: Vulnerability Analysis | Identify weaknesses per component | CodeQL static analysis, Dependabot, GitHub Secret Scanning, SRI validation | Vulnerability tracking (ATT-GAP-001/002/003) |
| Stage VI: Attack Modeling | Realistic attack scenarios | 9 attack trees: defacement, misinformation, CDN supply chain, AI hallucination | Attack trees with probability estimates |
| Stage VII: Risk/Impact Analysis | Quantify business impact | $180K cost avoidance, risk scores (0-10), ROI 682% | Risk matrix, treatment decisions |
PASTA Applicability for Riksdagsmonitor:
Trike focuses on acceptable risk and security auditing, ensuring every threat has an explicit risk treatment decision โ fully aligned with Hack23 ISMS policy.
| Trike Concept | Riksdagsmonitor Application | Implementation |
|---|---|---|
| Actor โ Asset โ Action model | Threat agent โ Crown Jewel โ Attack type mapping | 7 threat agent profiles ร 5 Crown Jewels ร STRIDE actions |
| Acceptable Risk Definition | CEO-defined risk tolerance thresholds | Risk Score โค 3.2/10 acceptable; 0 CRITICAL risks tolerated |
| Threat Enumeration Completeness | All actor-asset-action triples evaluated | 52 STRIDE threats + 18 AI/LLM threats = 70 total threat entries |
| Permission Model | Intended vs. implemented access rights | GitHub OIDC scopes, AWS IAM policies, MCP server access controls |
| Risk Treatment Tracking | Every threat has explicit treatment | 0 AVOID, 48 MITIGATE, 4 TRANSFER, 18 ACCEPT (70 threats, 100% coverage) |
| Audit Trail | All changes tracked to threat model | Git commit history, quarterly review schedule |
Trike Benefits for Riksdagsmonitor:
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):
Impact Scale (1-10):
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
| Rank | Threat ID | Threat Name | STRIDE | Likelihood | Impact | Risk Score | Status | Remediation Plan |
|---|---|---|---|---|---|---|---|---|
| 1 | AI-H1 (LLM09) | AI hallucination misinformation published | Information Disclosure | MEDIUM (3) | CRITICAL (10) | 3.0 | โ ๏ธ MEDIUM | Q1 2026: Automated dok_id API verification |
| 2 | AI-P1 (LLM01) | Prompt injection via riksdag documents | Tampering | MEDIUM (3) | HIGH (8) | 2.8 | โ ๏ธ MEDIUM | Q1 2026: Enhanced input sanitization |
| 3 | AI-T1 | Cross-language translation inconsistency | Tampering | MEDIUM (3) | HIGH (8) | 2.4 | โ ๏ธ MEDIUM | Q2 2026: Consistency validation tool |
| 4 | T1 | Repository content tampering | Tampering | LOW (2) | CRITICAL (10) | 2.0 | ๐ข LOW | Existing: Branch protection, GPG signing |
| 5 | AI-D1 (LLM04) | API rate limiting DoS | DoS | MEDIUM (3) | MEDIUM (5) | 1.5 | ๐ข LOW | Existing: Graceful degradation |
| 6 | T3 | Chart.js/D3.js supply chain attack | Tampering | LOW (2) | HIGH (8) | 1.6 | ๐ข LOW | Existing: SRI hashes, manual CDN review |
| 7 | I1 | GitHub secrets exposure | Information Disclosure | LOW (2) | CRITICAL (10) | 2.0 | ๐ข LOW | Existing: Secret scanning, OIDC |
| 8 | E1 | GitHub Actions privilege escalation | Elevation of Privilege | LOW (2) | MEDIUM (5) | 1.0 | ๐ข LOW | Existing: Least privilege, SHA-pinned actions |
| 9 | D1 | AWS infrastructure outage | DoS | LOW (2) | MEDIUM (5) | 1.0 | ๐ข LOW | Existing: Multi-region, GitHub Pages DR |
| 10 | AI-S1 (LLM05) | MCP server supply chain compromise | Tampering | LOW (2) | HIGH (8) | 1.6 | ๐ข LOW | Existing: 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 Treatment | Threat Count | Rationale | Annual Cost Avoidance |
|---|---|---|---|
| AVOID | 0 | No threats require feature removal | N/A |
| MITIGATE | 48 | Active controls implemented | $180,000 |
| TRANSFER | 4 | AWS/GitHub vendor responsibility (Shield, GitHub SLA) | $25,000 (vendor SLA value) |
| ACCEPT | 18 | Residual risk within tolerance | $0 (cost of acceptance) |
Total Annual Cost Avoidance Through Threat Model: $180,000
Breakdown by Control Category:
ROI Calculation:
Intangible Benefits:
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 Gate | Detection Target | Detection Rate | False Positive Rate | Automation Status |
|---|---|---|---|---|
| V1: Schema Validation | Malformed riksdag-regering-mcp responses | 100% | <1% | โ Automated |
| V2: Freshness Check | Stale data (>48h old) | 95% | <1% | โ Automated |
| V3: Document ID Verification | Hallucinated dok_id, fabricated documents | 85% (manual) | 2% | โ ๏ธ Manual (planned automation Q1 2026) |
| V4: Cross-Language Consistency | Contradictory facts across 14 languages | 80% (spot-check) | 5% | โ ๏ธ Manual (planned automation Q2 2026) |
| V5: Statistical Plausibility | Vote margin arithmetic errors, implausible data | 90% | 3% | โ ๏ธ Manual (heuristic checks) |
| V6: Human Review | All 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:
| Severity | Definition | Response Time | Public Statement Required | Example |
|---|---|---|---|---|
| CRITICAL | Completely fabricated parliamentary data published | < 4 hours | Yes (CEO) | Fake vote results, non-existent proposition |
| HIGH | Significant factual error with reputational impact | < 12 hours | Yes (project lead) | Wrong vote margin (175-174 vs. 176-173), misattributed committee |
| MEDIUM | Minor factual error, limited visibility | < 24 hours | No (correction notice) | Typo in minister name, incorrect date |
| LOW | Stylistic issue, translation nuance | < 72 hours | No (silent correction) | Word choice in translation, formatting inconsistency |
Public Incident Log: All CRITICAL and HIGH severity incidents documented in GitHub Issues (public) with:
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.
| Level | Description | Riksdagsmonitor Status | Evidence |
|---|---|---|---|
| Level 0: Ad-Hoc | No systematic threat analysis | โ Not Applicable | N/A |
| Level 1: Initial | Basic threat identification, no formal process | โ Not Applicable | N/A |
| Level 2: Managed | STRIDE analysis, threat documentation | โ Superseded | Previous threat models (numbered sections) |
| Level 3: Defined | Formal methodology (ISMS-aligned), multi-strategy approach | โ CURRENT LEVEL | This threat model (18 thematic sections) |
| Level 4: Quantitative | Risk scoring, business value quantification, metrics | โ CURRENT LEVEL | Risk scores, cost avoidance ($180K), ROI 682% |
| Level 5: Optimizing | Continuous improvement, automated validation, AI-assisted threat modeling | ๐ก PARTIAL | Continuous monitoring (โ ), automated validation gaps (Q1-Q2 2026) |
Current Maturity Level: Level 4 (Quantitative) with progress toward Level 5 (Optimizing)
| Capability | Maturity Level | Evidence | Gap Analysis |
|---|---|---|---|
| Threat Identification | Level 5 โ | STRIDE per element, MITRE ATT&CK (23 techniques), Attack Trees (6 scenarios), OWASP LLM Top 10 | None - comprehensive coverage |
| Risk Assessment | Level 4 โ | Quantitative risk scores (0-10 scale), likelihood ร impact, cost avoidance quantification | None - meets requirements |
| Control Effectiveness | Level 4 โ | Control effectiveness scoring (%), risk reduction percentages, MTTD/MTTR metrics | None - adequate metrics |
| Business Value Integration | Level 4 โ | $180K annual cost avoidance, ROI 682%, intangible benefits quantified | None - strong business case |
| Continuous Monitoring | Level 4 โ | Real-time metrics (CSP, SRI, CloudTrail), daily/weekly reviews, quarterly threat landscape updates | None - comprehensive monitoring |
| Automated Validation | Level 3 ๐ก | Manual PR review, partial automation (schema, freshness), gaps in dok_id and cross-language validation | GAP: Q1-Q2 2026 automation roadmap |
| Incident Response | Level 4 โ | Documented procedures, public transparency, CEO accountability | None - mature process |
| Threat Intelligence | Level 4 โ | ENISA, MITRE ATT&CK, OWASP, Swedish CERT-SE, GitHub/AWS advisories | None - comprehensive sources |
Overall Maturity Score: Level 4.25/5 (High Maturity)
Path to Level 5 (Optimizing):
| Metric | Riksdagsmonitor | CIA (Reference) | Black Trigram (Reference) | Industry Average (Static Websites) |
|---|---|---|---|---|
| Document Length | 2,134+ lines | 943 lines | 880 lines | ~300 lines |
| Thematic Sections | 19 sections โ | 18 sections | 16 sections | 5-8 sections |
| STRIDE Threats | 52 threats | 48 threats | 35 threats | 10-15 threats |
| MITRE ATT&CK Techniques | 23 techniques | 40 techniques | 28 techniques | 5-10 techniques |
| Attack Trees | 6 trees | 8 trees | 6 trees | 1-2 trees |
| Control Effectiveness | 93.1% | 92.3% | 95.8% | 70-80% |
| Maturity Level | Level 4.25 | Level 5 | Level 4.5 | Level 2-3 |
| Annual Cost Avoidance | $180,000 | $200,000+ | $150,000 | Not quantified |
Analysis:
Riksdagsmonitor-specific security practices for civic transparency platforms.
Principle: Publicly document all security practices, threat models, and incident responses.
Implementation:
Benefits:
Principle: Never publish AI-generated political content without multi-layered human and automated validation.
Implementation:
Benefits:
Principle: Ensure factual consistency across all 14 supported languages.
Implementation:
data-translate attributes)Benefits:
Principle: Every factual claim must be traceable to an authoritative Swedish government source.
Implementation:
Benefits:
Principle: Democratic transparency platforms must be resilient to nation-state attacks and election-period disruptions.
Implementation:
Benefits:
๐ 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:
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
| ID | Element | STRIDE | Description | Likelihood | Impact | Mitigation |
|---|---|---|---|---|---|---|
| T-IMF-01 | IMF cache (filesystem) | Tampering | Vintage substitution โ older WEO vintage swapped for newer label | LOW | HIGH | Vintage-tagged filenames; SHA-256 pin in cache index; supersedes-chain audit |
| T-IMF-02 | IMF egress path | Information disclosure | IMF 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. | LOW | LOW | Key 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-03 | IMF API | DoS | Workflow exceeds IMF rate limit (~30 req/min) โ blocks article generation | MEDIUM | MEDIUM | Cache-first; self-imposed โค30 req/min; exponential back-off; documented in analysis/imf/agentic-integration.md |
| T-IMF-04 | IMF citation in article | Repudiation | Article cites "IMF projects X" without vintage label โ unauditable claim | MEDIUM | MEDIUM | economicProvenance block required in front-matter; ECONOMIC_DATA_CONTRACT v2.1 banned phrases |
| T-IMF-05 | tsx scripts/imf-fetch.ts | Elevation of privilege | Supply-chain tampering of IMF fetch script | LOW | HIGH | Script in-repo; reviewed; no dynamic eval; harden-runner egress audit |
| T-IMF-06 | IMF data licence | Repudiation | Article reuses IMF figure without attribution | LOW | MEDIUM | Article footer template auto-emits IMF citation; lint enforces |
| T-IMF-07 | IMF cache fallback | Spoofing | Stale cached vintage served as current โ reader misinformed | LOW | MEDIUM | Vintage-age annotation rule (>6 mo โ flagged); ECONOMIC_DATA_CONTRACT v2.1 |
All mitigations are codified in:
analysis/imf/data-dictionary.md โ vintage discipline + dataflow quirksanalysis/imf/agentic-integration.md โ seven-step integration contract.github/aw/ECONOMIC_DATA_CONTRACT.md โ banned phrases + provenance schemascripts/imf-context.ts โ runtime enforcementtests/imf-context.test.ts + tests/imf-inventory.test.ts โ regression preventionEgress 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.
| ID | Asset / flow | STRIDE | Threat | Likelihood | Impact | Mitigations |
|---|---|---|---|---|---|---|
| T-STATS-01 | www.statskontoret.se page discovery | Spoofing | DNS/TLS interception or lookalike page returns false download links | LOW | MEDIUM | HTTPS-only egress, allow-list www.statskontoret.se, source URL recorded in payload and .meta.json, PR review of persisted diffs. |
| T-STATS-02 | Excel / CSV ZIP payload | Tampering | Workbook or archive content modified upstream or in transit | LOW | HIGH | TLS transport, local parser contract checks, typed StatskontoretError, persisted raw/derived artifacts with provenance sidecars, reviewer diff inspection. |
| T-STATS-03 | Headcount aggregation | Information integrity | Header drift maps wrong columns to ร
r, Departement, Myndighet, or ร
rsarbetskrafter | MEDIUM | MEDIUM | Header-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-04 | CLI invocation | Repudiation | Article cites agency headcount or budget outturn without source page/year/status | MEDIUM | MEDIUM | discover captures source page, URL, year/month/status and last-modified; persisted sidecars include dataset, artifact, fetchedAt, and mcpTool: statskontoret-ts-client. |
| T-STATS-05 | Source availability | Denial of service | Statskontoret page unavailable or workbook fetch times out | MEDIUM | LOW | 15s timeout, optional-enrichment semantics, cache-first reuse of analysis/data/statskontoret/, article generation can omit context rather than fail. |
| T-STATS-06 | XLSX/ZIP parsing dependency | Elevation of privilege | Malicious archive attempts parser/resource abuse | LOW | HIGH | jszip pinned in npm lock/SBOM, GitHub Advisory Database reviewed, no dynamic eval, no script execution from workbooks, tests exercise parser edge cases. |
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 thescbMCP server (primary) and direct MCP relayhttps://scb-mcp.onrender.com/mcp(DIRECT_SCB_SERVER_URLfallback) ยท 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.
| ID | Asset / flow | STRIDE | Threat | Likelihood | Impact | Mitigations |
|---|---|---|---|---|---|---|
| T-SCB-01 | scb-mcp.onrender.com MCP relay | Spoofing | Third-party relay impersonated or DNS/TLS-intercepted, returning forged table data | LOW | HIGH | HTTPS-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-02 | JSON-stat / PXWeb payload | Tampering | Relay or upstream mutates statistic values, footnotes, or contents codes | LOW | HIGH | Typed MCP client contract checks; persisted raw/derived artifacts with .meta.json sidecars; reviewer diff inspection on persisted analysis/data/scb/. |
| T-SCB-03 | Table-cell mapping | Information integrity | Variable/value-code drift maps wrong dimension (region, period, contents) to a cell | MEDIUM | MEDIUM | Metadata fetched per table before query; value-code validation; unit tests for SCB client parsing; omit context rather than emit unmapped figures. |
| T-SCB-04 | SCB citation in article | Repudiation | Article cites "SCB reports X" without table id / vintage โ unauditable claim | MEDIUM | MEDIUM | Provenance block records mcpTool, table id, fetchedAt; ECONOMIC_DATA_CONTRACT vintage discipline applies to the Swedish ground-truth layer. |
| T-SCB-05 | MCP relay availability | Denial of service | Render relay cold-start or MCP timeout blocks enrichment | MEDIUM | LOW | 15s timeout (DEFAULT_TIMEOUT); cache-first reuse; optional-enrichment semantics; retry with backoff (DEFAULT_MAX_RETRIES). |
| T-SCB-06 | tsx scripts/scb-fetch.ts | Elevation of privilege | Supply-chain tampering of fetch/parse path | LOW | HIGH | Script in-repo; reviewed; no dynamic eval; dependencies pinned in npm lock/SBOM; harden-runner egress audit. |
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.
| ID | Asset / flow | STRIDE | Threat | Likelihood | Impact | Mitigations |
|---|---|---|---|---|---|---|
| T-WB-01 | api.worldbank.org/v2 egress | Spoofing | DNS/TLS interception returns forged indicator series | LOW | MEDIUM | HTTPS-only egress; allow-list api.worldbank.org; source URL + indicator code recorded in provenance. |
| T-WB-02 | Indicator series payload | Tampering | Upstream or in-transit mutation of governance/environment values | LOW | MEDIUM | TLS transport; typed client contract checks; persisted artifacts with provenance sidecars; reviewer diff inspection. |
| T-WB-03 | Indicator-class selection | Information integrity | World Bank figure used for economic context, violating the canonical IMF-first rule | MEDIUM | HIGH | indicator-policy-mapping.md restricts allowed classes (governance/environment/social/demographic); ECONOMIC_DATA_CONTRACT bans WB economic claims; lint/tests enforce. |
| T-WB-04 | WB citation in article | Repudiation | Article cites WB indicator without code/vintage/source โ unauditable | LOW | MEDIUM | Provenance block records indicator code + fetchedAt; footer attribution template. |
| T-WB-05 | API availability | Denial of service | World Bank API timeout blocks enrichment | LOW | LOW | Cache-first; optional-enrichment semantics; article can omit residue context rather than fail. |
| T-WB-06 | world-bank-client.ts fetch path | Elevation of privilege | Supply-chain tampering of fetch/parse path | LOW | MEDIUM | Script in-repo; reviewed; no dynamic eval; dependencies pinned in npm lock/SBOM; harden-runner egress audit. |
Effective: 2026-05-30 ยท Classification: Public ยท Entry point:
scripts/fetch-rir-followups.tsยท Client:scripts/rir-followups-client.tsยท Source: Riksdag/Regeringen via theriksdag-regering-mcpserver (doktyp=skrskrivelse 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.
| ID | Asset / flow | STRIDE | Threat | Likelihood | Impact | Mitigations |
|---|---|---|---|---|---|---|
| T-RIR-01 | riksdag-regering-mcp doktyp=skr query | Spoofing | MCP relay impersonated or returns forged skrivelse documents | LOW | HIGH | HTTPS-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-02 | data/rir-followups.json | Tampering | Follow-up status (open/responded/overdue) altered to misstate government accountability | LOW | HIGH | JSON Schema validation (schemas/rir-followups-schema.json); committed artifact reviewed in PR diffs; provenance includes source dok_id and fetchedAt. |
| T-RIR-03 | Reportโskrivelse matching | Information integrity | Wrong skrivelse matched to a RiR report โ false "responded/ignored" claim | MEDIUM | HIGH | Deterministic matching keyed on report reference; schema-validated linkage; unit/regression tests; human review before publication. |
| T-RIR-04 | Deadline computation | Information integrity | Mis-calculated follow-up window emits false overdue/compliant alert | MEDIUM | MEDIUM | Documented 4-month statutory window; date arithmetic under test; alert thresholds reviewed. |
| T-RIR-05 | RiR/Riksdag accountability citation | Repudiation | Article asserts government "failed to respond" without source dok_id/date | MEDIUM | MEDIUM | Provenance block records dok_id, response date, status; ISMS editorial review for accountability claims. |
| T-RIR-06 | Source availability | Denial of service | Riksdag MCP/API unavailable blocks follow-up refresh | MEDIUM | LOW | Cache-first reuse of data/rir-followups.json; optional-enrichment semantics; stale-data annotation. |
| ๐ 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 |
๐ณ๏ธ Empower citizens ยท ๐ Strengthen democratic accountability ยท ๐ต๏ธ Illuminate the political process
ยฉ 2008โ2026 Hack23 AB (Org.nr 559534-7807) ยท Maintainer: James Pether Sรถrling, CISSP CISM