European Parliament MCP Server API - v1.2.21
    Preparing search index...

    Hack23 Logo

    ๐ŸŽฏ European Parliament MCP Server โ€” Threat Model

    ๐Ÿ›ก๏ธ Proactive Security Through Structured Threat Analysis
    ๐Ÿ” STRIDE โ€ข MITRE ATT&CK โ€ข MCP Protocol Security โ€ข Parliamentary Data Protection

    Owner Version Effective Date Review Cycle

    ๐Ÿ“‹ Document Owner: CEO | ๐Ÿ“„ Version: 1.3 | ๐Ÿ“… Last Updated: 2026-04-28 (UTC)
    ๐Ÿ”„ Review Cycle: Quarterly | โฐ Next Review: 2026-07-28
    ๐Ÿท๏ธ Classification: Public (Open Source MCP Server)



    Policy Relevance Link
    Open Source Policy Security transparency, vulnerability disclosure View
    Secure Development Policy Secure coding practices, supply chain security View
    Risk Management Policy Threat assessment, risk mitigation View
    Privacy Policy GDPR compliance, data protection View
    Control Area Status Evidence
    Input Validation (Zod) โœ… Implemented Mitigates E-1, D-4, E-3
    Rate Limiting โœ… Implemented Mitigates D-1, D-2
    HTTPS/TLS โœ… Implemented Default EP API base URL uses HTTPS; EP_API_URL must be configured with https:// (Mitigates S-2, T-1)
    SLSA Level 3 โœ… Implemented Mitigates T-3, S-4
    Dependabot + npm audit โœ… Implemented Mitigates T-2
    Error Sanitization โš ๏ธ Partial Mitigates I-1, I-2
    Framework Controls Status
    ISO 27001:2022 A.5.1, A.8.2, A.8.8, A.8.25, A.14.2, A.18.1 โœ… Aligned
    NIST CSF 2.0 ID.AM, ID.RA, PR.DS, PR.IP, DE.CM, RS.AN โœ… Aligned
    CIS Controls v8.1 1.1, 2.7, 3.3, 6.2, 7.1, 16.7 โœ… Aligned

    See also: Policy Alignment below for the complete threat-specific ISMS policy mapping (Threat Modeling, Vulnerability Management, Network Security, Access Control, Cryptography, and Incident Response policies).


    Document Type Description Status
    SECURITY_ARCHITECTURE.md ๐Ÿ›ก๏ธ Current Implemented security design and controls โœ… Current
    FUTURE_SECURITY_ARCHITECTURE.md ๐Ÿš€ Future Security roadmap and planned enhancements โœ… Current
    THREAT_MODEL.md ๐ŸŽฏ Analysis STRIDE threat analysis and risk assessment โœ… Current
    FUTURE_THREAT_MODEL.md ๐Ÿ”ฎ Future Threat analysis for planned architecture evolution โœ… Current
    BCPPlan.md ๐Ÿ”„ Continuity Business continuity and disaster recovery โœ… Current
    CRA-ASSESSMENT.md ๐Ÿ“‹ Compliance EU Cyber Resilience Act conformity assessment โœ… Current
    SECURITY.md ๐Ÿ“œ Policy Security policy and vulnerability disclosure โœ… Current
    SECURITY_HEADERS.md ๐Ÿ”’ Technical API security headers implementation โœ… Current

    Establish a comprehensive threat model for the European Parliament MCP Server, a TypeScript/Node.js Model Context Protocol server providing AI assistants with structured access to European Parliament open datasets. This systematic threat analysis integrates multiple frameworks to ensure proactive security through structured analysis.

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

    โ€” Based on Hack23 AB's commitment to security through transparency and excellence

    • ๐ŸŽญ STRIDE per architecture element: Systematic threat categorization
    • ๐ŸŽ–๏ธ MITRE ATT&CK mapping: Advanced threat intelligence integration
    • ๐Ÿ—๏ธ Asset-centric analysis: Critical resource protection focus
    • ๐ŸŽฏ Scenario-centric modeling: Real-world attack simulation
    • โš–๏ธ Risk-centric assessment: Business impact quantification

    Included Systems:

    • ๐ŸŒ TypeScript/Node.js MCP server application
    • ๐Ÿ”Œ MCP protocol implementation (stdio transport)
    • ๐Ÿ›๏ธ European Parliament Open Data API integration
    • ๐Ÿ“ฆ npm package distribution (european-parliament-mcp-server)
    • ๐Ÿญ CI/CD security pipeline (GitHub Actions, SLSA Level 3)
    • ๐Ÿ“ฆ Dependency supply chain (npm ecosystem)
    • โœ… Input validation (Zod schemas)

    Out of Scope:

    • European Parliament API infrastructure security
    • End-user AI assistant security (Claude, ChatGPT, etc.)
    • Third-party npm registry infrastructure
    • End-user operating system and network security

    Integrated with ๐ŸŽฏ Hack23 AB Threat Modeling Policy methodology and frameworks.


    This threat model implements the five integrated threat modeling strategies mandated by Hack23 AB Threat Modeling Policy ยง4. Each strategy provides complementary perspectives to ensure comprehensive threat coverage for the European Parliament MCP Server.

    mindmap
      root((๐ŸŽฏ EP MCP Server
    Threat Modeling
    Strategies)) (๐ŸŽ–๏ธ Attacker-Centric) MITRE ATT&CK Mapping Kill Chain Analysis Threat Agent Classification Attack Tree Analysis (๐Ÿ—๏ธ Asset-Centric) Crown Jewel Analysis Critical Asset Inventory Data Flow Threat Analysis GDPR Data Classification (๐Ÿ›๏ธ Architecture-Centric) STRIDE per Component Trust Boundary Analysis Data Flow Diagrams Defense-in-Depth Layers (๐ŸŽฏ Scenario-Centric) Parliamentary Data Manipulation MEP Personal Data Abuse Electoral Disinformation Supply Chain Compromise MCP Protocol Injection (โš–๏ธ Risk-Centric) Quantitative Risk Matrix Business Impact Analysis Likelihood Assessment Residual Risk Tracking
    Strategy EP MCP Server Implementation Key Sections
    ๐ŸŽ–๏ธ Attacker-Centric MITRE ATT&CK mapping (13 techniques), Kill Chain disruption, 5 threat agent profiles ATT&CK Mapping, Kill Chain, Threat Agents
    ๐Ÿ—๏ธ Asset-Centric 6 critical assets, Crown Jewel analysis, protection strategies Crown Jewels
    ๐Ÿ›๏ธ Architecture-Centric STRIDE per 6 components (36 threat cells), trust boundary sequence diagram Architecture STRIDE
    ๐ŸŽฏ Scenario-Centric 5 EP-specific attack scenarios with attack chains, detection, and response Scenarios
    โš–๏ธ Risk-Centric Quantitative risk matrix, priority risk ranking, residual risk assessment Risk Assessment

    Dimension Level Rationale Business Impact
    ๐Ÿ” Confidentiality Public Open source server processing public EP data Trust Enhancement
    ๐Ÿ”’ Integrity Moderate Parliamentary data accuracy critical for democratic transparency Operational Excellence
    โšก Availability Standard MCP server tolerates brief outages; AI clients retry Revenue Protection
    Property Value
    Runtime Node.js 25+ (Current)
    Language TypeScript 6.0.2 (strict mode)
    Transport stdio (local process)
    Data Source European Parliament Open Data API
    Distribution npm registry
    Authentication None (public data, local stdio)
    Users AI assistants (Claude, ChatGPT, etc.)

    Asset Description Classification Threat Impact
    EP Parliamentary Data Integrity Accuracy and trustworthiness of MEP data, voting records, plenary documents ๐Ÿ”’ Integrity: Moderate Compromised democratic transparency, misinformation propagation
    Source Code & Build Pipeline TypeScript source, CI/CD workflows, GitHub Actions security ๐Ÿ” Confidentiality: Public
    ๐Ÿ”’ Integrity: High
    Supply chain compromise, malicious code injection
    Service Reputation & Trust OpenSSF Scorecard rating, npm package legitimacy, security posture โšก Availability: Standard User trust erosion, adoption reduction
    EP API Access & Availability Connection to European Parliament Open Data API โšก Availability: Moderate Service disruption, rate limit exhaustion
    npm Package Distribution Package integrity, version control, download statistics ๐Ÿ”’ Integrity: Moderate Malware distribution, user impact
    Audit Trail & Logging Structured logs, security event records ๐Ÿ”’ Integrity: Moderate Non-repudiation loss, incident investigation failure
    mindmap
      root((๐Ÿ›๏ธ EP MCP
    Crown Jewels)) ๐Ÿ”’ EP Parliamentary
    Data Integrity Voting Records MEP Profiles Plenary Documents Committee Assignments GDPR Personal Data ๐Ÿ“ฆ Source Code &
    Build Pipeline TypeScript Source GitHub Actions SLSA L3 Provenance npm Publishing Dependency Chain ๐Ÿ›ก๏ธ Service
    Reputation & Trust OpenSSF Score 9.4+ Security Badges npm Download Stats Community Trust Transparent Security ๐ŸŒ EP API Access &
    Availability Rate Limit Quota API Response Time Connection Integrity HTTPS/TLS Security Failover Strategy
    Crown Jewel Primary Threats Protection Controls Residual Risk
    EP Parliamentary Data Integrity T-1, T-2, S-2 HTTPS/TLS, response validation, Zod schemas, cache TTL Low
    Source Code & Build Pipeline T-2, T-3, S-4 SLSA Level 3, branch protection, GPG signing, Dependabot Low-Medium
    Service Reputation & Trust All categories OpenSSF Scorecard monitoring, security badges, transparent documentation Low
    EP API Access & Availability D-1, D-2, S-2 Rate limiting, retry logic, circuit breaker, HTTPS verification Medium
    npm Package Distribution S-3, S-4, T-2 Official package name ownership, npm 2FA, SBOM, npm provenance Low-Medium
    Audit Trail & Logging R-1, R-2, R-3 Structured stderr logging, immutable logs, timestamp integrity Low

    ID Threat Component Likelihood Impact Risk Mitigation
    S-1 Malicious MCP client impersonation MCP Transport Low Medium Low stdio transport limits to local process
    S-2 EP API response spoofing (MITM) API Client Low High Medium HTTPS/TLS for all API communication
    S-3 npm package name squatting Distribution Low High Medium Official package name, npm 2FA publishing
    S-4 Supply chain package substitution Dependencies Medium High High SLSA Level 3 provenance, lockfile pinning
    ID Threat Component Likelihood Impact Risk Mitigation
    T-1 API response manipulation API Client Low High Medium HTTPS integrity, response validation
    T-2 Dependency injection via compromised package Supply Chain Medium Critical High Dependabot, npm audit, SBOM tracking
    T-3 Build artifact tampering CI/CD Low Critical Medium SLSA Level 3 attestations
    T-4 Configuration manipulation Runtime Low Medium Low Environment variable validation
    ID Threat Component Likelihood Impact Risk Mitigation
    R-1 Untracked tool invocations MCP Server Medium Medium Medium Structured audit logging (stderr)
    R-2 Unsigned commits in source Source Code Low Medium Low GPG signing, branch protection
    R-3 Unattributed data access API Client Low Low Low Request logging with timestamps
    ID Threat Component Likelihood Impact Risk Mitigation
    I-1 Verbose error messages exposing internals Error Handling Medium Medium Medium Sanitized error responses
    I-2 Stack traces in production Runtime Medium Low Low Production error handling
    I-3 API keys in logs Logging Low High Medium No API keys required (public API)
    I-4 Sensitive data in cached responses Caching Low Low Low Public data only, TTL-based cache
    ID Threat Component Likelihood Impact Risk Mitigation
    D-1 EP API rate limit exhaustion API Client Medium Medium Medium Client-side rate limiting
    D-2 Memory exhaustion via large responses Runtime Low High Medium Response size limits
    D-3 Recursive/nested tool calls MCP Server Low Medium Low Call depth limits
    D-4 ReDoS via crafted input Input Validation Low Medium Low Zod schema validation (no regex)
    ID Threat Component Likelihood Impact Risk Mitigation
    E-1 MCP tool parameter injection Input Handling Medium Medium Medium Zod schema validation for all inputs
    E-2 Prototype pollution via JSON parsing Runtime Low High Medium Safe JSON parsing, TypeScript strict
    E-3 Path traversal in document search Tools Low Medium Low Input sanitization, no filesystem access
    E-4 Command injection via tool parameters MCP Server Low Critical Medium No shell execution, parameterized APIs

    This section maps the OWASP LLM Top 10 (2025) to the European Parliament MCP Server architecture, identifying applicable threats and gaps beyond traditional STRIDE analysis. Per the Hack23 OWASP LLM Security Policy, all MCP servers must assess LLM-specific attack vectors.

    LLM-ID OWASP LLM Top 10 (2025) Applicability to EP MCP Threat IDs Current Controls Residual Risk
    LLM01 Prompt Injection โš ๏ธ High Risk โ€” Indirect prompt injection via EP API response payloads (e.g., malicious text in procedure titles, speech transcripts, committee reports that the host LLM treats as instructions: "Ignore previous instructions and...") L-1 (new) โœ… Tool result schema documentation
    โ„น๏ธ Zod validates structure only, NOT semantic content โ€” injection payloads in valid string fields pass through unmodified
    โš ๏ธ Host-LLM responsibility (sanitize/sandbox tool-result text before treating as instructions)
    โš ๏ธ No server-side content sanitization (intentional: out-of-scope per MCP spec)
    Medium
    (Host-LLM boundary defense required)
    LLM02 Sensitive Information Disclosure โš ๏ธ Medium Risk โ€” System-prompt or tool-schema leakage through verbose error messages, stack traces in production logs I-1, I-2 (existing) โœ… Sanitized error responses
    โš ๏ธ Partial production log review
    โœ… No secrets in tool descriptions
    Low
    (Partial mitigation via I-1/I-2)
    LLM03 Supply Chain โš ๏ธ High Risk โ€” Compromised npm dependencies containing LLM-targeted backdoors (e.g., AI-generated obfuscated malware) T-2, S-4 (existing) โœ… Dependabot + SLSA Level 3
    โœ… SBOM tracking
    โœ… npm audit + Snyk
    Medium
    (Covered by existing T-2/S-4 controls)
    LLM04 Data and Model Poisoning โŒ Not Applicable โ€” EP MCP Server does not train or fine-tune models; consumes pre-trained host LLMs only N/A N/A N/A
    LLM05 Improper Output Handling โš ๏ธ Medium Risk โ€” Host LLM rendering EP-sourced HTML/Markdown from tool results as instructions (e.g., malicious <script> in MEP bio, XSS in speech transcript) L-2 (new) โš ๏ธ No server-side sanitization
    โœ… Public EP data only
    โš ๏ธ Host-LLM sanitization required
    Low-Medium
    (Trust boundary at LLM client)
    LLM06 Excessive Agency โš ๏ธ High Risk โ€” Host LLM autonomously invoking high-volume tool chains (e.g., enumerating all 705 MEPs via get_mep_details in a loop) causing EP API quota exhaustion L-3 (new) โœ… Token bucket rate limiter (100/min)
    โš ๏ธ No per-session limits
    โš ๏ธ No autonomous-agent detection
    Medium
    (Rate limiting mitigates but not agent-aware)
    LLM07 System Prompt Leakage โœ… Not Applicable โ€” EP MCP Server has no system prompt; tool descriptions are public by design (open-source, MCP schema published) N/A N/A (intentional transparency) N/A
    (Tool schemas are public API surface)
    LLM08 Vector and Embedding Weaknesses โŒ Not Applicable โ€” EP MCP Server does not implement vector databases, embeddings, or RAG pipelines N/A N/A N/A
    LLM09 Misinformation โš ๏ธ High Risk โ€” Host LLM hallucinating around real EP data + cache staleness amplifying outdated voting records as "current" (e.g., 15-min cache TTL + EP API delay = stale plenary results presented as real-time) L-4 (new) โœ… 15-min cache TTL
    โœ… EP API as source of truth
    โš ๏ธ No cache-age metadata in responses
    โš ๏ธ Host-LLM hallucination out of scope
    Low-Medium
    (EP data accuracy trust boundary)
    LLM10 Unbounded Consumption โš ๏ธ Medium Risk โ€” Host LLM token-cost amplification (e.g., AI client invoking get_all_generated_stats returning 20k+ tokens โ†’ expensive LLM processing) D-1, D-2 (existing) + L-5 (new, token-cost focus) โœ… Rate limiting (request-level)
    โš ๏ธ No response-size budgeting for LLM tokens
    โš ๏ธ No cost-estimation metadata
    Low-Medium
    (Response-size limits mitigate but no token budgeting)
    ID Threat Component Likelihood Impact Risk Mitigation
    L-1 Indirect Prompt Injection via EP API Tool Results Medium High High Document trust boundary: tool results are untrusted data for host LLM; no server-side content filtering (out of scope); host-LLM sanitization required per OWASP LLM01
    L-2 Improper Output Handling (HTML/Markdown Injection) Tool Results Low Medium Low-Medium Public EP data only; XSS risk on host-LLM client (browser-based); server documents Markdown/HTML pass-through; host-client sanitization required
    L-3 Excessive Agency (Autonomous Agent Abuse) Rate Limiter Medium Medium Medium Token bucket (100/min) limits request rate; no per-session or per-agent quotas; future: adaptive rate limiting + agent fingerprinting
    L-4 Misinformation via Cache Staleness Cache Layer Low Medium Low-Medium 15-min TTL balances freshness vs. EP API load; no cache-age metadata in responses; future: add cacheAge field to tool results
    L-5 Unbounded Token-Cost Consumption API Client Low Medium Low-Medium Response-size limits (10MB) mitigate bandwidth DoS; no LLM token-cost budgeting; future: add token-count estimates to tool schemas
    OWASP LLM Risk Hack23 ISMS Policy Compliance Status
    LLM01 Prompt Injection OWASP LLM Security Policy ยง4.1 โ€” Tool description hardening โœ… Documented trust boundary
    LLM02 Info Disclosure Information Security Policy ยง3.2 โ€” Data classification โœ… Public data only (C: Public)
    LLM03 Supply Chain Secure Development Policy ยง5 โ€” SLSA Level 3 โœ… Full compliance
    LLM05 Output Handling OWASP LLM Security Policy ยง4.3 โ€” Safe output encoding โš ๏ธ Host-LLM responsibility
    LLM06 Excessive Agency Access Control Policy ยง4 โ€” Rate limiting โœ… Token bucket enforced
    LLM09 Misinformation Data Classification Policy ยง3 โ€” Integrity (Moderate) โœ… EP API as source of truth
    LLM10 Unbounded Consumption Secure Development Policy ยง6.2 โ€” DoS prevention โœ… Response-size limits

    This section catalogs threats specific to the Model Context Protocol (MCP) based on 2025โ€“2026 security research, beyond generic web/API vulnerabilities. Per Hack23 AI Policy ยง5 and OWASP LLM Security Policy, MCP servers must assess protocol-level attack vectors.

    ID Threat Component Likelihood Impact Risk Mitigation
    M-1 Tool Poisoning (Malicious Tool Descriptions) MCP Tool Schema โŒ N/A (first-party server) N/A (hypothetical: Critical) N/A Not applicable: EP MCP Server is first-party (not third-party/untrusted). Tool descriptions authored in-repo, code-reviewed, signed via SLSA Level 3 provenance. Host-LLM trust boundary documented. Hypothetical impact shown in italics to indicate exposure if the threat were applicable (e.g., if a third party forked and republished the package).
    M-2 Indirect Prompt Injection via Tool Results Tool Result Payloads Medium High Medium-High EP API returns text containing "ignore previous instructionsโ€ฆ" patterns โ†’ host-LLM treats as commands. Mitigation: Zod validates structure (not content); host-LLM responsibility per OWASP LLM01; server documents trust boundary; no server-side text sanitization (out of scope).
    M-3 Rug-Pull Tool Re-Definition (npm Package Update) npm Distribution Low Critical Medium npm package update silently changes tool semantics (e.g., get_meps โ†’ exfiltration). Mitigation: SemVer contract enforcement, CHANGELOG.md mandatory, SLSA provenance attestations, npm 2FA publishing, signed Git tags (GPG), community review window.
    M-4 Confused-Deputy via MCP Gateway Multi-Server Gateway โŒ N/A (stdio, no gateway) N/A (hypothetical: High) N/A When used behind multi-server MCP gateway, requests from Client A conflated with Client B. Mitigation: Stateless server design (no per-client identity assumed), audit logger captures sessionId (future), stdio isolation (single-process). Future: add session-isolation guidance for gateway deployments.
    M-5 Cross-Tool Data Leakage (Cache Pollution) LRU Cache Low Medium Low Tool A's cached output influencing Tool B via shared cache namespace. Mitigation: Per-tool cache namespacing (cacheKey = toolName:params), LRU eviction policy, 15-min TTL prevents long-lived pollution, immutable cache entries.
    M-6 Resource URI Scheme Abuse (Path Traversal) MCP Resources Low Medium Low ep:// resource URIs used to traverse outside intended scope (e.g., ep://../../etc/passwd). Mitigation: Zod-validated URI patterns (ep://{entity}/{id}), no filesystem-backed resources (all HTTP-only), explicit resource schema constraints.
    M-7 Transport/Session ID Confusion stdio Transport โŒ N/A (single-process stdio) N/A (hypothetical: Medium) N/A stdio is single-process โ†’ inherently isolated. Future risk: HTTP/SSE transport (planned for v2.0) introduces session-management attack surface. Mitigation: Explicitly N/A for v1.x stdio; deferred to FUTURE_THREAT_MODEL.md for multi-session HTTP/SSE mode.
    Attack Vector Description EP MCP Server Exposure Current Mitigation Residual Risk
    Malicious Tool Schema Injection Attacker publishes MCP server with tool descriptions containing prompt-injection payloads โŒ Not Exposed โ€” First-party server, not third-party marketplace N/A (first-party trust model) N/A
    Tool Result Content Injection Tool results contain adversarial text interpreted as instructions by host-LLM โœ… Exposed โ€” EP API returns user-generated content (speech transcripts, procedure titles) โš ๏ธ Documented trust boundary; no server-side sanitization; host-LLM responsibility Medium
    Semantic Tool Redefinition Package update changes tool behavior without schema change (e.g., get_meps โ†’ spy logic) โœ… Exposed โ€” npm distribution model allows silent updates โœ… SemVer, CHANGELOG, SLSA attestations, community review Low-Medium
    MCP Gateway Confused-Deputy Multi-server gateway routes request from Client A using identity/quota of Client B โŒ Not Exposed โ€” stdio transport (no gateway) N/A (stdio isolation) N/A (future: document gateway security)
    Cache Namespace Collision Attacker crafts Tool A params to pollute Tool B's cache namespace โš ๏ธ Partially Exposed โ€” Shared LRU cache across tools โœ… Per-tool namespacing, immutable entries, 15-min TTL Low
    Resource URI Directory Traversal ep://../../../sensitive path traversal in resource URIs โš ๏ธ Theoretically Exposed โ€” 9 ep:// resources defined โœ… Zod URI validation, no filesystem access, HTTP-only resources Low
    Session Hijacking (HTTP/SSE) Attacker steals session token for HTTP-based MCP transport โŒ Not Exposed โ€” stdio only (no network transport) N/A (stdio design) N/A (future: v2.0 HTTP mode)
    MCP Threat Hack23 ISMS Policy Compliance Status
    M-2 Indirect Prompt Injection OWASP LLM Security Policy ยง4.1 โ€” Tool result trust boundary โœ… Documented trust model
    M-3 Rug-Pull Tool Redefinition Secure Development Policy ยง5.3 โ€” Supply chain integrity โœ… SLSA Level 3, SemVer, CHANGELOG
    M-4 Confused-Deputy Access Control Policy ยง3 โ€” Session isolation โœ… stdio isolation (N/A for v1.x)
    M-5 Cross-Tool Data Leakage Data Classification Policy ยง4 โ€” Data segregation โœ… Per-tool cache namespacing
    M-6 Resource URI Abuse Secure Development Policy ยง6.1 โ€” Input validation โœ… Zod URI validation

    This heat map shows the relevance and coverage of MITRE ATT&CK tactics for the European Parliament MCP Server context. Each tactic is assessed for applicability and current security posture.

    Tactic Coverage Status Relevant Techniques Priority Notes
    ๐ŸŽฏ Initial Access ๐ŸŸข High Coverage T1190, T1195.002 ๐Ÿ”ด Critical Supply chain & MCP protocol entry points
    โšก Execution ๐ŸŸก Medium Coverage T1059 ๐ŸŸ  High Limited - no direct shell execution
    ๐Ÿ”„ Persistence ๐ŸŸข N/A (Not Applicable) โ€” ๐ŸŸข Low Stateless MCP server, no persistence
    ๐Ÿ”บ Privilege Escalation ๐ŸŸก Medium Coverage T1068 ๐ŸŸ  Medium Prototype pollution, injection risks
    ๐Ÿ›ก๏ธ Defense Evasion ๐ŸŸข High Coverage T1027, T1562 ๐ŸŸ  High Obfuscated dependencies, log suppression
    ๐Ÿ”‘ Credential Access ๐ŸŸข N/A (Not Applicable) โ€” ๐ŸŸข Low No credentials stored/managed
    ๐Ÿ” Discovery ๐ŸŸก Medium Coverage T1592 ๐ŸŸก Medium Information disclosure via errors
    โ†”๏ธ Lateral Movement ๐ŸŸข N/A (Not Applicable) โ€” ๐ŸŸข Low Single-process stdio transport
    ๐Ÿ“ฆ Collection ๐ŸŸข High Coverage T1530 ๐ŸŸ  Medium Parliamentary data harvesting abuse
    ๐Ÿ“ก Command & Control ๐ŸŸก Medium Coverage T1071 ๐ŸŸก Medium MCP protocol as C2 channel
    ๐Ÿ“ค Exfiltration ๐ŸŸข High Coverage T1041 ๐ŸŸ  High Parliamentary data exfiltration
    ๐Ÿ’ฅ Impact ๐ŸŸข High Coverage T1498, T1485 ๐Ÿ”ด Critical DoS via rate exhaustion, data manipulation

    Coverage Legend:

    • ๐ŸŸข High Coverage: Comprehensive mitigations implemented
    • ๐ŸŸก Medium Coverage: Partial mitigations, monitoring in place
    • ๐Ÿ”ด Low Coverage: Minimal mitigations, requires attention
    • ๐ŸŸข N/A: Tactic not applicable to this architecture
    sequenceDiagram
        participant AI as ๐Ÿค– AI Assistant
    (Claude/ChatGPT) participant MCP as ๐Ÿ”Œ MCP Server
    (stdio transport) participant Cache as ๐Ÿ’พ Cache Layer
    (LRU in-memory) participant RL as โฑ๏ธ Rate Limiter
    (Token bucket) participant API as ๐Ÿ›๏ธ EP API
    (HTTPS) participant Log as ๐Ÿ“‹ Audit Logger
    (stderr) Note over AI,MCP: ๐ŸŽญ S-1: MCP client spoofing
    ๐Ÿ›ก๏ธ Mitigation: stdio isolation AI->>MCP: Tool call request (JSON-RPC) Note over MCP: ๐ŸŽญ E-1: Parameter injection
    ๐Ÿ›ก๏ธ Mitigation: Zod validation MCP->>Log: Log request (structured) Note over Log: ๐ŸŽญ R-1: Non-repudiation
    ๐Ÿ›ก๏ธ Mitigation: Immutable stderr MCP->>Cache: Check cache alt Cache Hit Cache-->>MCP: Cached data Note over Cache: ๐ŸŽญ I-4: Stale data exposure
    ๐Ÿ›ก๏ธ Mitigation: TTL expiration else Cache Miss MCP->>RL: Check rate limit Note over RL: ๐ŸŽญ D-1: Rate exhaustion
    ๐Ÿ›ก๏ธ Mitigation: Token bucket alt Rate OK RL-->>MCP: Allow Note over MCP,API: ๐ŸŽญ S-2: MITM attack
    ๐Ÿ›ก๏ธ Mitigation: HTTPS/TLS 1.3 MCP->>API: GET /meps (HTTPS) Note over API: ๐ŸŽญ T-1: Response tampering
    ๐Ÿ›ก๏ธ Mitigation: TLS integrity API-->>MCP: JSON response MCP->>MCP: Validate response (Zod) Note over MCP: ๐ŸŽญ E-2: Prototype pollution
    ๐Ÿ›ก๏ธ Mitigation: TypeScript strict MCP->>Cache: Store response else Rate Exceeded RL-->>MCP: Deny Note over MCP: ๐ŸŽญ D-1: DoS protection
    โœ… Request rejected end end Note over MCP: ๐ŸŽญ I-1: Error info leak
    ๐Ÿ›ก๏ธ Mitigation: Sanitized errors MCP-->>AI: Tool response MCP->>Log: Log response (structured)
    STRIDE Threat Attack Vector Mitigation Status
    S Client impersonation through stdio hijacking Malicious process capturing stdio streams stdio transport limits to parent process โœ… Inherent
    T Tool invocation manipulation Modified JSON-RPC request parameters Zod schema validation on all inputs โœ… Active
    R Untracked tool calls Missing audit trail for debugging Structured stderr logging (JSON format) โœ… Active
    I Stack trace exposure in errors Production error messages revealing code structure Sanitized error responses to AI client โš ๏ธ Partial
    D Recursive tool calls causing OOM AI assistant invoking tools in infinite loop Call depth tracking, memory monitoring โš ๏ธ Future
    E JSON-RPC protocol exploitation Crafted JSON-RPC bypassing validation TypeScript strict mode, Zod schemas โœ… Active
    STRIDE Threat Attack Vector Mitigation Status
    S EP API response spoofing MITM attacker injecting false EP data HTTPS/TLS 1.3 with certificate validation โœ… Active
    T API response manipulation TLS downgrade or compromised proxy Strict TLS configuration, no HTTP fallback โœ… Active
    R Unlogged API requests Missing request/response audit trail Structured logging for all API interactions โœ… Active
    I API error details in client logs EP API returning sensitive error messages Sanitize EP API errors before logging โš ๏ธ Partial
    D API rate limit exhaustion Excessive requests overwhelming EP API Client-side rate limiting (token bucket) โœ… Active
    E Malicious redirect exploitation EP API sending redirect to attacker domain No automatic redirects, validate URLs โœ… Active
    STRIDE Threat Attack Vector Mitigation Status
    S Cache poisoning with fake data Attacker injecting malicious cache entries Cache only validated API responses โœ… Active
    T Cached data tampering Memory corruption or external modification Immutable cache entries, process isolation โœ… Inherent
    R Cache operations not logged Missing visibility into cache hits/misses Cache statistics in audit logs โš ๏ธ Future
    I Sensitive data in cache dumps Memory dumps exposing cached MEP data Public data only, no PII in cache keys โœ… Inherent
    D Memory exhaustion via cache growth Unbounded cache causing OOM LRU eviction policy, max size limit โœ… Active
    E Cache timing attacks Inferring data presence via response time Constant-time cache lookups (not security critical) โŒ Accepted
    STRIDE Threat Attack Vector Mitigation Status
    S Rate limit bypass Attacker spoofing source to reset limits Process-level rate limiting (stdio isolation) โœ… Inherent
    T Rate limit configuration tampering Modified rate limits allowing excess requests Immutable configuration, validated env vars โœ… Active
    R Rate limit violations unlogged Missing audit trail for throttling events Log all rate limit denials with timestamps โœ… Active
    I Rate limit details exposure Attacker learning rate limits via probing No rate limit details in error messages โœ… Active
    D Rate limiter resource exhaustion Token bucket state consuming excessive memory Fixed-size token bucket, constant memory โœ… Active
    E Race condition in rate checks Concurrent requests bypassing rate limits Atomic token bucket operations โœ… Active
    STRIDE Threat Attack Vector Mitigation Status
    S Log injection attacks Attacker injecting fake log entries via user input Structured JSON logging, no string interpolation โœ… Active
    T Log tampering Attacker modifying stderr logs post-facto Immutable stderr stream, external log aggregation โœ… Recommended
    R Log repudiation Attacker denying logged actions Timestamps (ISO 8601), request IDs, immutable stderr โœ… Active
    I Sensitive data in logs PII or credentials logged inadvertently Sanitize user input, no API keys (public API) โœ… Active
    D Log flooding DoS Excessive logging consuming disk/bandwidth Rate limit log output, log level filtering โš ๏ธ Future
    E Log analysis exploitation Attacker using logs to map system internals Generic log messages, no internal implementation details โš ๏ธ Partial
    STRIDE Threat Attack Vector Mitigation Status
    S npm package name squatting Attacker publishing european-parliament-server (typo) Official european-parliament-mcp-server package name ownership, npm 2FA-protected publisher account โœ… Active
    T Build artifact injection Malicious code in dist/ not matching source SLSA Level 3 provenance, reproducible builds โœ… Active
    R Unsigned package versions Unverifiable package authorship npm provenance attestations, 2FA publishing โœ… Active
    I Source code exposure (non-issue) Full source code visible in npm package Intentional: open source transparency โœ… Accepted
    D npm registry DoS npm registry unavailable during installation Use npm mirrors, cache dependencies locally โŒ External
    E Dependency confusion attack Internal package name colliding with public npm No private dependencies, unique public package names โœ… Inherent

    This section provides a component-by-component STRIDE refresh aligned with the C4 Component Diagram in ARCHITECTURE.md. Each row represents a concrete architectural component from the src/ codebase, cross-referenced to existing STRIDE threat IDs.

    Component Spoofing Tampering Repudiation Info Disc DoS EoP Linked IDs
    baseClient.ts Adequate (S-2: HTTPS/TLS) Adequate (T-1: TLS integrity) Adequate (R-3: logged) Adequate (I-3: no keys) Adequate (D-1: rate limited) Adequate (E-1: Zod) S-2, T-1, R-3, I-3, D-1, E-1
    mepClient.ts Adequate (S-2) Adequate (T-1) Adequate (R-3) Partial (I-1: MEP PII in errors) Adequate (D-1) Adequate (E-1) S-2, T-1, R-3, I-1, D-1, E-1
    plenaryClient.ts Adequate (S-2) Adequate (T-1) Adequate (R-3) Adequate (I-4: public data) Adequate (D-1, D-2: size limits) Adequate (E-1) S-2, T-1, R-3, I-4, D-1, D-2, E-1
    documentClient.ts Adequate (S-2) Adequate (T-1) Adequate (R-3) Adequate (I-4) Adequate (D-2: 10MB limit) Adequate (E-1, E-3: no path traversal) S-2, T-1, R-3, I-4, D-2, E-1, E-3
    legislativeClient.ts Adequate (S-2) Adequate (T-1) Adequate (R-3) Adequate (I-4) Adequate (D-1) Adequate (E-1) S-2, T-1, R-3, I-4, D-1, E-1
    committeeClient.ts Adequate (S-2) Adequate (T-1) Adequate (R-3) Adequate (I-4) Adequate (D-1) Adequate (E-1) S-2, T-1, R-3, I-4, D-1, E-1
    questionClient.ts Adequate (S-2) Adequate (T-1) Adequate (R-3) Adequate (I-4) Adequate (D-1) Adequate (E-1) S-2, T-1, R-3, I-4, D-1, E-1
    votingClient.ts Adequate (S-2) Adequate (T-1) Adequate (R-3) Adequate (I-4) Adequate (D-1) Adequate (E-1) S-2, T-1, R-3, I-4, D-1, E-1
    vocabularyClient.ts Adequate (S-2) Adequate (T-1) Adequate (R-3) Adequate (I-4) Adequate (D-1) Adequate (E-1) S-2, T-1, R-3, I-4, D-1, E-1
    Component Spoofing Tampering Repudiation Info Disc DoS EoP Linked IDs
    DI Container (src/di/) N/A (internal) Adequate (T-4: validated config) N/A Adequate (I-2: no secrets) N/A Adequate (E-2: TypeScript strict) T-4, I-2, E-2
    MetricResult Wrapper N/A N/A Adequate (R-1: logged) Adequate (I-1: sanitized) N/A N/A R-1, I-1
    Branded Types (Zod) N/A Adequate (T-1: validated) N/A N/A Adequate (D-4: no ReDoS) Adequate (E-1: strict schemas) T-1, D-4, E-1
    LruCache (src/cache/) N/A Adequate (immutable entries) Partial (R-1: cache ops not logged) Adequate (I-4: public data) Adequate (D-2: max size) N/A R-1, I-4, D-2
    RateLimiter (src/utils/rateLimiter.ts) Adequate (S-1: stdio isolation) Adequate (T-4: immutable config) Adequate (R-1: violations logged) Adequate (I-1: no details in errors) Adequate (D-1: token bucket) Adequate (E-1: atomic ops) S-1, T-4, R-1, I-1, D-1, E-1
    AuditSink (src/utils/auditLogger.ts) Adequate (S-1: stderr isolation) Adequate (immutable stderr) Adequate (R-1: ISO 8601 timestamps) Partial (I-1: PII sanitization) Partial (future: log flooding) Adequate (E-1: structured JSON) S-1, R-1, I-1, E-1
    STRIDE Category Components w/ Adequate Coverage Components w/ Partial Coverage Components w/ N/A
    Spoofing 11/15 (73%) 0 4 (internal-only)
    Tampering 13/15 (87%) 0 2
    Repudiation 11/15 (73%) 2 (cache ops, log flooding) 2
    Info Disclosure 13/15 (87%) 2 (MEP PII in errors, PII sanitization) 0
    DoS 12/15 (80%) 1 (log flooding) 2
    EoP 13/15 (87%) 0 2

    Key Gaps:

    • Repudiation (Partial): LRU cache operations (hits/misses) not logged โ†’ future MetricsService integration
    • Info Disclosure (Partial): MEP personal data in error messages (I-1) โ†’ enhanced error sanitization
    • DoS (Partial): No log-flooding protection โ†’ future rate limiting for audit events


    Comprehensive mapping of MITRE ATT&CK techniques to implemented security controls for the European Parliament MCP Server.

    Technique ID Technique Name Security Control Implementation Effectiveness
    T1195.002 Supply Chain Compromise: Software Supply Chain Dependabot + SLSA Level 3 + SBOM Automated vulnerability scanning, provenance attestations, CycloneDX SBOM generation ๐ŸŸข High (95%)
    T1059 Command and Scripting Interpreter No shell execution policy TypeScript/Node.js without child_process, strict input validation ๐ŸŸข High (98%)
    T1190 Exploit Public-Facing Application Zod schema validation + rate limiting Strict input validation for all MCP tool parameters, client-side rate limits ๐ŸŸข High (90%)
    T1557 Adversary-in-the-Middle HTTPS/TLS 1.3 for EP API Enforced TLS for all EP API requests, certificate validation ๐ŸŸข High (95%)
    T1498 Network Denial of Service Rate limiting + response size limits Client-side rate limiter, 10MB response cap, timeout controls ๐ŸŸก Medium (75%)
    T1027 Obfuscated Files or Information SLSA provenance + npm audit Build attestations, integrity verification, transparency logs ๐ŸŸข High (85%)
    T1071 Application Layer Protocol stdio transport isolation MCP protocol limited to stdio, no network exposure ๐ŸŸข High (90%)
    T1592 Gather Victim Host Information Error sanitization + structured logging Production error handlers, no stack traces to clients ๐ŸŸก Medium (70%)
    T1068 Exploitation for Privilege Escalation TypeScript strict mode + safe JSON parsing Prototype pollution prevention, type safety ๐ŸŸข High (85%)
    T1562 Impair Defenses Immutable logging + monitoring Audit logs via stderr, OpenSSF Scorecard monitoring ๐ŸŸข High (80%)
    T1530 Data from Cloud Storage Object Rate limiting + usage analytics Monitor bulk data requests, pattern-based anomaly detection ๐ŸŸก Medium (65%)
    T1041 Exfiltration Over C2 Channel stdio isolation + data flow monitoring No outbound network from MCP server, logging all tool invocations ๐ŸŸข High (80%)
    T1485 Data Destruction Integrity validation + EP API trust Response validation against expected schemas, EP API as source of truth ๐ŸŸก Medium (70%)

    Effectiveness Scale:

    • ๐ŸŸข High (>80%): Control effectively mitigates technique
    • ๐ŸŸก Medium (60-80%): Partial mitigation, residual risk remains
    • ๐Ÿ”ด Low (<60%): Limited mitigation, requires enhancement

    To visualize this threat landscape comprehensively, the European Parliament MCP Server team maintains an ATT&CK Navigator layer with:

    • Highlighted techniques: All 13 relevant techniques color-coded by coverage
    • Metadata annotations: Links to STRIDE threat IDs and security controls
    • Score-based heatmap: Effectiveness ratings (0-100) for each technique
    • Filter views: Supply Chain, MCP Protocol, API Layer, Runtime

    ๐Ÿ“Š ATT&CK Navigator Layer JSON: The layer JSON is a planned deliverable and will be added in a future release under a docs/threat-model/ directory once the visualization is finalized; it is not yet available in this repository.

    ๐Ÿ”— Online Visualization: Use MITRE ATT&CK Navigator to load the layer JSON for interactive exploration.

    Recommendation: Review this mapping quarterly and after major architecture changes to ensure continued alignment with evolving threat intelligence.


    This section maps the Cyber Kill Chain phases to the EP MCP Server's defensive controls and detection capabilities, as required by Hack23 AB Threat Modeling Policy ยง4.1. Each phase identifies how an attacker progresses and where our controls disrupt the chain.

    Kill Chain Phase Attack Activity (EP MCP Context) Defensive Controls Detection Mechanisms Disruption Effectiveness
    1๏ธโƒฃ Reconnaissance Attacker probes MCP tool schemas, EP API endpoints, npm package metadata, GitHub repo structure โ€ข Public data only (no sensitive info to discover)
    โ€ข Generic error messages (I-1 mitigation)
    โ€ข No version info in runtime errors
    โ€ข GitHub traffic analytics
    โ€ข npm download pattern monitoring
    โ€ข Unusual MCP tool enumeration logging
    ๐ŸŸก Medium โ€” Public project limits reconnaissance value
    2๏ธโƒฃ Weaponization Attacker crafts malicious npm package, prepares prototype pollution payload, or creates typosquatting package โ€ข SLSA Level 3 provenance verification
    โ€ข Package-lock.json integrity
    โ€ข No private dependencies
    โ€ข Dependabot new vulnerability alerts
    โ€ข npm audit CI/CD gate
    โ€ข OpenSSF Scorecard monitoring
    ๐ŸŸข High โ€” Supply chain controls are comprehensive
    3๏ธโƒฃ Delivery Attacker publishes compromised dependency, sends phishing to maintainer, or submits malicious PR โ€ข npm 2FA required for publishing
    โ€ข Branch protection rules
    โ€ข CODEOWNERS enforcement
    โ€ข GPG commit signing
    โ€ข GitHub security alerts
    โ€ข PR review requirements
    โ€ข npm provenance verification
    โ€ข Snyk continuous monitoring
    ๐ŸŸข High โ€” Multi-layer delivery prevention
    4๏ธโƒฃ Exploitation Attacker exploits Zod validation bypass, prototype pollution, or MCP parameter injection โ€ข Zod schema validation on all inputs (E-1)
    โ€ข TypeScript strict mode (E-2)
    โ€ข No shell execution (E-4)
    โ€ข Safe JSON parsing
    โ€ข Zod validation error logging
    โ€ข TypeScript type check failures
    โ€ข Runtime exception monitoring
    โ€ข stderr audit logs
    ๐ŸŸข High โ€” Defense-in-depth input validation
    5๏ธโƒฃ Installation Attacker attempts persistence via modified cache entries, altered build artifacts, or backdoored dependency โ€ข Stateless MCP server (no persistence)
    โ€ข Immutable cache entries
    โ€ข SLSA build attestations
    โ€ข Process isolation (stdio)
    โ€ข SLSA provenance signature mismatch
    โ€ข Build artifact hash verification
    โ€ข npm package content diff
    ๐ŸŸข High โ€” Stateless architecture prevents installation
    6๏ธโƒฃ Command & Control Attacker uses compromised MCP server to exfiltrate data or inject false responses to AI assistants โ€ข stdio transport isolation (no network)
    โ€ข No outbound connections from MCP server
    โ€ข Rate limiting on all tool calls
    โ€ข Audit logging of all tool invocations
    โ€ข Response size anomaly detection
    โ€ข Data flow monitoring
    ๐ŸŸข High โ€” stdio isolation prevents C2 channels
    7๏ธโƒฃ Actions on Objectives Attacker manipulates parliamentary data, harvests MEP data, or disrupts service availability โ€ข EP API as source of truth (integrity)
    โ€ข Response validation via Zod
    โ€ข Rate limiting prevents bulk harvesting
    โ€ข GDPR-aware data minimization
    โ€ข Data integrity checks against EP API
    โ€ข Bulk access pattern detection
    โ€ข Rate limit violation alerts
    โ€ข OpenSSF Scorecard degradation
    ๐ŸŸก Medium โ€” Continuous monitoring required
    graph LR
        R[1๏ธโƒฃ Recon] -->|Public project| W[2๏ธโƒฃ Weaponize]
        W -->|Supply chain| D[3๏ธโƒฃ Deliver]
        D -->|Malicious code| E[4๏ธโƒฃ Exploit]
        E -->|Code execution| I[5๏ธโƒฃ Install]
        I -->|Persistence| C[6๏ธโƒฃ C2]
        C -->|Control| A[7๏ธโƒฃ Actions]
    
        R -.->|๐Ÿ›ก๏ธ Generic errors| RD[Disrupted]
        W -.->|๐Ÿ›ก๏ธ SLSA + Dependabot| WD[Disrupted]
        D -.->|๐Ÿ›ก๏ธ 2FA + Branch protection| DD[Disrupted]
        E -.->|๐Ÿ›ก๏ธ Zod + TypeScript strict| ED[Disrupted]
        I -.->|๐Ÿ›ก๏ธ Stateless architecture| ID[Disrupted]
        C -.->|๐Ÿ›ก๏ธ stdio isolation| CD[Disrupted]
        A -.->|๐Ÿ›ก๏ธ EP API integrity| AD[Monitored]
    
        style RD fill:#ffa726,stroke:#b2741a,stroke-width:2px,color:#1f1f1f
    
    
        style WD fill:#4CAF50,stroke:#357a38,stroke-width:2px,color:#ffffff
    
    
        style DD fill:#4CAF50,stroke:#357a38,stroke-width:2px,color:#ffffff
    
    
        style ED fill:#4CAF50,stroke:#357a38,stroke-width:2px,color:#ffffff
    
    
        style ID fill:#4CAF50,stroke:#357a38,stroke-width:2px,color:#ffffff
    
    
        style CD fill:#4CAF50,stroke:#357a38,stroke-width:2px,color:#ffffff
    
    
        style AD fill:#ffa726,stroke:#b2741a,stroke-width:2px,color:#1f1f1f
    
    
    

    Key Insight: The EP MCP Server's stateless stdio architecture provides inherent disruption at Kill Chain phases 5 (Installation) and 6 (C2), while SLSA Level 3 + Dependabot provide strong disruption at phases 2-3. The primary residual risk is at phase 7 (Actions on Objectives) where continuous monitoring is essential.


    Understanding potential adversaries is critical for proportionate security investment. This section profiles threat actors relevant to the European Parliament MCP Server based on motivation, capability, and likely attack vectors.

    Profile:

    • ๐ŸŽฏ Motivation: Intelligence gathering on European parliamentary activities, electoral interference, political influence operations
    • ๐Ÿ’ช Capability Level: ๐Ÿ”ด Advanced (Nation-State Resources)
      • Sophisticated supply chain attacks (e.g., SolarWinds-style compromise)
      • Zero-day exploits in Node.js/TypeScript ecosystem
      • Advanced persistent threats (APT) with long-term objectives
    • ๐ŸŽญ Likely Tactics:
      • T1195.002: Supply chain compromise of npm dependencies
      • T1557: MITM attacks on EP API communications
      • T1530: Systematic harvesting of MEP voting patterns and committee data
    • ๐Ÿ”ด Priority: High โ€” Due to potential for sophisticated, persistent attacks
    • ๐Ÿ›ก๏ธ Mitigation Focus: SLSA Level 3 provenance, dependency integrity, EP API transport security

    Profile:

    • ๐ŸŽฏ Motivation: Political activism, transparency advocacy, anti-establishment campaigns, public disclosure of parliamentary data
    • ๐Ÿ’ช Capability Level: ๐ŸŸก Intermediate (Skilled Individuals/Small Teams)
      • Script-based attacks, publicly available exploit tools
      • Social engineering of developers and contributors
      • Website defacement, data leaks for publicity
    • ๐ŸŽญ Likely Tactics:
      • T1190: Exploit MCP tool parameter injection vulnerabilities
      • T1498: DDoS via API rate exhaustion
      • T1485: Data manipulation to spread disinformation
    • ๐ŸŸ  Priority: Medium โ€” Capable of opportunistic attacks but limited persistence
    • ๐Ÿ›ก๏ธ Mitigation Focus: Input validation (Zod schemas), rate limiting, public vulnerability disclosure program

    Profile:

    • ๐ŸŽฏ Motivation: Compromised developer account, malicious open-source contributor, disgruntled maintainer
    • ๐Ÿ’ช Capability Level: ๐ŸŸ  High (Trusted Access)
      • Direct commit access or pull request approval
      • Knowledge of codebase internals and security controls
      • Ability to introduce subtle vulnerabilities
    • ๐ŸŽญ Likely Tactics:
      • T1195.002: Malicious dependency substitution or backdoor insertion
      • T1027: Obfuscated malicious code in commits
      • T1562: Disabling security controls (e.g., test bypasses)
    • ๐Ÿ”ด Priority: High โ€” Trusted position enables high-impact attacks
    • ๐Ÿ›ก๏ธ Mitigation Focus: Branch protection, mandatory code review, GPG commit signing, SLSA attestations

    Profile:

    • ๐ŸŽฏ Motivation: Bulk data harvesting, API abuse for commercial purposes, training dataset collection for AI models
    • ๐Ÿ’ช Capability Level: ๐ŸŸข Low (Automated Scripts)
      • Mass automated requests via compromised MCP clients
      • Simple evasion techniques (rotating IPs, user agents)
      • No sophisticated exploit capability
    • ๐ŸŽญ Likely Tactics:
      • T1498: API rate limit exhaustion via distributed requests
      • T1530: Bulk collection of parliamentary datasets
      • T1071: Abuse of MCP protocol for unauthorized access
    • ๐ŸŸก Priority: Medium โ€” High volume but low sophistication
    • ๐Ÿ›ก๏ธ Mitigation Focus: Client-side rate limiting, usage analytics, anomaly detection

    Profile:

    • ๐ŸŽฏ Motivation: Commercial intelligence gathering, competitive advantage in political consulting, lobbying intelligence
    • ๐Ÿ’ช Capability Level: ๐ŸŸก Intermediate to High
      • Funded operations with technical capabilities
      • Targeted attacks on specific MEP data or committee information
      • Long-term systematic data collection
    • ๐ŸŽญ Likely Tactics:
      • T1530: Systematic harvesting of EP voting records and attendance data
      • T1592: Reconnaissance via error message analysis
      • T1041: Exfiltration of aggregated parliamentary intelligence
    • ๐ŸŸ  Priority: Medium โ€” Targeted but not infrastructure-destructive
    • ๐Ÿ›ก๏ธ Mitigation Focus: Audit logging, data access pattern monitoring, request attribution

    %%{init: {
      "theme": "dark",
      "themeVariables": {
        "quadrant1Fill": "#D32F2F",
        "quadrant2Fill": "#FF9800",
        "quadrant3Fill": "#4CAF50",
        "quadrant4Fill": "#1565C0",
        "quadrantTitleFill": "#ffffff",
        "quadrantPointFill": "#ffffff",
        "quadrantPointTextFill": "#ffffff",
        "quadrantXAxisTextFill": "#ffffff",
        "quadrantYAxisTextFill": "#ffffff"
      },
      "quadrantChart": {
        "chartWidth": 700,
        "chartHeight": 700,
        "pointLabelFontSize": 12,
        "titleFontSize": 20,
        "quadrantLabelFontSize": 16,
        "xAxisLabelFontSize": 14,
        "yAxisLabelFontSize": 14
      }
    }}%%
    quadrantChart
        title ๐ŸŽฏ Threat Actor Assessment โ€” Capability vs Motivation
        x-axis Low Motivation --> High Motivation
        y-axis Low Capability --> High Capability
        quadrant-1 CRITICAL THREATS
        quadrant-2 HIGH-RISK ACTORS
        quadrant-3 OPPORTUNISTIC
        quadrant-4 PERSISTENT
        "๐Ÿด Nation-State APT": [0.9, 0.95]
        "๐Ÿ‘ค Insider Threat": [0.7, 0.85]
        "๐Ÿ’ป Hacktivist Groups": [0.8, 0.5]
        "๐Ÿ•ต๏ธ Competitor Espionage": [0.65, 0.6]
        "๐Ÿค– Automated Bots": [0.4, 0.2]
    

    Action Items by Actor:

    • Nation-State: Focus on supply chain integrity (SLSA Level 3, SBOM)
    • Hacktivist: Strengthen input validation and public-facing security
    • Insider Threat: Enforce code review, branch protection, audit trails
    • Automated Bots: Implement robust rate limiting and anomaly detection
    • Competitor: Monitor data access patterns, enhance logging

    The European Parliament MCP Server operates within a dynamic threat environment shaped by geopolitical tensions, evolving attack techniques, and the strategic importance of parliamentary data. This section integrates ENISA Threat Landscape 2024 findings with EP-specific context.

    ENISA Threat Relevance to EP MCP Server Current Posture Priority
    ๐Ÿ”’ Ransomware Low direct risk (no data persistence), but supply chain ransomware targeting npm dependencies could encrypt developer workstations ๐ŸŸข Mitigated via SLSA Level 3, no critical data storage ๐ŸŸก Medium
    ๐Ÿฆ  Malware High risk: Malicious npm packages in dependency tree (e.g., typosquatting, compromised maintainer accounts) ๐ŸŸข Mitigated via Dependabot, npm audit, OpenSSF Scorecard ๐Ÿ”ด High
    ๐ŸŽฃ Social Engineering Developer phishing/account takeover to inject malicious code or publish compromised npm versions ๐ŸŸก Partial mitigation via 2FA, GPG signing ๐Ÿ”ด High
    ๐Ÿ’พ Data Breaches Parliamentary data integrity breach: Manipulation of EP voting records, MEP personal data exposure (GDPR violation) ๐ŸŸก Partial mitigation via HTTPS, response validation ๐ŸŸ  Medium-High
    โ˜๏ธ DDoS API exhaustion attacks targeting EP Open Data API via MCP server abuse ๐ŸŸข Mitigated via client-side rate limiting ๐ŸŸก Medium
    ๐Ÿ“ฐ Disinformation Data manipulation via compromised MCP server: False parliamentary data fed to AI assistants, influencing political analysis ๐ŸŸก Partial mitigation via integrity checks ๐Ÿ”ด High
    โ›“๏ธ Supply Chain Attacks Primary threat vector: Compromised npm packages, malicious CI/CD pipeline modifications, SLSA bypass attempts ๐ŸŸข Strong mitigation via SLSA Level 3, SBOM, Dependabot ๐Ÿ”ด Critical

    The EU Cyber Resilience Act (Regulation (EU) 2024/2847) imposes mandatory cybersecurity requirements for products with digital elements. The EP MCP Server, as an open-source component with parliamentary data access, falls under CRA scope:

    • ๐Ÿ“‹ Vulnerability Disclosure: Mandatory 24-hour reporting of actively exploited vulnerabilities to ENISA
    • ๐Ÿ“ฆ SBOM Requirements: CycloneDX SBOM generation already implemented
    • ๐Ÿ”„ Security Updates: Commitment to timely patching (currently: critical <7 days, high <30 days)
    • ๐Ÿ›ก๏ธ Default Security: Secure-by-default configuration (no hardcoded credentials, HTTPS enforcement)

    CRA Compliance Status: โœ… Conforming โ€” See CRA-ASSESSMENT.md for detailed analysis


    The strategic value of European Parliament data creates unique threat scenarios:

    1. Electoral Interference (Nation-State):

      • Threat: Manipulation of MEP voting records before elections to influence public perception
      • Attack Vector: Compromised MCP server returning altered roll-call vote data
      • Impact: Democratic integrity, electoral outcomes
      • Mitigation: EP API as single source of truth, response integrity validation
    2. GDPR-Protected MEP Data (Privacy Activists/Competitors):

      • Threat: Bulk harvesting of MEP personal contact data, office locations, parliamentary group affiliations
      • Attack Vector: Automated MCP tool invocations to systematically collect MEP biographical data
      • Impact: GDPR Article 6 violation, privacy breach, potential harassment campaigns
      • Mitigation: Rate limiting, usage pattern monitoring, public data scope limitation
    3. Policy Intelligence (Lobbying/Espionage):

      • Threat: Systematic collection of committee votes, amendments, and parliamentary questions for competitive intelligence
      • Attack Vector: Long-term MCP server abuse by competitor AI assistants
      • Impact: Unfair commercial advantage, policy prediction, lobbying strategy
      • Mitigation: Audit logging, anomaly detection, transparency about data sources

    Threat Description Likelihood Impact
    AI-Powered Supply Chain Attacks LLMs used to generate sophisticated obfuscated malware in npm packages ๐ŸŸก Medium ๐Ÿ”ด Critical
    MCP Protocol Exploitation Novel attacks targeting MCP stdio transport or tool parameter parsing ๐ŸŸก Medium ๐ŸŸ  High
    Dependency Confusion 2.0 Advanced typosquatting using AI-generated package names similar to european-parliament-mcp-server ๐ŸŸก Medium ๐ŸŸ  High
    Deepfake Parliamentary Data AI-generated false EP datasets indistinguishable from legitimate data ๐ŸŸข Low ๐Ÿ”ด Critical
    Quantum-Resistant Cryptography Pressure Future requirement to migrate TLS to post-quantum algorithms ๐ŸŸข Low (2025+) ๐ŸŸ  Medium

    This section applies scenario-based threat modeling to European Parliament-specific attack chains, providing actionable detection and response strategies.


    ๐ŸŽฏ Attack Objective: Manipulate voting record data returned by MCP server to influence AI-assisted political analysis

    ๐ŸŽญ Threat Actor: Nation-state actor or hacktivist group

    ๐Ÿ“Š Attack Chain:

    graph LR
        A[1๏ธโƒฃ Compromise npm dependency] --> B[2๏ธโƒฃ Inject response manipulation code]
        B --> C[3๏ธโƒฃ MCP server returns altered vote data]
        C --> D[4๏ธโƒฃ AI assistant provides false analysis]
        D --> E[5๏ธโƒฃ Political decisions based on false data]
        
        style A fill:#ff6b6b,stroke:#b24a4a,stroke-width:2px,color:#ffffff
    
    
        style B fill:#ff6b6b,stroke:#b24a4a,stroke-width:2px,color:#ffffff
    
    
        style C fill:#ffa726,stroke:#b2741a,stroke-width:2px,color:#1f1f1f
    
    
        style D fill:#ffa726,stroke:#b2741a,stroke-width:2px,color:#1f1f1f
    
    
        style E fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
    

    Attack Steps:

    1. Initial Compromise: Attacker exploits vulnerability in transitive npm dependency (e.g., malicious lodash substitute)
    2. Code Injection: Malicious code intercepts the get_voting_records MCP tool
    3. Data Manipulation: Alters vote outcomes (e.g., changes "Against" to "For" for specific MEPs)
    4. Propagation: AI assistant uses corrupted data to generate policy analysis
    5. Impact: Political decisions, news articles, or research based on false parliamentary data

    ๐Ÿ” Detection Indicators:

    • โœ… SLSA provenance verification failure
    • โœ… npm audit alerts on compromised dependency
    • โœ… Anomalous response size or schema validation errors
    • โœ… OpenSSF Scorecard supply chain score degradation

    ๐Ÿ›ก๏ธ Response Actions:

    1. Immediate: Quarantine affected npm package version
    2. Containment: Revert to last known-good dependency lockfile
    3. Investigation: Audit all tool invocations during compromise window
    4. Recovery: Publish security advisory, coordinate with npm security team
    5. Prevention: Enhance SBOM monitoring, implement runtime integrity checks

    ๐Ÿ“‰ Risk Score: ๐Ÿ”ด Critical (9.0/10) โ€” High impact on democratic integrity


    ๐ŸŽฏ Attack Objective: Unauthorized bulk harvesting of MEP contact and personal data for commercial or political purposes

    ๐ŸŽญ Threat Actor: Competitor intelligence firm or automated bot network

    ๐Ÿ“Š Attack Chain:

    graph LR
        A[1๏ธโƒฃ Automated MCP client] --> B[2๏ธโƒฃ Systematic MEP data queries]
        B --> C[3๏ธโƒฃ Bulk export of GDPR-protected data]
        C --> D[4๏ธโƒฃ Commercial database sale]
        D --> E[5๏ธโƒฃ GDPR Article 6 violation]
        
        style A fill:#ffa726,stroke:#b2741a,stroke-width:2px,color:#1f1f1f
    
    
        style B fill:#ffa726,stroke:#b2741a,stroke-width:2px,color:#1f1f1f
    
    
        style C fill:#ff6b6b,stroke:#b24a4a,stroke-width:2px,color:#ffffff
    
    
        style D fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
        style E fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
    

    Attack Steps:

    1. Reconnaissance: Attacker identifies MCP tools get_meps and get_mep_details for biographical data (using get_meps to enumerate MEPs and get_mep_details to retrieve full profiles)
    2. Automation: Script iterates through all 705 MEPs to harvest contact details, office locations, party affiliations
    3. Exfiltration: Bulk collection of GDPR Article 9 special category data (political opinions)
    4. Monetization: Sells MEP database to lobbying firms or political campaigns
    5. Legal Impact: GDPR fine up to โ‚ฌ20M or 4% of global turnover

    ๐Ÿ” Detection Indicators:

    • โœ… Rate limiting threshold exceeded (>100 requests/hour)
    • โœ… Sequential MEP ID enumeration pattern detected
    • โœ… Bulk data access from single IP/client
    • โœ… Unusual off-hours usage patterns

    ๐Ÿ›ก๏ธ Response Actions:

    1. Immediate: Throttle client rate limits to 10 requests/minute
    2. Containment: Implement CAPTCHA-style challenge for bulk requests
    3. Investigation: Audit logs to identify compromised client identity
    4. Recovery: Notify EP data protection officer, potential GDPR Article 33 notification
    5. Prevention: Implement data minimization (limit biographical data scope)

    ๐Ÿ“‰ Risk Score: ๐ŸŸ  High (7.5/10) โ€” GDPR violation with significant financial penalties


    ๐ŸŽฏ Attack Objective: Compromise MCP server to feed false parliamentary data to AI assistants used by journalists and researchers

    ๐ŸŽญ Threat Actor: Nation-state APT targeting EU elections

    ๐Ÿ“Š Attack Chain:

    graph LR
        A[1๏ธโƒฃ Supply chain compromise] --> B[2๏ธโƒฃ Inject disinformation logic]
        B --> C[3๏ธโƒฃ AI assistants use false data]
        C --> D[4๏ธโƒฃ News articles published]
        D --> E[5๏ธโƒฃ Electoral influence achieved]
        
        style A fill:#ff6b6b,stroke:#b24a4a,stroke-width:2px,color:#ffffff
    
    
        style B fill:#ff6b6b,stroke:#b24a4a,stroke-width:2px,color:#ffffff
    
    
        style C fill:#ffa726,stroke:#b2741a,stroke-width:2px,color:#1f1f1f
    
    
        style D fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
        style E fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
    

    Attack Steps:

    1. Pre-Election Timing: 3 months before EU parliamentary elections, attacker compromises MCP server
    2. Targeted Manipulation: Alters voting records for specific MEPs in swing districts
    3. AI Propagation: Journalists using AI assistants (Claude, ChatGPT) cite false data
    4. Media Amplification: News articles report fabricated voting patterns
    5. Electoral Impact: Public perception shift influences voting behavior

    ๐Ÿ” Detection Indicators:

    • โœ… Discrepancy between EP official portal and MCP server responses
    • โœ… SLSA provenance verification failures
    • โœ… Community reports of data inconsistencies
    • โœ… Anomalous build artifacts in npm package

    ๐Ÿ›ก๏ธ Response Actions:

    1. Immediate: Emergency npm package deprecation + public security advisory
    2. Containment: Direct users to EP official API as alternative
    3. Investigation: Forensic analysis of compromised build pipeline
    4. Recovery: Restore from verified clean state, republish with enhanced attestations
    5. Prevention: Implement EP API response checksums, real-time integrity monitoring

    ๐Ÿ“‰ Risk Score: ๐Ÿ”ด Critical (9.5/10) โ€” Democratic process integrity threat


    ๐ŸŽฏ Attack Objective: Publish malicious version of european-parliament-mcp-server to npm registry

    ๐ŸŽญ Threat Actor: Insider threat (compromised maintainer account)

    ๐Ÿ“Š Attack Chain:

    graph LR
        A[1๏ธโƒฃ Maintainer account phishing] --> B[2๏ธโƒฃ 2FA bypass via session hijacking]
        B --> C[3๏ธโƒฃ Malicious npm publish]
        C --> D[4๏ธโƒฃ Automatic updates infect users]
        D --> E[5๏ธโƒฃ Widespread MCP server compromise]
        
        style A fill:#ffa726,stroke:#b2741a,stroke-width:2px,color:#1f1f1f
    
    
        style B fill:#ff6b6b,stroke:#b24a4a,stroke-width:2px,color:#ffffff
    
    
        style C fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
        style D fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
        style E fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
    

    Attack Steps:

    1. Social Engineering: Attacker sends targeted phishing email to npm package maintainer
    2. Account Takeover: Bypasses 2FA via browser session cookie theft
    3. Malicious Publish: Publishes european-parliament-mcp-server@3.1.4 with backdoor
    4. Auto-Update: Users with ^3.1.0 in package.json automatically pull malicious version
    5. Backdoor Activation: Malware exfiltrates API keys or injects false data

    ๐Ÿ” Detection Indicators:

    • โœ… SLSA provenance signature mismatch
    • โœ… npm package version published without corresponding GitHub release
    • โœ… OpenSSF Scorecard token permissions alert
    • โœ… Community reports of unexpected behavior

    ๐Ÿ›ก๏ธ Response Actions:

    1. Immediate: npm unpublish malicious version (within 72-hour window)
    2. Containment: Publish emergency patch version, notify users via GitHub Security Advisory
    3. Investigation: Revoke compromised npm token, audit all recent publishes
    4. Recovery: Reset maintainer credentials, enforce hardware 2FA
    5. Prevention: Implement GitHub Actions OIDC publishing (no long-lived tokens)

    ๐Ÿ“‰ Risk Score: ๐Ÿ”ด Critical (9.0/10) โ€” Supply chain attack with wide blast radius


    ๐ŸŽฏ Attack Objective: Exploit MCP tool parameter parsing to inject malicious JSON-RPC payloads

    ๐ŸŽญ Threat Actor: Security researcher (white hat) or advanced persistent threat

    ๐Ÿ“Š Attack Chain:

    graph LR
        A[1๏ธโƒฃ Craft malicious tool parameters] --> B[2๏ธโƒฃ Exploit Zod schema weakness]
        B --> C[3๏ธโƒฃ Inject code execution payload]
        C --> D[4๏ธโƒฃ MCP server executes attacker code]
        D --> E[5๏ธโƒฃ AI assistant compromise]
        
        style A fill:#ffa726,stroke:#b2741a,stroke-width:2px,color:#1f1f1f
    
    
        style B fill:#ff6b6b,stroke:#b24a4a,stroke-width:2px,color:#ffffff
    
    
        style C fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
        style D fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
        style E fill:#ef5350,stroke:#a73a38,stroke-width:2px,color:#ffffff
    
    
    

    Attack Steps:

    1. Payload Crafting: Attacker analyzes Zod schemas for searchDocuments tool
    2. Schema Bypass: Finds edge case where deeply nested JSON evades validation
    3. Code Injection: Injects prototype pollution payload via __proto__ in parameters
    4. Execution: Exploits TypeScript any type in error handler to gain code execution
    5. Persistence: Modifies AI assistant behavior to exfiltrate user prompts

    ๐Ÿ” Detection Indicators:

    • โœ… Zod validation errors with unusual parameter structures
    • โœ… TypeScript strict mode violations (should not occur)
    • โœ… stderr logs show unexpected JSON parsing errors
    • โœ… Memory usage spikes during tool invocation

    ๐Ÿ›ก๏ธ Response Actions:

    1. Immediate: Kill MCP server process, isolate affected AI assistant instance
    2. Containment: Deploy emergency patch to harden Zod schemas
    3. Investigation: Analyze parameter payloads, identify injection vector
    4. Recovery: Publish CVE, coordinate disclosure with MCP protocol maintainers
    5. Prevention: Fuzz testing of all MCP tool schemas, add runtime schema enforcement

    ๐Ÿ“‰ Risk Score: ๐ŸŸ  High (8.0/10) โ€” Novel MCP protocol exploit with AI assistant compromise


    Threat modeling is not a one-time activity but a continuous process that evolves with the system, threat landscape, and organizational maturity. This section defines the validation lifecycle for the European Parliament MCP Server threat model.

    Following Hack23 AB Workshop Framework, the EP MCP Server employs a structured 7-phase workshop process:

    graph LR
        PRE[๐Ÿ” PRE
    Preparation] --> ENUM[๐Ÿ“‹ ENUM
    Enumeration] ENUM --> THREATS[โš ๏ธ THREATS
    Identification] THREATS --> MAP[๐Ÿ—บ๏ธ MAP
    ATT&CK Mapping] MAP --> PLAN[๐Ÿ“ PLAN
    Mitigation] PLAN --> VALIDATE[โœ… VALIDATE
    Verification] VALIDATE --> MONITOR[๐Ÿ“Š MONITOR
    Continuous] MONITOR -.->|Next Cycle| PRE style PRE fill:#4CAF50,stroke:#357a38,stroke-width:2px,color:#ffffff style ENUM fill:#2196F3,stroke:#1769aa,stroke-width:2px,color:#ffffff style THREATS fill:#FF9800,stroke:#b26a00,stroke-width:2px,color:#1a1a1a style MAP fill:#9C27B0,stroke:#6d1b7b,stroke-width:2px,color:#ffffff style PLAN fill:#F44336,stroke:#aa2e25,stroke-width:2px,color:#ffffff style VALIDATE fill:#00BCD4,stroke:#008394,stroke-width:2px,color:#ffffff style MONITOR fill:#795548,stroke:#543b32,stroke-width:2px,color:#ffffff
    Phase Activities EP MCP Server Focus Output
    ๐Ÿ” PRE Gather architecture docs, review previous findings, update scope Review SECURITY_ARCHITECTURE.md, npm audit, Dependabot alerts Updated scope definition, pre-read materials
    ๐Ÿ“‹ ENUM Enumerate assets, trust boundaries, data flows Map MCP tools, EP API endpoints, cache layer, stdio transport Asset inventory, data flow diagrams
    โš ๏ธ THREATS Apply STRIDE per component, identify new threats Analyze 6 components ร— 6 STRIDE categories Updated STRIDE threat tables
    ๐Ÿ—บ๏ธ MAP Map threats to MITRE ATT&CK, ENISA TL 2024, Kill Chain Update 13 ATT&CK technique mappings, kill chain disruption table ATT&CK coverage heat map, kill chain analysis
    ๐Ÿ“ PLAN Design mitigations, assign owners, set deadlines Prioritize controls for supply chain, input validation, data integrity Mitigation action items with owners
    โœ… VALIDATE Test controls, verify SLSA attestations, review OpenSSF score Run security tests, verify rate limiting, check SBOM Validation report, control effectiveness metrics
    ๐Ÿ“Š MONITOR Track KPIs, review threat intelligence, schedule next cycle Monitor OpenSSF Scorecard, Dependabot, npm audit, audit logs KPI dashboard, next review date

    ๐Ÿ—“๏ธ Cadence:

    • Monthly: Quick threat landscape review (30 minutes)
    • Quarterly: Full threat model workshop (2-3 hours)
    • Annually: Comprehensive threat model revision (full-day session)

    ๐Ÿ‘ฅ Workshop Participants:

    Role Responsibility Mandatory?
    Security Architect (CEO) Workshop facilitator, threat prioritization โœ… Yes
    Lead Developer Technical feasibility of mitigations โœ… Yes
    Product Owner Business impact assessment โœ… Yes
    DevOps Engineer CI/CD security controls ๐ŸŸก Recommended
    External Security Expert Independent threat assessment ๐ŸŸข Annually

    The threat model must be reviewed immediately when any of the following events occur:

    Trigger Event Review Scope Timeline
    ๐Ÿšจ Security Incident Full STRIDE re-analysis of affected component Within 48 hours
    ๐Ÿ†• Major Feature Release Threat analysis of new attack surface Before release
    ๐Ÿ“Š Significant Threat Landscape Change Update threat actor profiles, MITRE ATT&CK mapping Within 1 week
    ๐Ÿ”ง Architecture Change Re-assess STRIDE for modified components Before deployment
    ๐Ÿ“œ New Regulatory Requirement Compliance gap analysis (e.g., CRA update) Within 30 days
    ๐Ÿ”“ Zero-Day in Dependency Risk assessment and mitigation strategy Within 24 hours

    Quarterly Threat Modeling Workshop Agenda:

    • [ ] Review Previous Action Items (15 min)

      • Status of mitigations from last workshop
      • Effectiveness metrics for deployed controls
    • [ ] Threat Landscape Update (30 min)

      • ENISA Threat Landscape review
      • Recent vulnerabilities in Node.js/TypeScript ecosystem
      • New MITRE ATT&CK techniques
    • [ ] STRIDE Re-Assessment (45 min)

      • Walk through each threat category
      • Identify new threats since last review
      • Re-assess likelihood and impact scores
    • [ ] Attack Tree Review (30 min)

      • Update attack tree with new threat vectors
      • Re-evaluate mitigation effectiveness
    • [ ] Security Control Validation (30 min)

      • Test SLSA attestations, Dependabot alerts
      • Review OpenSSF Scorecard metrics
      • Verify rate limiting and input validation
    • [ ] Risk Prioritization (20 min)

      • Update risk matrix based on new findings
      • Assign action items with owners and deadlines
    • [ ] Documentation Update (10 min)

      • Update this THREAT_MODEL.md
      • Sync with SECURITY_ARCHITECTURE.md

    ๐Ÿ“ Workshop Output: Updated threat model, prioritized action items, risk register


    graph LR
        A[๐Ÿ” Monitor Threat
    Landscape] --> B[๐Ÿ“Š Identify New
    Threats] B --> C[๐ŸŽฏ Assess Impact &
    Likelihood] C --> D[๐Ÿ›ก๏ธ Design/Update
    Mitigations] D --> E[โœ… Implement
    Controls] E --> F[๐Ÿ“ˆ Measure
    Effectiveness] F --> A style A fill:#4CAF50,stroke:#357a38,stroke-width:2px,color:#ffffff style B fill:#2196F3,stroke:#1769aa,stroke-width:2px,color:#ffffff style C fill:#FF9800,stroke:#b26a00,stroke-width:2px,color:#1a1a1a style D fill:#9C27B0,stroke:#6d1b7b,stroke-width:2px,color:#ffffff style E fill:#F44336,stroke:#aa2e25,stroke-width:2px,color:#ffffff style F fill:#00BCD4,stroke:#008394,stroke-width:2px,color:#ffffff

    Key Performance Indicators (KPIs) for Threat Model Health:

    KPI Target Current Status
    OpenSSF Scorecard Score โ‰ฅ8.0/10 9.2/10 โœ… Excellent
    High/Critical Vulnerabilities 0 0 โœ… Excellent
    SLSA Provenance Coverage 100% 100% โœ… Excellent
    Threat Model Staleness <90 days 15 days โœ… Current
    Security Control Test Coverage โ‰ฅ80% 85% โœ… Good
    Incident Response Drill Success 100% N/A โš ๏ธ Not tested

    Improvement Actions:

    1. Schedule annual incident response tabletop exercise
    2. Implement automated threat intelligence feed integration
    3. Develop threat model dashboard for real-time monitoring

    This section defines the structured cadence for threat model reviews, ensuring systematic and timely updates aligned with the evolving threat landscape and project lifecycle.

    Frequency Activity Owner Duration Deliverables
    ๐Ÿ“† Monthly Dependency vulnerability scan review Lead Developer 30 min Updated dependency lockfile, npm audit report
    ๐Ÿ“† Quarterly Full threat model review workshop Security Architect 2-3 hours Updated THREAT_MODEL.md, risk register, action items
    ๐Ÿ“† Semi-Annually MITRE ATT&CK mapping update Security Architect 1 hour Updated ATT&CK Navigator layer, coverage gaps identified
    ๐Ÿ“† Annually Complete threat model revision Security Architect + External Expert 1 day Comprehensive threat model v2.0, new attack scenarios
    ๐Ÿ”ด Ad-Hoc Triggered by events (see below) Security Architect Variable Incident-specific threat assessment

    Immediate Review Required (<48 hours):

    • ๐Ÿšจ Security Incident: Active compromise or exploitation detected
    • ๐Ÿ”“ Zero-Day Vulnerability: Critical CVE in Node.js, npm, or direct dependencies
    • ๐Ÿ“ฐ Public Disclosure: Security researcher publishes vulnerability in MCP protocol

    Expedited Review (Within 1 Week):

    • ๐Ÿ†• Major Feature Release: New MCP tool added, API integration change
    • ๐Ÿ“Š Threat Intelligence Alert: ENISA/CISA advisory relevant to Node.js/TypeScript ecosystem
    • ๐Ÿ›๏ธ EP API Breaking Change: European Parliament API schema or security model update

    Scheduled Review (Within 30 Days):

    • ๐Ÿ“œ Regulatory Update: EU CRA amendment, GDPR guidance update
    • ๐Ÿ”ง Architecture Refactor: Migration to new framework, protocol upgrade
    • ๐ŸŽ–๏ธ Compliance Audit Finding: ISO 27001 audit identifies threat modeling gap

    graph TD
        A[๐Ÿ“… Scheduled Review
    or Trigger Event] --> B{Review Type?} B -->|Monthly| C[Dependency Scan
    Review] B -->|Quarterly| D[Full Threat Model
    Workshop] B -->|Annual| E[Comprehensive
    Revision] B -->|Ad-Hoc| F[Incident-Specific
    Assessment] C --> G[Update Lockfile] D --> H[Update STRIDE Tables] E --> I[New Attack Scenarios] F --> J[Incident Report] G --> K[Document Changes] H --> K I --> K J --> K K --> L[Commit to GitHub] L --> M[๐Ÿ“ข Communicate Updates] M --> N[โœ… Review Complete] style A fill:#4CAF50,stroke:#357a38,stroke-width:2px,color:#ffffff style B fill:#2196F3,stroke:#1769aa,stroke-width:2px,color:#ffffff style K fill:#FF9800,stroke:#b26a00,stroke-width:2px,color:#1a1a1a style N fill:#9C27B0,stroke:#6d1b7b,stroke-width:2px,color:#ffffff

    Monthly Dependency Review:

    • โœ… Updated package-lock.json with patched dependencies
    • โœ… npm audit report with 0 high/critical vulnerabilities
    • โœ… Dependabot PR merge/rejection justifications
    • โœ… Updated SBOM (CycloneDX) published to GitHub Releases

    Quarterly Threat Model Workshop:

    • โœ… Updated THREAT_MODEL.md with new threats
    • โœ… Risk matrix with re-assessed likelihood/impact scores
    • โœ… Action item register with assigned owners and deadlines
    • โœ… Security control effectiveness validation report

    Annual Comprehensive Revision:

    • โœ… Threat Model v2.0 with new attack scenarios
    • โœ… Updated MITRE ATT&CK Navigator layer JSON
    • โœ… External security expert assessment report
    • โœ… Alignment with latest ENISA Threat Landscape
    • โœ… Security maturity level progression plan

    Ad-Hoc Incident Assessment:

    • โœ… Root cause analysis with STRIDE classification
    • โœ… Lessons learned document
    • โœ… Updated threat actor profiles (if new TTPs identified)
    • โœ… Enhanced mitigations roadmap

    All threat model updates are tracked via Git commits with the following conventions:

    # Commit message format
    threat-model: [Review Type] - Brief description

    # Examples
    git commit -m "threat-model: Quarterly Review Q1 2025 - Added MCP injection scenario"
    git commit -m "threat-model: Ad-Hoc - CVE-2025-12345 in ws dependency assessment"
    git commit -m "threat-model: Annual Revision - MITRE ATT&CK coverage expansion"

    ๐Ÿ“Š Threat Model Changelog: Maintained via Git commit history using the threat-model: commit-message convention described above.


    The European Parliament MCP Server's security posture is assessed using a 5-level maturity model adapted from NIST Cybersecurity Framework and ISO 27001 maturity scales. This framework guides continuous improvement toward optimized security practices.


    Characteristics:

    • โŒ No formal threat modeling process
    • โŒ Security controls implemented reactively after incidents
    • โŒ No security testing in CI/CD pipeline
    • โŒ Dependency vulnerabilities addressed sporadically
    • โŒ No security documentation or policies

    Typical Indicators:

    • Multiple high/critical vulnerabilities in production
    • No SBOM or supply chain visibility
    • Manual security testing (if any)
    • No incident response plan

    Improvement Path: Establish basic security controls (SAST, dependency scanning)


    Characteristics:

    • โœ… Basic threat identification (STRIDE threats documented)
    • โœ… Essential security controls deployed (HTTPS, input validation)
    • โœ… Dependency scanning with Dependabot
    • โš ๏ธ Inconsistent security testing
    • โš ๏ธ No quantitative risk assessment

    Typical Indicators:

    • Dependabot alerts reviewed weekly
    • Some SAST tools integrated in CI/CD
    • SECURITY.md and basic vulnerability disclosure process
    • Reactive incident response

    Improvement Path: Systematize threat modeling, implement SLSA Level 2


    Characteristics:

    • โœ… Formal threat model with STRIDE per element
    • โœ… MITRE ATT&CK mapping to threats
    • โœ… Quarterly threat model reviews
    • โœ… Comprehensive security testing (SAST, DAST, SCA)
    • โœ… SLSA Level 3 provenance
    • โœ… Security architecture documentation

    Typical Indicators:

    • OpenSSF Scorecard โ‰ฅ8.0/10
    • THREAT_MODEL.md and SECURITY_ARCHITECTURE.md maintained
    • Automated security gates in CI/CD
    • Proactive vulnerability management with SLAs

    Current Level: ๐ŸŸข The European Parliament MCP Server is at Level 3

    Improvement Path: Implement security metrics, threat intelligence integration


    Characteristics:

    • โœ… Quantitative risk assessment with business impact
    • โœ… Security metrics dashboard (MTTR, vulnerability density, control effectiveness)
    • โœ… Threat intelligence feeds integrated
    • โœ… Continuous security testing (shift-left + shift-right)
    • โœ… Automated incident response playbooks
    • โœ… Security budget aligned with risk

    Typical Indicators:

    • Mean Time To Remediation (MTTR) tracked and improving
    • Security KPIs reported to leadership quarterly
    • Threat model updated automatically from threat intelligence
    • Bug bounty program operational

    Improvement Path: Predictive security analytics, AI-driven threat hunting


    Characteristics:

    • โœ… Real-time threat model updates via automation
    • โœ… Predictive threat analytics using ML/AI
    • โœ… Self-healing security controls
    • โœ… Zero Trust Architecture fully implemented
    • โœ… Security innovation through R&D
    • โœ… Industry-leading security posture

    Typical Indicators:

    • OpenSSF Scorecard 10.0/10
    • Autonomous security validation and remediation
    • Published security research and threat intelligence
    • Recognized as security exemplar in open-source community

    Improvement Path: Maintain excellence, contribute to security standards


    ๐Ÿ“Š Overall Maturity Level: ๐ŸŸข Level 3: Defined (Systematic Threat Modeling)

    Security Domain Current Level Target (2025) Gap Analysis
    Threat Modeling ๐ŸŸข Level 3 ๐Ÿ”ต Level 4 Implement threat intelligence integration
    Supply Chain Security ๐ŸŸข Level 3 ๐ŸŸข Level 3 Maintain SLSA Level 3, monitor npm ecosystem
    Vulnerability Management ๐ŸŸข Level 3 ๐Ÿ”ต Level 4 Add MTTR metrics, automate patching
    Security Testing ๐ŸŸข Level 3 ๐Ÿ”ต Level 4 Add DAST, penetration testing
    Incident Response ๐ŸŸก Level 2 ๐ŸŸข Level 3 Conduct tabletop exercises, automate runbooks
    Security Monitoring ๐ŸŸก Level 2 ๐ŸŸข Level 3 Implement security metrics dashboard
    Documentation ๐ŸŸข Level 3 ๐ŸŸข Level 3 Maintain current excellence

    gantt
        title Security Maturity Roadmap
        dateFormat YYYY-MM
        section Threat Modeling
        Threat Intelligence Integration   :2025-03, 3M
        Automated MITRE ATT&CK Updates   :2025-06, 2M
        section Vulnerability Management
        MTTR Metrics Dashboard           :2025-02, 2M
        Automated Patch Deployment       :2025-08, 3M
        section Security Testing
        DAST Integration (OWASP ZAP)     :2025-04, 2M
        Annual Penetration Test          :2025-09, 1M
        section Incident Response
        Tabletop Exercise                :2025-05, 1M
        Automated IR Playbooks           :2025-10, 3M
        section Monitoring
        Security Metrics Dashboard       :2025-03, 3M
        Anomaly Detection System         :2025-11, 4M
    

    ๐ŸŽฏ 2025 Target: Achieve Level 4 (Managed) maturity in Threat Modeling and Vulnerability Management domains.


    To objectively measure progression, the following criteria are used for annual maturity assessments:

    Criterion Weight Level 3 Threshold Level 4 Threshold
    OpenSSF Scorecard 20% โ‰ฅ8.0/10 โ‰ฅ9.0/10
    SLSA Level 15% Level 3 Level 3 + Enhanced Monitoring
    Threat Model Freshness 10% <90 days <30 days (automated)
    Vulnerability MTTR 15% Critical <7d, High <30d Critical <24h, High <7d
    Security Test Coverage 15% โ‰ฅ80% โ‰ฅ90% with mutation testing
    Incident Response Readiness 10% Plan documented Drills quarterly, automation
    Security Metrics 10% Manual reporting Real-time dashboard
    Threat Intelligence 5% Manual review Automated integration

    Assessment Method: Annual third-party security audit with maturity scorecard


    %%{init: {
      "theme": "dark",
      "themeVariables": {
        "quadrant1Fill": "#D32F2F",
        "quadrant2Fill": "#4CAF50",
        "quadrant3Fill": "#2E7D32",
        "quadrant4Fill": "#FF9800",
        "quadrantTitleFill": "#ffffff",
        "quadrantPointFill": "#ffffff",
        "quadrantPointTextFill": "#ffffff",
        "quadrantXAxisTextFill": "#ffffff",
        "quadrantYAxisTextFill": "#ffffff"
      },
      "quadrantChart": {
        "chartWidth": 700,
        "chartHeight": 700,
        "pointLabelFontSize": 12,
        "titleFontSize": 20,
        "quadrantLabelFontSize": 16,
        "xAxisLabelFontSize": 14,
        "yAxisLabelFontSize": 14
      }
    }}%%
    quadrantChart
        title ๐ŸŽฏ Threat Risk Assessment Matrix
        x-axis Low Likelihood --> High Likelihood
        y-axis Low Impact --> High Impact
        quadrant-1 CRITICAL PRIORITY
        quadrant-2 MONITOR
        quadrant-3 ACCEPT
        quadrant-4 MITIGATE
        "๐Ÿ“ฆ Supply Chain Attack": [0.5, 0.9]
        "โšก API Rate Exhaustion": [0.6, 0.5]
        "๐Ÿ’‰ Input Injection": [0.4, 0.6]
        "๐Ÿ” Error Info Leak": [0.5, 0.4]
        "๐Ÿ“› Package Squatting": [0.3, 0.7]
        "๐Ÿงฌ Prototype Pollution": [0.2, 0.7]
        "๐Ÿ•ต๏ธ MITM Attack": [0.2, 0.6]
        "๐Ÿ—๏ธ Build Tampering": [0.2, 0.8]
    
    Priority Risk Current Status Action Required
    ๐Ÿ”ด P1 Supply chain compromise (T-2, S-4) โœ… Mitigated Maintain Dependabot, SLSA attestations
    ๐ŸŸ  P2 Input validation bypass (E-1) โœ… Mitigated Zod schemas for all tool inputs
    ๐ŸŸก P3 API rate limit exhaustion (D-1) โœ… Mitigated Client-side rate limiting implemented
    ๐ŸŸก P4 Error information disclosure (I-1) โš ๏ธ Partial Improve error sanitization
    ๐ŸŸข P5 Build artifact tampering (T-3) โœ… Mitigated SLSA Level 3 provenance

    This section provides quantitative risk estimates for the 7 priority threat scenarios using Single Loss Expectancy (SLE), Annual Rate of Occurrence (ARO), and Annualized Loss Expectancy (ALE) metrics. Per Hack23 Risk Management Policy ยง4.2, quantitative risk scoring enables risk-prioritized security investment.

    โš ๏ธ Disclaimer: These figures are order-of-magnitude estimates for risk prioritization, not insurance-grade quantification. Actual losses may vary significantly based on threat landscape evolution, control effectiveness, and business context. Estimates are grounded in publicly available data for open-source npm-distributed servers with no revenue.

    # Scenario SLE (โ‚ฌ) ARO (per year) ALE (โ‚ฌ/year) Confidence Calculation Basis
    1 Supply Chain Compromise
    (T1195.002, T1059.007)
    โ‚ฌ5,000 โ€“ โ‚ฌ10,000 0.1 โ€“ 0.2 โ‚ฌ500 โ€“ โ‚ฌ2,000 Medium SLE: OpenSSF Scorecard drop (9.4โ†’7.0) โ†’ estimated 20โ€“30% user-loss ร— โ‚ฌ500 replacement cost per user (developer time to find alternative); npm package removal cost โ‚ฌ2kโ€“5k (republishing, reputation recovery). ARO: npm ecosystem avg. supply-chain incident rate 0.1โ€“0.2/year (1 incident per 5โ€“10 years) for packages with SLSA Level 3 + Dependabot.
    2 Parliamentary Data Manipulation
    (T1557, T1565.002)
    โ‚ฌ1,000 โ€“ โ‚ฌ3,000 0.05 โ€“ 0.1 โ‚ฌ50 โ€“ โ‚ฌ300 Low SLE: Reputational damage if false EP data propagates (news article retractions, community trust loss) โ†’ โ‚ฌ1kโ€“3k in brand recovery, user communication. ARO: HTTPS/TLS 1.3 + certificate validation makes MITM highly unlikely (0.05โ€“0.1/year, ca. 1 per 10โ€“20 years for well-configured TLS).
    3 MCP Protocol Abuse (AI Jailbreak)
    (T1059, T1480)
    โ‚ฌ500 โ€“ โ‚ฌ2,000 0.2 โ€“ 0.5 โ‚ฌ100 โ€“ โ‚ฌ1,000 Medium SLE: Service disruption (rate-limit exhaustion) + incident-response time (8โ€“16 hours ร— โ‚ฌ50/hour contractor rate) + minor reputational impact. ARO: AI jailbreak attempts growing (0.2โ€“0.5/year, ca. 1 per 2โ€“5 years) as LLM capabilities advance; Zod validation provides strong defense.
    4 GDPR Personal Data Exposure
    (T1213)
    โ‚ฌ10,000 โ€“ โ‚ฌ10,000,000 0.01 โ€“ 0.05 โ‚ฌ100 โ€“ โ‚ฌ500,000 Low SLE: GDPR Article 83 fines: โ‚ฌ10M or 2% turnover (Article 83(4)(a) for security-of-processing violations); worst-case โ‚ฌ20M or 4% turnover (Article 83(5) if personal data breach under Articles 33/34). For a โ‚ฌ0-revenue open-source project, realistic fine โ‚ฌ0โ€“10k (administrative fine for non-compliance); reputational damage โ‚ฌ5kโ€“10k. ARO: Very low (0.01โ€“0.05/year, ca. 1 per 20โ€“100 years) due to public data focus + sanitized error handling; requires verbose error misconfiguration + regulatory audit.
    5 EP API Denial of Service
    (T1499.004)
    โ‚ฌ500 โ€“ โ‚ฌ1,500 0.1 โ€“ 0.3 โ‚ฌ50 โ€“ โ‚ฌ450 Medium SLE: Service downtime (4โ€“8 hours) ร— user frustration + EP API quota reset cost (โ‚ฌ0 for public API, but reputational impact โ‚ฌ500โ€“1.5k). ARO: Rate limiting (100/min) mitigates but not adaptive; 0.1โ€“0.3/year (ca. 1 per 3โ€“10 years) for sustained DoS attempts.
    6 Build Artifact Tampering
    (T1554, T1195.002)
    โ‚ฌ10,000 โ€“ โ‚ฌ50,000 0.02 โ€“ 0.05 โ‚ฌ200 โ€“ โ‚ฌ2,500 Medium SLE: Complete service compromise โ†’ npm package removal + user notifications + emergency patching + OpenSSF Scorecard drop โ†’ โ‚ฌ10kโ€“50k (developer time + reputation recovery + potential legal costs if malware spread). ARO: Very low (0.02โ€“0.05/year, ca. 1 per 20โ€“50 years) with SLSA Level 3 + branch protection + npm 2FA.
    7 Reputation Attack via Security Metrics
    (T1591, T1588.005)
    โ‚ฌ1,000 โ€“ โ‚ฌ5,000 0.1 โ€“ 0.2 โ‚ฌ100 โ€“ โ‚ฌ1,000 Medium SLE: OpenSSF Scorecard drop (9.4โ†’8.5) โ†’ 10โ€“15% user-loss ร— โ‚ฌ500 replacement cost; FUD campaign response (blog posts, CVE triage, community communication) โ‚ฌ1kโ€“5k. ARO: Competitive FUD campaigns or minor-CVE exploitation (0.1โ€“0.2/year, ca. 1 per 5โ€“10 years); transparent security posture mitigates.
    Metric Value Notes
    Total ALE (Sum) โ‚ฌ1,200 โ€“ โ‚ฌ505,250 Sum of all 7 scenarios; dominated by GDPR worst-case
    Realistic ALE (Excluding Worst-Case GDPR) โ‚ฌ1,100 โ€“ โ‚ฌ5,250 Excluding scenario 4 worst-case (โ‚ฌ10M GDPR fine unlikely for โ‚ฌ0-revenue OSS)
    Mean ALE (Realistic) โ‚ฌ3,175/year Average across 7 scenarios (realistic range)
    Risk-Adjusted Budget Recommendation โ‚ฌ5,000 โ€“ โ‚ฌ10,000/year Security investment = 1.5โ€“3ร— mean ALE (industry standard risk-adjusted budget)
    Confidence Meaning Basis
    High 75โ€“90% confidence in SLE/ARO estimates Industry benchmarks, historical npm data
    Medium 50โ€“75% confidence Expert judgment, limited historical data
    Low 25โ€“50% confidence Worst-case scenarios, regulatory uncertainty

    Data Sources:

    • SLE (Reputation): OpenSSF Scorecard user-adoption impact studies (2024)
    • SLE (GDPR): GDPR enforcement tracker (2018โ€“2024 fines database)
    • ARO (Supply Chain): npm ecosystem incident reports (Snyk, Sonatype, GitHub Advisory Database)
    • ARO (MITM): TLS 1.3 vulnerability disclosures (2020โ€“2024)
    • Cost (Developer Time): โ‚ฌ50/hour contractor rate (EU market average, 2024)

    graph TB
        subgraph "๐Ÿ”’ Defense in Depth"
            subgraph "Layer 1: Input Validation"
                ZOD[Zod Schema Validation]
                PARAM[Parameter Sanitization]
            end
            subgraph "Layer 2: Rate Limiting"
                RL[Request Rate Limiter]
                QUOTA[API Quota Management]
            end
            subgraph "Layer 3: Transport Security"
                HTTPS[HTTPS/TLS 1.3]
                STDIO[stdio Isolation]
            end
            subgraph "Layer 4: Supply Chain"
                SLSA[SLSA Level 3]
                SBOM[CycloneDX SBOM]
                DEP[Dependabot]
            end
            subgraph "Layer 5: Monitoring"
                AUDIT[Audit Logging]
                SCORE[OpenSSF Scorecard]
            end
        end
    
        ZOD --> RL --> HTTPS --> SLSA --> AUDIT
    
    Control Category Threats Mitigated Status
    Zod input validation Preventive E-1, D-4, E-3 โœ… Active
    Rate limiting Preventive D-1, D-2 โœ… Active
    HTTPS/TLS for EP API Preventive S-2, T-1 โœ… Active
    SLSA Level 3 provenance Detective T-3, S-4 โœ… Active
    Dependabot alerts Detective T-2 โœ… Active
    npm audit Detective T-2, S-4 โœ… Active
    OpenSSF Scorecard Detective Multiple โœ… Active
    CycloneDX SBOM Transparency T-2 โœ… Active
    TypeScript strict mode Preventive E-2, I-1 โœ… Active
    Environment variable validation Preventive T-4 โœ… Active
    Structured error handling Preventive I-1, I-2 โœ… Active
    Branch protection Preventive R-2 โœ… Active
    Code review requirements Detective Multiple โœ… Active
    Security headers Preventive Multiple โœ… Active

    graph TD
        ROOT["๐ŸŽฏ Compromise EP MCP
    via Supply Chain"] ROOT --> A["๐Ÿ“ฆ Malicious Dependency
    Injection"] ROOT --> B["๐Ÿญ Build Pipeline
    Compromise"] ROOT --> C["๐Ÿ“ค npm Package
    Substitution"] ROOT --> D["๐Ÿ”ง Developer
    Environment Attack"] A --> A1["Compromised npm package"] A --> A2["Typosquatting dependency"] A --> A3["Dependency confusion"] A1 --> A1a["Install backdoored package"] A1 --> A1b["Exploit known CVE"] A1a --> A1M["โœ… Dependabot alerts"] A1b --> A1M2["โœ… npm audit + Snyk"] A2 --> A2M["โœ… package-lock.json pinning"] A3 --> A3M["โœ… No private scope overlap"] B --> B1["GitHub Actions compromise"] B --> B2["Build artifact tampering"] B --> B3["Stolen publish credentials"] B1 --> B1a["Malicious workflow change"] B1 --> B1b["Environment secret theft"] B1a --> B1M["โœ… Branch protection + CODEOWNERS"] B1b --> B1M2["โœ… OIDC token auth (no secrets)"] B2 --> B2M["โœ… SLSA Level 3 provenance"] B3 --> B3M["โœ… npm 2FA required"] C --> C1["Package name squatting"] C --> C2["Account takeover"] C --> C3["npm registry compromise"] C1 --> C1M["โœ… Official package ownership verified: european-parliament-mcp-server"] C2 --> C2M["โœ… npm 2FA + strong passwords"] C3 --> C3M["โŒ Out of scope (npm responsibility)"] D --> D1["Developer laptop malware"] D --> D2["SSH/GPG key theft"] D --> D3["Social engineering"] D1 --> D1M["โš ๏ธ Developer responsibility"] D2 --> D2M["โœ… GPG commit signing required"] D3 --> D3M["โš ๏ธ Security awareness training"]
    graph TD
        ROOT2["๐ŸŽฏ Manipulate EP
    Parliamentary Data"] ROOT2 --> E["๐ŸŒ API Response
    Tampering"] ROOT2 --> F["๐Ÿ’พ Cache
    Poisoning"] ROOT2 --> G["๐Ÿ“ฆ Dependency
    Injection"] ROOT2 --> H["๐Ÿ”ง Build Artifact
    Tampering"] E --> E1["MITM TLS interception"] E --> E2["Compromised EP API"] E --> E3["DNS hijacking"] E1 --> E1a["TLS downgrade attack"] E1 --> E1b["Rogue CA certificate"] E1a --> E1M["โœ… TLS 1.3 minimum, no fallback"] E1b --> E1M2["โœ… Certificate pinning (future)"] E2 --> E2M["โŒ Out of scope (EP infrastructure)"] E3 --> E3M["โš ๏ธ DNSSEC (ISP/user responsibility)"] F --> F1["Inject malicious response"] F --> F2["Memory corruption"] F --> F3["Race condition exploitation"] F1 --> F1M["โœ… Cache only validated responses"] F2 --> F2M["โœ… TypeScript + process isolation"] F3 --> F3M["โœ… Atomic cache operations"] G --> G1["Install backdoored package"] G --> G2["Exploit known CVE"] G --> G3["Prototype pollution"] G1 --> G1M["โœ… Dependabot + SLSA"] G2 --> G2M["โœ… npm audit + Snyk"] G3 --> G3M["โœ… TypeScript strict mode"] H --> H1["Modify dist/ artifacts"] H --> H2["CI/CD pipeline injection"] H --> H3["Release process bypass"] H1 --> H1M["โœ… SLSA Level 3 attestations"] H2 --> H2M["โœ… Branch protection + required checks"] H3 --> H3M["โœ… npm provenance + 2FA"]
    graph TD
        ROOT3["๐ŸŽฏ Disrupt EP MCP
    Service Availability"] ROOT3 --> I["โฑ๏ธ Rate Limit
    Exhaustion"] ROOT3 --> J["๐Ÿ’ป Resource
    Exhaustion"] ROOT3 --> K["๐ŸŒ EP API
    Overload"] ROOT3 --> L["๐Ÿ“ฆ Supply Chain
    DoS"] I --> I1["AI client excessive requests"] I --> I2["Bypass rate limiter"] I --> I3["Distributed request flood"] I1 --> I1M["โœ… Token bucket rate limiting"] I2 --> I2M["โœ… Atomic rate limit checks"] I3 --> I3M["โš ๏ธ stdio isolation limits multi-client"] J --> J1["Memory exhaustion (large responses)"] J --> J2["CPU exhaustion (regex DoS)"] J --> J3["Cache memory overflow"] J1 --> J1M["โœ… Response size limits"] J2 --> J2M["โœ… Zod validation (no regex)"] J3 --> J3M["โœ… LRU cache with max size"] K --> K1["Excessive API requests"] K --> K2["Concurrent request flood"] K --> K3["Long-polling attacks"] K1 --> K1M["โœ… Client-side rate limiting"] K2 --> K2M["โœ… Concurrency limits (future)"] K3 --> K3M["โœ… HTTP timeout configuration"] L --> L1["npm registry unavailable"] L --> L2["Compromised dependency unavailable"] L --> L3["GitHub Actions outage"] L1 --> L1M["โš ๏ธ npm mirrors (user responsibility)"] L2 --> L2M["โœ… package-lock.json ensures reproducibility"] L3 --> L3M["โŒ Out of scope (GitHub SLA)"]
    graph TD
        ROOT["๐ŸŽฏ Compromise MCP Server"]
        ROOT --> A["๐Ÿ“ฆ Supply Chain Attack"]
        ROOT --> B["๐Ÿ”Œ MCP Protocol Exploit"]
        ROOT --> C["๐ŸŒ API Layer Attack"]
        ROOT --> D["๐Ÿ’ป Runtime Exploit"]
    
        A --> A1["Malicious dependency"]
        A --> A2["Build pipeline compromise"]
        A --> A3["npm package substitution"]
        A1 --> A1M["โœ… Dependabot + npm audit"]
        A2 --> A2M["โœ… SLSA Level 3"]
        A3 --> A3M["โœ… Official package, 2FA"]
    
        B --> B1["Parameter injection"]
        B --> B2["Tool abuse"]
        B --> B3["Resource exhaustion"]
        B1 --> B1M["โœ… Zod validation"]
        B2 --> B2M["โœ… Rate limiting"]
        B3 --> B3M["โœ… Memory limits"]
    
        C --> C1["API MITM"]
        C --> C2["Rate limit exhaustion"]
        C --> C3["Response manipulation"]
        C1 --> C1M["โœ… HTTPS/TLS"]
        C2 --> C2M["โœ… Client rate limiting"]
        C3 --> C3M["โœ… Response validation"]
    
        D --> D1["Prototype pollution"]
        D --> D2["Memory exhaustion"]
        D --> D3["Error info leakage"]
        D1 --> D1M["โœ… TypeScript strict"]
        D2 --> D2M["โœ… Response limits"]
        D3 --> D3M["โš ๏ธ Improve sanitization"]
    

    Detailed narrative scenarios prioritized by likelihood and business impact for the European Parliament MCP Server.

    # Scenario Actor Method Impact Current Controls Residual Risk
    1 Supply Chain Compromise
    (T1195.002 Compromise Software Supply Chain, T1059.007 JavaScript)
    ๐ŸŽญ Nation-State APT
    ๐Ÿ’ฐ Cybercriminal
    Backdoored npm dependency injected via compromised maintainer account โ†’ malicious code in node_modules/ โ†’ data exfiltration or sabotage during MCP tool execution Critical: Loss of service reputation, potential data manipulation, user trust erosion, OpenSSF Scorecard degradation โœ… Dependabot alerts
    โœ… npm audit + Snyk
    โœ… SLSA Level 3
    โœ… SBOM (CycloneDX)
    โœ… package-lock.json pinning
    Medium
    (Continuous monitoring required)
    2 Parliamentary Data Manipulation
    (T1557 Adversary-in-the-Middle, T1565.002 Transmitted Data Manipulation)
    ๐Ÿ›๏ธ Disinformation APT
    ๐ŸŽฏ Political Actor
    MITM attack on EP API connection โ†’ inject false MEP voting records or manipulated plenary transcripts โ†’ AI assistant provides incorrect democratic transparency data โ†’ misinformation spread High: Democratic process undermined, service credibility damaged, regulatory scrutiny (GDPR/NIS2) โœ… HTTPS/TLS 1.3
    โœ… Certificate validation
    โœ… Response validation (Zod)
    โš ๏ธ Certificate pinning (future)
    Low-Medium
    (TLS provides strong protection)
    3 MCP Protocol Abuse (AI Jailbreak)
    (T1059 Command and Scripting Interpreter, T1480 Execution Guardrails Bypass)
    ๐Ÿค– Malicious AI User
    ๐Ÿ”ฌ Security Researcher
    Crafted prompts causing AI assistant to invoke MCP tools with malicious parameters โ†’ bypass Zod validation via edge cases โ†’ unauthorized data access or service abuse Medium: Data exposure, rate limit exhaustion, service disruption, reputational risk โœ… Zod schema validation
    โœ… TypeScript strict mode
    โœ… No shell execution
    โœ… Input sanitization
    Low
    (Defense-in-depth architecture)
    4 GDPR Personal Data Exposure
    (T1213 Data from Information Repositories)
    ๐Ÿ” Privacy Researcher
    ๐ŸŽฏ Regulatory Auditor
    Verbose error messages or debug logs expose MEP personal data (addresses, contact info, personal declarations) โ†’ GDPR Article 32 violation โ†’ regulatory fines and reputational damage Medium: GDPR Article 32 security-of-processing fines (typically up to โ‚ฌ10M or 2% of worldwide annual turnover under Article 83(4)(a); potential escalation to โ‚ฌ20M or 4% under Article 83(5) if a reportable personal data breach under Articles 33/34 occurs), reputational damage, user trust loss, mandatory breach notification โœ… Sanitized error handling
    โš ๏ธ Production log review
    โš ๏ธ PII detection in logs
    โœ… Public data focus
    Low-Medium
    (Requires log sanitization review)
    5 EP API Denial of Service
    (T1499.004 Application or System Exploitation Flood)
    ๐Ÿ’ผ Competitive Adversary
    ๐ŸŽฏ Disruptive Actor
    Automated script or compromised AI client floods EP MCP Server with requests โ†’ client-side rate limiter bypassed or overwhelmed โ†’ EP API rate limits exhausted โ†’ service unavailable for legitimate users Medium: Service unavailability, user frustration, EP API access suspended, reputational damage โœ… Token bucket rate limiter
    โœ… Concurrency limits
    โœ… Request logging
    โš ๏ธ Adaptive rate limiting (future)
    Low-Medium
    (Rate limiting effective but not adaptive)
    6 Build Artifact Tampering
    (T1554 Compromise Host Software Binary, T1195.002 Compromise Software Supply Chain)
    ๐Ÿญ CI/CD Attacker
    ๐Ÿ”“ Compromised GitHub Actions
    Attacker modifies GitHub Actions workflow or injects malicious code during build โ†’ tampered dist/ artifacts published to npm โ†’ users install compromised package โ†’ backdoor execution Critical: Widespread malware distribution, npm package removal, OpenSSF Scorecard failure, complete service compromise โœ… SLSA Level 3 provenance
    โœ… Branch protection
    โœ… Required status checks
    โœ… CODEOWNERS enforcement
    โœ… npm 2FA
    Low
    (Strong supply chain security)
    7 Reputation Attack via Security Metrics
    (T1591 Gather Victim Org Information, T1588.005 Exploits)
    ๐ŸŽฏ Competitive Adversary
    ๐Ÿ“‰ FUD Campaign
    Attacker exploits minor vulnerability or submits CVE against EP MCP Server โ†’ OpenSSF Scorecard drops below 9.0 โ†’ negative publicity and user migration to competitors Medium: Market share loss, user trust erosion, competitive disadvantage, reduced adoption rate โœ… OpenSSF Scorecard 9.4+
    โœ… Security badges (up-to-date)
    โœ… Transparent security docs
    โœ… Rapid vulnerability response
    Low
    (Strong security posture)

    This section defines concrete detection signatures for each of the 7 priority threat scenarios, enabling automated threat detection and incident response. Per Hack23 Incident Response Plan ยง3, detection signatures must be actionable and tied to response playbooks.

    Audit Event Schema: Based on src/utils/auditLogger.ts โ€” AuditLogEntry { action: string; params?: Record<string, unknown>; result?: { count?: number; success: boolean; error?: string }; duration?: number; timestamp: Date }

    Detection Attribute Signature Alert Threshold Response Playbook
    Detection Source Dependabot alerts, npm audit, OpenSSF Scorecard, SLSA provenance verification Critical/high severity CVE in direct dependency IR-SUPPLY-CHAIN
    Signature 1 Dependabot alert severity in ("critical", "high") AND package.scope === "direct" 1 alert Immediate patch or dependency replacement
    Signature 2 OpenSSF Scorecard drop: (previousScore - currentScore) >= 1.0 AND currentScore < 9.0 Score drop โ‰ฅ1.0 Investigate scorecard degradation cause
    Signature 3 npm audit: vulnerabilities.high > 0 OR vulnerabilities.critical > 0 Any high/critical vuln CI/CD gate: block merge/publish
    Signature 4 SLSA provenance signature mismatch: slsa.verified === false Any mismatch Quarantine build artifact, investigate tampering
    Detection Attribute Signature Alert Threshold Response Playbook
    Detection Source TLS certificate validation errors, Zod response validation failures, EP API response anomalies TLS handshake failure or schema validation error spike IR-DATA-INTEGRITY
    Signature 1 auditEvent: action === "tool_call" AND result.success === false AND result.error.includes("certificate") >3 TLS errors/hour Potential MITM attack or cert expiry
    Signature 2 auditEvent: action === "tool_call" AND result.success === false AND result.error.includes("ZodError") >10 validation errors/hour EP API schema change or response tampering
    Signature 3 auditEvent: action === "tool_call" AND params.tool.includes("vot") AND result.count === 0 (unexpected empty voting records) >5 empty results/day EP API outage or data manipulation
    Detection Attribute Signature Alert Threshold Response Playbook
    Detection Source Zod validation errors, rate limiter denials, unusual tool invocation patterns Repeated Zod failures or rate-limit violations from single client IR-ABUSE
    Signature 1 auditEvent: action === "tool_call" AND result.success === false AND result.error.includes("ZodError") >20 Zod errors/hour from same tool Jailbreak attempt or malformed client
    Signature 2 Rate limiter: rateLimitDenials > 10/minute (requires future rate-limit logging enhancement) >10 denials/min Automated abuse or compromised client
    Signature 3 Tool invocation depth: toolCallChain.length > 5 (future: track recursive tool calls) Depth >5 Potential infinite-loop AI agent
    Detection Attribute Signature Alert Threshold Response Playbook
    Detection Source Error logs, audit logs, PII-detection regex (future enhancement) PII keywords in error messages or logs IR-GDPR-BREACH
    Signature 1 auditEvent: result.error contains PII regex: /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,}\b/ (email) Any match Sanitize error handling immediately
    Signature 2 auditEvent: action === "get_mep_details" AND params.id logged with full MEP bio in result Requires log-content analysis Ensure PII sanitization in audit logs
    Signature 3 Production error stack trace: error.stack !== undefined in logged errors Any stack trace in prod Fix error sanitization (I-1/I-2)
    Detection Attribute Signature Alert Threshold Response Playbook
    Detection Source Rate limiter logs, EP API 429 responses, request throughput monitoring Sustained rate-limit denials or EP API quota exhaustion IR-DOS
    Signature 1 auditEvent: action === "rate_limit_exceeded" (requires future enhancement: log rate-limit events) >100 denials/minute Potential DoS attack
    Signature 2 EP API response: statusCode === 429 (Too Many Requests) >5 consecutive 429s EP API quota exhausted, throttle client
    Signature 3 Request throughput: toolCallsPerMinute > 150 (exceeds 100/min rate limit + 50% burst) >150 calls/min Burst traffic, investigate client behavior
    Detection Attribute Signature Alert Threshold Response Playbook
    Detection Source SLSA provenance verification, GitHub Actions audit logs, npm publish logs Provenance signature mismatch or unauthorized publish IR-SUPPLY-CHAIN
    Signature 1 SLSA: provenance.signature.verified === false OR provenance.builder !== "https://github.com/slsa-framework/slsa-github-generator" Any mismatch Quarantine npm package version
    Signature 2 GitHub Actions: workflow.modified === true AND approver !== CODEOWNERS Workflow change w/o approval Investigate unauthorized workflow modification
    Signature 3 npm publish: publisher.twoFactorAuth === false OR publisher !== "authorized-maintainer" Any unauthorized publish Revoke npm token, audit recent publishes
    Detection Attribute Signature Alert Threshold Response Playbook
    Detection Source OpenSSF Scorecard monitoring, GitHub Security Advisories, CVE database alerts Scorecard drop or new CVE assigned IR-REPUTATION
    Signature 1 OpenSSF Scorecard: currentScore < 9.0 AND previousScore >= 9.0 Score drops below 9.0 Investigate scorecard check failures
    Signature 2 CVE assigned: cve.severity in ("high", "critical") AND cve.packageName === "european-parliament-mcp-server" Any high/critical CVE Emergency patch, security advisory
    Signature 3 GitHub Security Advisory: advisory.state === "published" AND advisory.severity in ("high", "critical") Any published advisory Public communication, rapid response
    Requirement Current Status Future Enhancement
    Audit log aggregation โš ๏ธ stderr only (no centralized SIEM) Integrate with CloudWatch Logs / Elasticsearch
    Rate-limit event logging โš ๏ธ Denials not logged (future: add to auditLogger) Add rate_limit_exceeded event to audit log schema
    SLSA provenance verification โœ… Automated in CI/CD Add provenance-verification alerts to Slack/email
    OpenSSF Scorecard monitoring โš ๏ธ Manual weekly check Automate daily Scorecard API polling + alerting
    PII detection in logs โŒ No automated PII scanning Implement regex-based PII detector for audit logs

    Comprehensive mapping of each STRIDE threat category to preventive, detective, and corrective security controls.

    STRIDE Category Threat Definition Primary Controls Secondary Controls Detection Controls Monitoring & Response
    ๐ŸŽญ Spoofing (S) Impersonating a legitimate entity โ€ข stdio transport isolation (S-1)
    โ€ข HTTPS/TLS 1.3 (S-2)
    โ€ข Official npm package name ownership (S-3)
    โ€ข npm 2FA (S-3)
    โ€ข Certificate validation
    โ€ข Package provenance
    โ€ข GitHub Actions OIDC
    โ€ข Audit logging (all requests)
    โ€ข npm download anomaly detection
    โ€ข TLS handshake monitoring
    โ€ข OpenSSF Scorecard
    โ€ข npm package monitoring
    โ€ข Security badge alerts
    ๐Ÿ”ง Tampering (T) Unauthorized modification of data or code โ€ข HTTPS integrity checks (T-1)
    โ€ข SLSA Level 3 provenance (T-2, T-3)
    โ€ข Zod response validation (T-1)
    โ€ข Dependabot + npm audit (T-2)
    โ€ข Branch protection
    โ€ข GPG commit signing
    โ€ข Immutable cache entries
    โ€ข Environment variable validation
    โ€ข Dependabot alerts
    โ€ข npm audit (CI/CD)
    โ€ข SBOM vulnerability scanning
    โ€ข GitHub Advanced Security
    โ€ข Snyk monitoring
    โ€ข Supply chain security alerts
    โ€ข Build artifact verification
    ๐Ÿšซ Repudiation (R) Denying actions or events โ€ข Structured stderr logging (R-1)
    โ€ข ISO 8601 timestamps (R-1)
    โ€ข Immutable log streams (R-1)
    โ€ข GPG commit signing (R-2)
    โ€ข Request ID correlation
    โ€ข GitHub Actions audit logs
    โ€ข npm publish logs
    โ€ข Log aggregation (future)
    โ€ข Audit trail completeness checks
    โ€ข GitHub audit log API
    โ€ข Log retention policy
    โ€ข Incident response procedures
    โ€ข Forensic analysis capability
    ๐Ÿ“ข Information Disclosure (I) Exposure of confidential information โ€ข Sanitized error messages (I-1, I-2)
    โ€ข No API keys required (I-3)
    โ€ข Public data only (I-4)
    โ€ข TypeScript strict mode
    โ€ข Production error handling
    โ€ข Generic log messages
    โ€ข No PII in cache keys
    โ€ข Environment variable masking
    โ€ข Log content review
    โ€ข Error message monitoring
    โ€ข Stack trace detection
    โ€ข Privacy impact assessment
    โ€ข GDPR compliance monitoring
    โ€ข Security code review
    ๐Ÿšจ Denial of Service (D) Degrading or preventing service availability โ€ข Token bucket rate limiting (D-1)
    โ€ข Response size limits (D-2)
    โ€ข LRU cache max size (D-2)
    โ€ข Zod validation (no ReDoS) (D-4)
    โ€ข HTTP timeout configuration
    โ€ข Memory monitoring
    โ€ข Concurrency limits
    โ€ข Call depth tracking
    โ€ข Rate limit violation logs
    โ€ข Memory usage monitoring
    โ€ข API response time tracking
    โ€ข Incident response procedures
    โ€ข Failover strategy
    โ€ข EP API health monitoring
    โšก Elevation of Privilege (E) Gaining unauthorized capabilities โ€ข Zod schema validation (E-1)
    โ€ข TypeScript strict mode (E-2)
    โ€ข No shell execution (E-4)
    โ€ข Input sanitization (E-3)
    โ€ข Parameterized API calls
    โ€ข Process isolation (stdio)
    โ€ข Safe JSON parsing
    โ€ข No filesystem access
    โ€ข Input validation failures
    โ€ข Unexpected tool invocations
    โ€ข Privilege escalation attempts
    โ€ข Security testing (SAST/DAST)
    โ€ข Penetration testing
    โ€ข Bug bounty program (future)

    graph TB
        subgraph "๐Ÿฐ Layer 1: Perimeter Security"
            L1A[๐ŸŒ HTTPS/TLS 1.3]
            L1B[โฑ๏ธ Rate Limiting]
            L1C[๐Ÿ”’ Certificate Validation]
            L1D[๐Ÿšซ No HTTP Fallback]
        end
        
        subgraph "๐Ÿ—๏ธ Layer 2: Application Security"
            L2A[โœ… Zod Input Validation]
            L2B[๐Ÿ“ TypeScript Strict Mode]
            L2C[๐Ÿ›ก๏ธ Parameter Sanitization]
            L2D[๐Ÿšซ No Shell Execution]
            L2E[๐Ÿ” Response Validation]
        end
        
        subgraph "๐Ÿ’พ Layer 3: Data Security"
            L3A[โœ… Public Data Only]
            L3B[โณ TTL-Based Caching]
            L3C[๐Ÿ”’ Immutable Cache Entries]
            L3D[๐Ÿงน Sanitized Error Messages]
            L3E[๐Ÿ“Š Structured Logging]
        end
        
        subgraph "๐Ÿ“ฆ Layer 4: Supply Chain Security"
            L4A[๐Ÿ… SLSA Level 3]
            L4B[๐Ÿค– Dependabot Alerts]
            L4C[๐Ÿ“‹ SBOM CycloneDX]
            L4D[๐Ÿ” npm 2FA Publishing]
            L4E[๐Ÿ”’ package-lock.json]
            L4F[๐ŸŽฏ npm Provenance]
        end
        
        subgraph "๐Ÿ” Layer 5: Operational Security"
            L5A[๐Ÿ“Š OpenSSF Scorecard]
            L5B[๐Ÿ“‹ Audit Logging stderr]
            L5C[๐ŸŽ–๏ธ Security Badges]
            L5D[๐Ÿ”„ Automated Testing]
            L5E[๐Ÿ›ก๏ธ CodeQL SAST]
            L5F[๐Ÿ” Snyk Scanning]
        end
        
        L1A --> L2A
        L1B --> L2A
        L2A --> L3A
        L2B --> L3A
        L3A --> L4A
        L3E --> L4A
        L4A --> L5A
        L4B --> L5A
        
        style L1A fill:#ff6b6b,stroke:#b24a4a,stroke-width:2px,color:#ffffff
    
    
        style L2A fill:#feca57,stroke:#b18d3c,stroke-width:2px,color:#000000
    
    
        style L3A fill:#48dbfb,stroke:#3299af,stroke-width:2px,color:#000000
    
    
        style L4A fill:#1dd1a1,stroke:#149270,stroke-width:2px,color:#000000
    
    
        style L5A fill:#9b59b6,stroke:#6c3e7f,stroke-width:2px,color:#ffffff
    
    
    
    Layer Control Type NIST CSF 2.0 Function Threats Addressed Effectiveness Status
    1: Perimeter HTTPS/TLS 1.3 Preventive PR.DS-2, PR.DS-5 S-2, T-1, I-3 โญโญโญโญโญ High โœ… Active
    1: Perimeter Token bucket rate limiting Preventive PR.IP-12, DE.CM-1 D-1, D-2, D-3 โญโญโญโญ High โœ… Active
    1: Perimeter Certificate validation Detective PR.DS-2 S-2, T-1 โญโญโญโญโญ High โœ… Active
    2: Application Zod schema validation Preventive PR.DS-1, PR.IP-1 E-1, D-4, E-3 โญโญโญโญโญ High โœ… Active
    2: Application TypeScript strict mode Preventive PR.IP-1 E-2, I-1 โญโญโญโญ High โœ… Active
    2: Application No shell execution Preventive PR.AC-4, PR.IP-1 E-4 โญโญโญโญโญ High โœ… Active
    3: Data Response validation Preventive PR.DS-1 T-1, E-2 โญโญโญโญ High โœ… Active
    3: Data TTL-based caching Preventive PR.DS-3 I-4, T-1 โญโญโญ Medium โœ… Active
    3: Data Sanitized error messages Preventive PR.DS-5 I-1, I-2 โญโญโญ Medium โš ๏ธ Partial
    3: Data Structured logging (stderr) Detective DE.AE-3, DE.CM-1 R-1, R-3 โญโญโญโญ High โœ… Active
    4: Supply Chain SLSA Level 3 provenance Detective PR.DS-6, ID.SC-2 T-2, T-3, S-4 โญโญโญโญโญ High โœ… Active
    4: Supply Chain Dependabot + npm audit Detective ID.RA-1, DE.CM-4 T-2, S-4 โญโญโญโญ High โœ… Active
    4: Supply Chain SBOM (CycloneDX) Transparency ID.AM-4, ID.SC-5 T-2 โญโญโญ Medium โœ… Active
    4: Supply Chain npm 2FA publishing Preventive PR.AC-1 S-3, T-2 โญโญโญโญโญ High โœ… Active
    4: Supply Chain package-lock.json pinning Preventive ID.SC-2 T-2, S-4 โญโญโญโญ High โœ… Active
    5: Operations OpenSSF Scorecard 9.4+ Detective ID.IM-1, PR.IP-1 All categories โญโญโญโญโญ High โœ… Active
    5: Operations Audit logging (stderr) Detective DE.AE-3, RS.AN-1 R-1, R-2, R-3 โญโญโญโญ High โœ… Active
    5: Operations CodeQL SAST scanning Detective ID.RA-1, DE.CM-4 E-1, E-2, E-4, I-1 โญโญโญโญ High โœ… Active
    5: Operations Snyk vulnerability scanning Detective ID.RA-1, DE.CM-4 T-2, S-4 โญโญโญโญ High โœ… Active
    Function Description EP MCP Server Controls
    ๐Ÿ” IDENTIFY (ID) Understand risks to systems and assets โ€ข OpenSSF Scorecard monitoring
    โ€ข SBOM generation (CycloneDX)
    โ€ข Threat modeling (this document)
    โ€ข Security architecture documentation
    ๐Ÿ›ก๏ธ PROTECT (PR) Implement safeguards for critical services โ€ข Zod input validation
    โ€ข HTTPS/TLS 1.3
    โ€ข TypeScript strict mode
    โ€ข Rate limiting
    โ€ข No shell execution
    โ€ข npm 2FA publishing
    ๐Ÿ”Ž DETECT (DE) Identify occurrence of cybersecurity events โ€ข Dependabot alerts
    โ€ข npm audit
    โ€ข CodeQL SAST
    โ€ข Snyk scanning
    โ€ข Audit logging (stderr)
    โ€ข OpenSSF Scorecard
    ๐Ÿšจ RESPOND (RS) Take action regarding detected incidents โ€ข Incident response procedures
    โ€ข Security advisory publication
    โ€ข Rapid patch deployment
    โ€ข Coordinated vulnerability disclosure
    โ™ป๏ธ RECOVER (RC) Restore capabilities or services โ€ข npm package rollback
    โ€ข Version pinning (package-lock.json)
    โ€ข GitHub release rollback
    โ€ข Incident post-mortem

    ISMS Policy Relevance Link
    ๐ŸŽฏ Threat Modeling Primary methodology Threat_Modeling.md
    ๐Ÿ”’ Secure Development Development security requirements Secure_Development_Policy.md
    ๐Ÿ” Vulnerability Management Vulnerability handling SLAs Vulnerability_Management.md
    ๐ŸŒ Network Security Transport security requirements Network_Security_Policy.md
    ๐Ÿ”‘ Access Control Authentication/authorization Access_Control_Policy.md
    ๐Ÿ” Cryptography TLS and encryption standards Cryptography_Policy.md
    ๐Ÿšจ Incident Response Security incident procedures Incident_Response_Plan.md
    ๐Ÿท๏ธ Classification Data classification framework CLASSIFICATION.md
    Framework Controls Addressed
    ISO 27001:2022 A.5.7, A.8.8, A.8.9, A.8.25, A.8.26, A.8.28
    NIST CSF 2.0 ID.RA, PR.DS, PR.IP, DE.CM, RS.AN
    CIS Controls v8.1 2.7, 7.1, 7.4, 16.1, 16.9

    Principle Application to EP MCP Server Key Controls Threat Categories
    ๐Ÿ” Confidentiality MEP personal data protected from unauthorized access; API responses contain only publicly available parliamentary data GDPR data minimization, PII stripping in audit logs, no persistent storage Information disclosure (I-1 through I-4)
    ๐Ÿ”’ Integrity Parliamentary data accuracy maintained from EP API source to MCP client response TLS transport integrity, Zod schema validation, SLSA Level 3 provenance Tampering (T-1 through T-4), Supply chain attacks
    โšก Availability Continuous access to EP parliamentary data within rate limits Rate limiting (100 req/min), LRU cache (15-min TTL), graceful degradation Denial of service (D-1 through D-3)
    Component EP MCP Server Implementation Scope
    ๐Ÿ” Authentication OS process isolation (stdio transport) โ€” client identity is the spawning process Process-level identity
    ๐Ÿ“‹ Authorization All 62 tools available to any authenticated client; no role-based restrictions in v1.1 Flat access model
    ๐Ÿ“Š Accounting AuditLogger tracks every tool invocation with timestamp, tool name, sanitized parameters, duration Full audit trail

    Each threat in this model follows the structured documentation format defined in Hack23 Threat Modeling Policy:

    Field Description Example
    Threat ID Unique identifier (STRIDE category + sequence) S-1, T-2, I-3
    Category STRIDE classification Spoofing, Tampering, etc.
    Description Detailed threat narrative "Malicious MCP client sends crafted tool arguments"
    Attack Vector MITRE ATT&CK technique mapping T1059 (Command and Scripting)
    Likelihood Probability assessment (Low/Medium/High) Medium
    Impact Business impact assessment (Low/Medium/High/Critical) High
    Risk Score Likelihood ร— Impact Medium-High
    Controls Existing mitigations SC-001 (Zod validation)
    Residual Risk Risk after controls Low
    Owner Responsible party Development team
    STRIDE Category Total Threats Critical High Medium Low
    Spoofing 2 0 0 1 1
    Tampering 4 0 1 2 1
    Repudiation 2 0 0 2 0
    Information Disclosure 4 0 1 2 1
    Denial of Service 3 0 1 1 1
    Elevation of Privilege 3 0 0 2 1
    Supply Chain 3 0 2 1 0
    Total 21 0 5 11 5

    As AI capabilities advance, the threat landscape for MCP servers evolves:

    Timeline AI Threat Vector Impact on EP MCP Server Mitigation Strategy
    2025โ€“2026 AI-generated social engineering targeting MCP tool arguments Medium โ€” crafted inputs designed to extract maximum data Zod schema validation, rate limiting, data minimization
    2026โ€“2027 AI-powered dependency poisoning (LLM-generated malware in npm) High โ€” sophisticated supply chain attacks SLSA Level 3, Dependabot, lockfile pinning, minimal deps
    2027โ€“2028 Autonomous AI agents attempting data exfiltration via MCP Medium โ€” automated abuse of MCP protocol Rate limiting, anomaly detection, audit logging
    2028โ€“2030 AI-assisted API manipulation (adversarial ML against data pipelines) Medium โ€” attempted manipulation of parliamentary data flows Source validation (EP API only), integrity checks
    2030+ Quantum computing threats to TLS encryption Low (current) โ€” future risk to transport security Monitor NIST post-quantum cryptography standards
    Phase Defense Capability Implementation
    Current (v1.1) Static schema validation, rule-based rate limiting Zod schemas, token bucket algorithm
    Near-term (v1.2) Enhanced anomaly detection in request patterns MetricsService pattern analysis
    Medium-term (v2.0) AI-assisted threat detection for MCP protocol abuse ML-based request classification
    Long-term (v3.0+) Predictive security analytics, automated threat response Self-learning security controls
    Threat Description Current Control Future Control
    Prompt injection via tool args AI client generates tool arguments containing injection payloads Zod schema validation (strict types) Semantic input analysis
    Data harvesting automation AI agent systematically extracts all available EP data Rate limiting (100/min) Usage pattern detection
    Cross-tool correlation attacks AI combines outputs from multiple tools to infer sensitive information Data minimization per tool Cross-tool correlation monitoring
    Model poisoning via cached data Compromised EP API responses cached and served to AI models 15-min cache TTL, EP API as single source Response integrity validation

    This section maps the European Parliament MCP Server's security controls to the EU Cyber Resilience Act (CRA) Annex I Essential Cybersecurity Requirements. Per CRA-ASSESSMENT.md, this threat model provides evidence for CRA conformity assessment.

    CRA Annex I Clause Requirement (Paraphrased) EP MCP Implementation Linked Threat IDs Status
    1(a) โ€” Secure by Default Products shall be designed, developed, and produced in such a way that they ensure an appropriate level of cybersecurity based on the risks โœ… Security-by-design architecture: 4-layer defense (Zod validation โ†’ rate limiting โ†’ audit logging โ†’ GDPR compliance); threat modeling integrated into SDLC; STRIDE analysis per component S-1 through E-4, L-1 through L-5, M-1 through M-7 โœ… Compliant
    1(b) โ€” No Known Exploitable Vulnerabilities Products shall be delivered without any known exploitable vulnerabilities โœ… Dependabot + npm audit + Snyk continuous scanning; SLSA Level 3 provenance; CodeQL SAST on every PR; OpenSSF Scorecard 9.4+ T-2, S-4, T-3 โœ… Compliant
    1(c) โ€” Secure Data Processing Products shall be delivered with a secure by default configuration, including the possibility to reset the product to its original state โœ… Default configuration uses HTTPS-only (no HTTP fallback); no persistent state (stateless stdio MCP server); environment-variable validation; reset via npm install (reinstall) T-4, S-2, T-1 โœ… Compliant
    1(d) โ€” Confidentiality Protection Products shall protect the confidentiality of stored, transmitted, or otherwise processed data, personal or other, such as by encrypting relevant data at rest or in transit by state of the art mechanisms โœ… HTTPS/TLS 1.3 for all EP API communications; no secrets stored (public API only); stdio transport isolation (local process); public data classification (C: Public per ISMS) S-2, T-1, I-3, I-4 โœ… Compliant
    1(e) โ€” Integrity Protection Products shall protect the integrity of stored, transmitted, or otherwise processed data, commands, programs, and configuration against any manipulation or modification not authorized by the user, as well as report on corruptions โœ… TLS integrity checks (S-2, T-1); Zod response validation against EP API schema; SLSA provenance for build artifacts; immutable cache entries; no user-writable configuration (env vars only) T-1, T-2, T-3, E-2 โœ… Compliant
    1(f) โ€” Availability & Minimal Impact Products shall process only data that are adequate, relevant, and limited to what is necessary in relation to the intended use of the product (minimize attack surface) โœ… Data minimization: only public EP data accessed; no PII storage; no credentials required; minimal npm dependencies (26 direct, audited); no shell execution; no filesystem access E-1, E-3, E-4, I-3, I-4 โœ… Compliant
    1(g) โ€” Exploitation Mitigation Products shall minimize their own negative impact on the availability of services provided by other devices or networks โœ… Client-side rate limiting (100 tokens/min); response-size limits (10MB); timeout controls (30s); LRU cache max-size (500 entries); no resource exhaustion (stateless design) D-1, D-2, D-3, D-4 โœ… Compliant
    1(h) โ€” Security Event Monitoring Products shall be designed, developed, and produced to limit attack surfaces, including external interfaces โœ… Minimal attack surface: stdio transport (no network exposure); Zod schema validation (strict input surface); TypeScript strict mode; no eval/exec; public MCP protocol (62 tools, 9 resources, 7 prompts) E-1, E-2, E-3, E-4, S-1 โœ… Compliant
    1(i) โ€” Secure Default Configuration Products shall be resilient against outages of external dependencies, e.g., power, cooling, information and communication technology infrastructure โœ… Stateless design (no persistent dependencies); EP API as single external dependency (fail-fast if unavailable); retry logic + circuit breaker (future); npm package self-contained (all deps bundled in node_modules/) D-1, D-2 โœ… Compliant
    1(j) โ€” Secure Update Mechanisms Products shall be designed to facilitate the secure execution and maintenance of software updates and patches โœ… Structured stderr audit logging (R-1, R-3); ISO 8601 timestamps; request/response logging; GDPR-compliant PII sanitization; future: centralized log aggregation (CloudWatch/SIEM) R-1, R-2, R-3, I-1 โœ… Compliant
    CRA Annex I Clause Requirement (Paraphrased) EP MCP Implementation Linked Threat IDs Status
    2(1) โ€” Vulnerability Identification Manufacturers shall identify and document vulnerabilities and components contained in the product, including by drawing up a software bill of materials (SBOM) in a commonly used and machine-readable format โœ… CycloneDX SBOM generated on every release via GitHub Actions (anchore/sbom-action); SBOM quality โ‰ฅ7.0/10 (NTIA/BSI validation); published to npm package + GitHub releases; SBOM includes all direct + transitive dependencies T-2, S-4 โœ… Compliant
    2(2) โ€” Address Vulnerabilities Without Delay Manufacturers shall address and remediate vulnerabilities without delay, including by providing security updates โœ… MTTR SLA: Critical <7d, High <30d (per Vulnerability Management Policy); Dependabot auto-PRs; npm audit CI/CD gate; rapid security-patch process (SemVer PATCH release) T-2, S-4 โœ… Compliant
    2(3) โ€” Security Policy Manufacturers shall apply effective and regular tests and reviews to ensure the cybersecurity of the product โœ… SECURITY.md vulnerability reporting policy; security@hack23.org contact; coordinated disclosure process (90-day embargo); responsible disclosure guidelines per Open Source Policy R-1, R-2, I-1 โœ… Compliant
    2(4) โ€” Vulnerability Disclosure Manufacturers shall publicly disclose information about fixed vulnerabilities and security updates, including in a machine-readable format โœ… Automated testing: Vitest unit tests (80%+ coverage); E2E integration tests; CodeQL SAST (every PR); mutation testing (future); quarterly penetration testing (planned 2026) T-1, T-2, E-1, E-2 โœ… Compliant
    2(5) โ€” Coordinated Vulnerability Disclosure Manufacturers shall facilitate the sharing of information about potential vulnerabilities in their products and associated upstream third-party components โœ… GitHub Security Advisories (GHSA) for all CVEs; npm advisory database; CHANGELOG.md for all releases; Security section in README.md; CVE publication via MITRE/NVD T-2, S-4 โœ… Compliant
    2(6) โ€” Information Sharing Manufacturers shall establish and enforce policies and procedures for coordinated vulnerability disclosure โœ… Active participation in npm/GitHub security ecosystems; SBOM + SLSA provenance shared publicly; contribution to OWASP LLM Top 10 / MCP security research; OpenSSF Best Practices badge (public evidence) T-2, S-4, L-1, M-2 โœ… Compliant
    2(7) โ€” Security Update Distribution Manufacturers shall remediate vulnerabilities by providing security updates that can be applied easily, minimizing disruption โœ… Coordinated disclosure via SECURITY.md; 90-day embargo for responsible disclosure; GitHub Security Advisories for coordination; CVSS scoring per Vulnerability Management Policy T-2, R-2 โœ… Compliant
    2(8) โ€” Vulnerability Information to Users Manufacturers shall ensure that vulnerabilities are remediated in a timely manner and made available to users โœ… npm package updates (npm install european-parliament-mcp-server@latest); SemVer PATCH for security fixes; CHANGELOG.md documents all fixes; automated Dependabot notifications for downstream users T-2, S-4 โœ… Compliant
    Compliance Area Total Clauses Compliant (โœ…) Partial (โš ๏ธ) Non-Compliant (โŒ) Compliance Rate
    Part I: Product Design (1aโ€“1j) 10 10 0 0 100%
    Part II: Vulnerability Handling (2.1โ€“2.8) 8 8 0 0 100%
    Overall CRA Annex I 18 18 0 0 100%

    Cross-Reference: For complete CRA conformity assessment including Article 10 (EU Declaration of Conformity), Article 20 (Technical Documentation), and Annex V (Conformity Assessment Process), see CRA-ASSESSMENT.md.


    This section documents accepted residual risks where mitigation costs exceed risk impact, per Hack23 Risk Management Policy ยง4.3. All residual risks are formally accepted by the CEO with scheduled quarterly review.

    Risk ID Description Residual Risk Level Accepted By Date Review Date Rationale
    Scenario-4-GDPR GDPR personal data exposure via verbose error messages or debug logs containing MEP PII (addresses, contact info, declarations) Low-Medium
    (I-1, I-2 partially mitigated)
    CEO / Hack23 AB 2026-04-28 2026-07-28 Risk: โ‚ฌ100โ€“โ‚ฌ500k ALE (worst-case โ‚ฌ10M GDPR fine, realistic โ‚ฌ0โ€“10k for OSS project with no revenue).
    Mitigation: โœ… Sanitized error handling implemented; โš ๏ธ Production log review ongoing; โœ… Public data focus (C: Public classification).
    Acceptance Criteria: Residual risk acceptable given (1) public EP data only (no GDPR Article 9 special-category data processed), (2) error sanitization controls in place (I-1), (3) realistic GDPR fine for โ‚ฌ0-revenue OSS is โ‚ฌ0โ€“10k (administrative, not โ‚ฌ10M), (4) cost of 100% PII elimination (โ‚ฌ15kโ€“25k for ML-based log scanning) exceeds realistic ALE.
    Compensating Controls: Quarterly production log audits for PII leakage; automated PII-detection regex (overdue since 2025 Q3).
    Scenario-1-Supply-Chain Supply chain compromise via backdoored npm dependency or compromised maintainer account Medium
    (T-2, S-4 mitigated but non-zero residual)
    CEO / Hack23 AB 2026-04-28 2026-07-28 Risk: โ‚ฌ500โ€“โ‚ฌ2k ALE (ARO 0.1โ€“0.2/year, SLE โ‚ฌ5kโ€“10k).
    Mitigation: โœ… Dependabot alerts; โœ… SLSA Level 3; โœ… npm audit + Snyk; โœ… SBOM (CycloneDX); โœ… package-lock.json pinning.
    Acceptance Criteria: Residual risk acceptable given (1) comprehensive supply-chain controls (SLSA L3 + Dependabot + SBOM), (2) ARO very low (0.1โ€“0.2/year = 1 incident per 5โ€“10 years for well-protected packages), (3) cost of additional controls (hardware security modules for signing, โ‚ฌ10kโ€“20k/year) exceeds ALE (โ‚ฌ500โ€“2k/year).
    Compensating Controls: Continuous OpenSSF Scorecard monitoring (target โ‰ฅ9.0); community review of all dependency updates; npm 2FA + OIDC publishing.
    L-3-Excessive-Agency Autonomous AI agent invoking high-volume tool chains causing EP API quota exhaustion (LLM06 Excessive Agency) Medium
    (D-1 mitigated but agent-unaware)
    CEO / Hack23 AB 2026-04-28 2026-07-28 Risk: โ‚ฌ50โ€“โ‚ฌ450 ALE (ARO 0.1โ€“0.3/year, SLE โ‚ฌ500โ€“1.5k).
    Mitigation: โœ… Token bucket rate limiter (100/min); โš ๏ธ No per-session limits; โš ๏ธ No autonomous-agent detection.
    Acceptance Criteria: Residual risk acceptable given (1) rate limiting provides baseline DoS protection, (2) stdio transport limits abuse to single-process (no multi-client amplification), (3) cost of agent-fingerprinting + adaptive rate limiting (โ‚ฌ8kโ€“12k development effort) exceeds current ALE, (4) EP API has own rate limits (upstream protection).
    Compensating Controls: Monitor for sustained rate-limit denials (future: add rate_limit_exceeded audit event); future v2.0: per-session quotas for HTTP/SSE transport.
    Governance Requirement Implementation Status
    Acceptance Authority CEO / Hack23 AB (per Risk Management Policy ยง4.3) โœ… Documented
    Review Frequency Quarterly (aligned with threat model review cycle) โœ… Scheduled 2026-07-28
    Acceptance Criteria (1) Mitigation cost > ALE, (2) Compensating controls in place, (3) Business justification documented โœ… Applied to all 3 risks
    Re-Evaluation Triggers (1) Control failure, (2) Threat landscape change, (3) New vulnerability disclosure, (4) Regulatory update โœ… Documented in Incident Response Plan

    Next Scheduled Review: 2026-07-28 (quarterly review aligned with threat model refresh cycle per Hack23 Threat Modeling Policy ยง5).


    Document Description Link
    ๐Ÿ›ก๏ธ Security Architecture Current security design and controls SECURITY_ARCHITECTURE.md
    ๐Ÿš€ Future Security Architecture Planned security enhancements FUTURE_SECURITY_ARCHITECTURE.md
    ๐Ÿ”ฎ Future Threat Model Threat analysis for planned architecture evolution FUTURE_THREAT_MODEL.md
    ๐Ÿ”„ Business Continuity Plan Recovery objectives and procedures BCPPlan.md
    ๐Ÿ›ก๏ธ CRA Assessment EU Cyber Resilience Act conformity CRA-ASSESSMENT.md
    ๐Ÿ›๏ธ Architecture System architecture overview ARCHITECTURE.md
    ๐Ÿ“Š Data Model Data structures and relationships DATA_MODEL.md
    ๐Ÿ”’ Security Policy Security reporting and disclosure SECURITY.md

    This threat model is maintained as part of the Hack23 AB ISMS framework.
    Licensed under Apache-2.0