EU Parliament Monitor - API Documentation - v0.8.0
    Preparing search index...

    Hack23 Logo

    ๐Ÿ›ก๏ธ EU Parliament Monitor โ€” Security Architecture

    ๐Ÿ” Security-by-Design for European Parliament Intelligence
    ๐ŸŽฏ Comprehensive Security Framework for Multi-Language News Platform

    Owner Version Effective Date Review Cycle OpenSSF Best Practices

    ๐Ÿ“‹ Document Owner: CEO | ๐Ÿ“„ Version: 2.0 | ๐Ÿ“… Last Updated: 2026-03-19 (UTC)
    ๐Ÿ”„ Review Cycle: Annual | โฐ Next Review: 2027-03-19
    ๐Ÿท๏ธ Classification: Public (Open Source European Parliament Monitoring Platform)


    Document Focus Description Documentation Link
    Architecture ๐Ÿ›๏ธ Architecture C4 model showing current system structure View Source
    Future Architecture ๐Ÿ›๏ธ Architecture C4 model showing future system structure View Source
    Mindmaps ๐Ÿง  Concept Current system component relationships View Source
    Future Mindmaps ๐Ÿง  Concept Future capability evolution View Source
    SWOT Analysis ๐Ÿ’ผ Business Current strategic assessment View Source
    Future SWOT Analysis ๐Ÿ’ผ Business Future strategic opportunities View Source
    Data Model ๐Ÿ“Š Data Current data structures and relationships View Source
    Future Data Model ๐Ÿ“Š Data Enhanced European Parliament data architecture View Source
    Flowcharts ๐Ÿ”„ Process Current data processing workflows View Source
    Future Flowcharts ๐Ÿ”„ Process Enhanced AI-driven workflows View Source
    State Diagrams ๐Ÿ”„ Behavior Current system state transitions View Source
    Future State Diagrams ๐Ÿ”„ Behavior Enhanced adaptive state transitions View Source
    Security Architecture ๐Ÿ›ก๏ธ Security Current security implementation View Source
    Future Security Architecture ๐Ÿ›ก๏ธ Security Security enhancement roadmap View Source
    Threat Model ๐ŸŽฏ Security STRIDE threat analysis View Source
    Classification ๐Ÿท๏ธ Governance CIA classification & BCP View Source
    CRA Assessment ๐Ÿ›ก๏ธ Compliance Cyber Resilience Act View Source
    Workflows โš™๏ธ DevOps CI/CD documentation View Source
    Future Workflows ๐Ÿš€ DevOps Planned CI/CD enhancements View Source
    Business Continuity Plan ๐Ÿ”„ Resilience Recovery planning View Source
    Financial Security Plan ๐Ÿ’ฐ Financial Cost & security analysis View Source
    End-of-Life Strategy ๐Ÿ“ฆ Lifecycle Technology EOL planning View Source
    Unit Test Plan ๐Ÿงช Testing Unit testing strategy View Source
    E2E Test Plan ๐Ÿ” Testing End-to-end testing View Source
    Performance Testing โšก Performance Performance benchmarks View Source
    Security Policy ๐Ÿ”’ Security Vulnerability reporting & security policy View Source

    EU Parliament Monitor is a static website generator that creates multi-language news articles about European Parliament activities. The system operates as an automated intelligence platform, generating news content through GitHub Actions workflows with minimal attack surface and public data transparency.

    The platform automatically generates and publishes news articles covering:

    • Week Ahead: Preview of upcoming parliamentary events
    • Committee Reports: Analysis of committee activities
    • Propositions: Legislative proposals analysis
    • Motions: Parliamentary motions analysis
    • Breaking News: Rapid-response coverage

    Per Hack23 ISMS Classification Framework:

    Dimension Level Rationale
    Confidentiality Public (Level 1) All data from European Parliament open data sources, no private information
    Integrity Medium (Level 2) News accuracy critical for democratic transparency, incorrect information could mislead public
    Availability Medium (Level 2) Daily updates expected, but 24-hour outages acceptable
    RTO 24 hours Manual workflow trigger available, automated recovery via GitHub Actions
    RPO 1 day Daily generation schedule, previous day's content acceptable

    Defense Strategy: Defense-in-depth with minimal attack surface

    • โœ… Static Content: No server-side execution, no databases
    • โœ… GitHub-Hosted: GitHub Pages infrastructure security
    • โœ… Minimal Dependencies: 28 devDependencies, 1 production dependency (european-parliament-mcp-server), automated updates
    • โœ… Automated Security: CodeQL, Dependabot, SonarCloud, npm audit
    • โœ… Supply Chain Security: SHA-pinned GitHub Actions, SBOM generation, SLSA Level 3 provenance
    • โœ… Workflow Hardening: StepSecurity harden-runner, OpenSSF Scorecard
    • โœ… Ephemeral Execution: GitHub-hosted runners, no persistent infrastructure
    Framework Status Evidence
    ISO 27001 โœ… Compliant Architecture documentation, access control, vulnerability management
    GDPR โœ… Compliant No PII collected, data protection by design
    NIS2 โœ… Compliant Static site architecture, minimal attack surface, incident response
    EU CRA โœ… Aligned SBOM generation, vulnerability disclosure, security updates
    Document Focus Link
    ๐Ÿ” Security Architecture Current State This document
    ๐Ÿš€ Future Security Architecture Roadmap FUTURE_SECURITY_ARCHITECTURE.md
    โš™๏ธ CI/CD Workflows Current workflows WORKFLOWS.md
    ๐Ÿš€ Future Workflows Planned enhancements FUTURE_WORKFLOWS.md
    ๐Ÿ“Š Data Model Data Structures DATA_MODEL.md
    ๐Ÿ“ˆ Security Flow Process Flows FLOWCHART.md
    ๐Ÿ“š Documentation Hub Release documentation docs/README.md
    ๐Ÿ“‹ Release Process Release procedures docs/RELEASE_PROCESS.md
    ๐ŸŽฏ Threat Model Risk Analysis #-threat-model
    ๐Ÿ›ก๏ธ ISMS Secure Development Policy Framework ISMS-PUBLIC


    This security architecture implements controls aligned with Hack23 AB's publicly available ISMS framework. For complete policy mapping, see the Hack23 ISMS-PUBLIC repository.

    Policy Domain Policy Relevance to Architecture
    ๐Ÿ” Core Security Information Security Policy Overall security governance and framework
    ๐Ÿ› ๏ธ Development Secure Development Policy Security-integrated SDLC practices, CodeQL SAST scanning
    ๐ŸŒ Network Network Security Policy GitHub Pages CDN security, HTTPS enforcement
    ๐Ÿ”’ Cryptography Cryptography Policy TLS 1.3, HTTPS-only, Content Security Policy
    ๐Ÿ” Vulnerability Vulnerability Management Dependabot, CodeQL, npm audit, weekly scans
    ๐Ÿšจ Incident Response Incident Response Plan GitHub Security Advisories, coordinated disclosure
    ๐Ÿค Third-Party Third Party Management GitHub ecosystem assessment (GitHub Pages, Actions, npm)
    ๐Ÿ”“ Open Source Open Source Policy Apache-2.0 licensing, REUSE compliance, SBOM generation
    ๐Ÿ“‹ Compliance Compliance Checklist ISO 27001, NIST CSF, CIS Controls alignment
    ๐Ÿท๏ธ Classification Classification Framework Public data classification (Level 1 confidentiality)
    ๐Ÿ‡ช๐Ÿ‡บ CRA Compliance CRA Conformity Assessment Process CRA-ASSESSMENT.md self-assessment
    ISMS Control Domain Implementation Status Notes
    ๐Ÿ”‘ Access Control โœ… Implemented GitHub CODEOWNERS, branch protection, required reviews
    ๐Ÿ”’ Cryptography โœ… Implemented TLS 1.3, HTTPS-only, HSTS
    ๐ŸŒ Network Security โœ… Implemented GitHub Pages CDN, DDoS protection, edge caching
    ๐Ÿ› ๏ธ Secure Development โœ… Implemented CodeQL SAST, ESLint, TypeScript, Prettier, pre-commit hooks
    ๐Ÿ” Vulnerability Management โœ… Implemented Dependabot (weekly), CodeQL (push/PR), npm audit
    ๐Ÿ“Š Monitoring & Logging โš ๏ธ Limited GitHub Actions logs, CDN access logs (no backend logging)
    ๐Ÿ’พ Data Protection โœ… Implemented No persistent storage, ephemeral build environment
    ๐Ÿšจ Incident Response โœ… Documented SECURITY.md, GitHub Security Advisories, 90-day disclosure

    The EU Parliament Monitor operates as a static content generation platform within the GitHub ecosystem, interfacing with the European Parliament MCP Server for data access.

    graph TB
    subgraph "External Actors"
    User[๐Ÿ‘ฅ EU Citizens & Researchers]
    EP_API[๐Ÿ›๏ธ European Parliament<br/>Open Data API]
    end

    subgraph "GitHub Infrastructure"
    GHA[โš™๏ธ GitHub Actions<br/>Automated Workflows]
    GHP[๐ŸŒ GitHub Pages<br/>Static Hosting]
    GH_SECURITY[๐Ÿ”’ GitHub Security<br/>CodeQL, Dependabot, Secrets]
    end

    subgraph "EU Parliament Monitor"
    EuPM[๐Ÿ“ฐ EU Parliament Monitor<br/>Static Website Generator]
    EPMCP[๐Ÿ”Œ European Parliament<br/>MCP Server Client]
    end

    User -->|Browse News<br/>HTTPS| GHP
    GHP -->|Serve Static<br/>HTML/CSS| User

    GHA -->|Trigger Scheduled<br/>Weekday Crons| EuPM
    GHA -->|Monitor Security| GH_SECURITY

    EuPM -->|Connect via<br/>stdio/localhost| EPMCP
    EPMCP -->|Query Parliamentary<br/>Data| EP_API
    EP_API -->|Return JSON<br/>Public Data| EPMCP

    EuPM -->|Generate<br/>Articles| GHP
    GH_SECURITY -->|Scan Code<br/>Dependencies| EuPM

    style User fill:#e1f5ff
    style EP_API fill:#fff4e1
    style GHA fill:#f0f0f0
    style GHP fill:#f0f0f0
    style GH_SECURITY fill:#ffe1e1
    style EuPM fill:#e8f5e9
    style EPMCP fill:#e8f5e9
    1. GitHub Infrastructure Boundary: Trusted GitHub Actions runners and Pages hosting
    2. MCP Communication Boundary: localhost/stdio communication between generator and MCP server
    3. External Data Boundary: European Parliament Open Data API (untrusted input)
    4. User Access Boundary: Public internet users accessing static content
    flowchart LR
    subgraph "Data Sources"
    EP[European Parliament<br/>Open Data API]
    end

    subgraph "Processing"
    MCP[MCP Server]
    GEN[News Generator]
    VAL[HTML Validator]
    end

    subgraph "Storage & Delivery"
    GIT[Git Repository]
    PAGES[GitHub Pages]
    end

    subgraph "Consumers"
    USERS[End Users]
    end

    EP -->|Public JSON| MCP
    MCP -->|Structured Data| GEN
    GEN -->|HTML Articles| VAL
    VAL -->|Validated HTML| GIT
    GIT -->|Deploy| PAGES
    PAGES -->|HTTPS| USERS

    style EP fill:#fff4e1
    style MCP fill:#e8f5e9
    style GEN fill:#e8f5e9
    style VAL fill:#e1f5ff
    style GIT fill:#f0f0f0
    style PAGES fill:#f0f0f0
    style USERS fill:#e1f5ff

    The system consists of stateless containers executing in GitHub Actions with no persistent infrastructure.

    graph TB
    subgraph "GitHub Actions Runner (Ubuntu Latest)"
    subgraph "News Generation Container"
    CLI[๐Ÿ“ generate-news-enhanced.ts<br/>TypeScript CLI Script]
    TEMPLATE[๐ŸŽจ article-template.ts<br/>HTML Generator]
    CLIENT[๐Ÿ”Œ ep-mcp-client.ts<br/>MCP Client Library]
    end

    subgraph "Index Generation Container"
    IDX[๐Ÿ“‹ generate-news-indexes.ts<br/>Index Generator]
    end

    subgraph "Sitemap Generation Container"
    SITE[๐Ÿ—บ๏ธ generate-sitemap.ts<br/>Sitemap Generator]
    end

    subgraph "European Parliament MCP Server"
    MCP[๐Ÿ›๏ธ MCP Server Process<br/>stdio Communication]
    end

    subgraph "Validation Container"
    HTML[โœ… htmlhint<br/>HTML Validator]
    LINT[๐Ÿ” ESLint<br/>Code Quality]
    TEST[๐Ÿงช Vitest<br/>Test Suite]
    end
    end

    subgraph "GitHub Infrastructure"
    REPO[๐Ÿ“š Git Repository<br/>news/, *.html, sitemap.xml]
    PAGES[๐ŸŒ GitHub Pages<br/>Static Hosting]
    SECRETS[๐Ÿ” GitHub Secrets<br/>Tokens, Variables]
    end

    subgraph "External Services"
    EP_API[๐Ÿ›๏ธ European Parliament API<br/>data.europarl.europa.eu]
    end

    CLI -->|Initialize| CLIENT
    CLIENT -->|Spawn Process| MCP
    MCP -->|HTTPS| EP_API
    EP_API -->|JSON Response| MCP
    MCP -->|Structured Data| CLIENT
    CLIENT -->|Parliamentary Data| CLI
    CLI -->|Generate HTML| TEMPLATE
    TEMPLATE -->|Write Files| REPO

    IDX -->|Read Articles| REPO
    IDX -->|Generate Indexes| REPO

    SITE -->|Scan Files| REPO
    SITE -->|Generate sitemap.xml| REPO

    HTML -->|Validate| REPO
    LINT -->|Check Quality| CLI
    TEST -->|Run Tests| CLI

    REPO -->|Deploy| PAGES
    SECRETS -->|Provide Tokens| CLI

    style CLI fill:#e8f5e9
    style TEMPLATE fill:#e8f5e9
    style CLIENT fill:#e8f5e9
    style IDX fill:#e8f5e9
    style SITE fill:#e8f5e9
    style MCP fill:#fff4e1
    style HTML fill:#e1f5ff
    style LINT fill:#e1f5ff
    style TEST fill:#e1f5ff
    style REPO fill:#f0f0f0
    style PAGES fill:#f0f0f0
    style SECRETS fill:#ffe1e1
    style EP_API fill:#fff4e1
    Container Runtime Privileges Network Access Persistence
    News Generation Node.js 25 Read/Write repo Localhost only None (ephemeral)
    Index Generation Node.js 25 Read/Write repo None None (ephemeral)
    Sitemap Generation Node.js 25 Read/Write repo None None (ephemeral)
    MCP Server Node.js 25 Read-only HTTPS to EP API None (ephemeral)
    Validation Node.js 25 Read-only None None (ephemeral)

    Detailed component-level architecture showing internal structure and security boundaries.

    graph TB
    subgraph "News Generation Components"
    direction TB
    MAIN[Main CLI<br/>Command Parser]
    LANG[Language Manager<br/>14 Languages]
    TYPE[Article Type Manager<br/>5 Types]

    subgraph "MCP Client Components"
    CONN[Connection Manager<br/>Retry Logic]
    REQ[Request Handler<br/>JSON-RPC 2.0]
    RESP[Response Parser<br/>Data Validator]
    end

    subgraph "Template Components"
    META[Metadata Generator<br/>SEO, Schema.org]
    HTML[HTML Builder<br/>Sanitization]
    CSS[Style Injector<br/>Inline CSS]
    end

    subgraph "Fallback Components"
    CACHE[Content Cache<br/>Placeholder Data]
    ERR[Error Handler<br/>Graceful Degradation]
    end
    end

    subgraph "Validation Components"
    HTMLV[HTML Validator<br/>htmlhint rules]
    JSDOC[JSDoc Checker<br/>Documentation]
    SECUR[Security Scanner<br/>eslint-plugin-security]
    end

    subgraph "Index Components"
    SCAN[Article Scanner<br/>File Discovery]
    PARSE[Metadata Parser<br/>Extract Info]
    INDEX[Index Generator<br/>Multi-language]
    end

    subgraph "Sitemap Components"
    CRAWLER[File Crawler<br/>Recursive Scan]
    URL[URL Builder<br/>Canonical URLs]
    XML[XML Generator<br/>Sitemap Protocol]
    end

    MAIN --> LANG
    MAIN --> TYPE
    LANG --> CONN
    TYPE --> CONN

    CONN --> REQ
    REQ --> RESP
    RESP --> META
    RESP --> ERR

    META --> HTML
    HTML --> CSS

    ERR --> CACHE
    CACHE --> HTML

    HTML --> HTMLV
    CSS --> HTMLV

    MAIN --> JSDOC
    MAIN --> SECUR

    SCAN --> PARSE
    PARSE --> INDEX

    CRAWLER --> URL
    URL --> XML

    style MAIN fill:#e8f5e9
    style CONN fill:#fff4e1
    style REQ fill:#fff4e1
    style RESP fill:#fff4e1
    style META fill:#e1f5ff
    style HTML fill:#e1f5ff
    style CSS fill:#e1f5ff
    style CACHE fill:#f0f0f0
    style ERR fill:#ffe1e1
    style HTMLV fill:#e1f5ff
    style JSDOC fill:#e1f5ff
    style SECUR fill:#ffe1e1
    Component Security Function Controls
    Connection Manager MCP server connection security Retry limits, timeout enforcement, error handling
    Request Handler JSON-RPC protocol integrity Schema validation, request ID tracking
    Response Parser Input validation & sanitization Data type checking, XSS prevention
    HTML Builder Output encoding HTML entity encoding, CSP compliance
    Error Handler Fail-secure behavior Fallback content, no sensitive data exposure
    HTML Validator Content integrity htmlhint rules, standards compliance
    Security Scanner SAST detection eslint-plugin-security, sonarjs rules

    flowchart TD
    subgraph "GitHub Actions Identity"
    WF[Workflow Trigger<br/>Schedule/Manual]
    TOKEN[GITHUB_TOKEN<br/>Auto-generated]
    PERMS[Permissions<br/>contents: write]
    end

    subgraph "Repository Operations"
    READ[Read Repository<br/>Checkout Code]
    WRITE[Write Changes<br/>Commit & Push]
    end

    subgraph "Security Boundaries"
    SCOPE[Token Scope<br/>Repository Only]
    EXPIRE[Token Expiry<br/>Job Duration]
    end

    WF -->|Provision| TOKEN
    TOKEN -->|Grant| PERMS
    PERMS -->|Allow| READ
    PERMS -->|Allow| WRITE

    TOKEN --> SCOPE
    TOKEN --> EXPIRE

    style WF fill:#f0f0f0
    style TOKEN fill:#ffe1e1
    style PERMS fill:#ffe1e1
    style READ fill:#e8f5e9
    style WRITE fill:#e8f5e9
    style SCOPE fill:#e1f5ff
    style EXPIRE fill:#e1f5ff

    Controls:

    • โœ… Minimal Permissions: contents: write only, no admin/secrets access
    • โœ… Auto-expiring Tokens: GITHUB_TOKEN valid only for job duration
    • โœ… SHA-pinned Actions: All actions pinned to commit SHA for supply chain security
    • โœ… Branch Protection: Required reviews, status checks before merge
    • โœ… No Persistent Credentials: Tokens destroyed after job completion

    ISMS Alignment:

    Control Implementation:

    • โŒ No Authentication Required: Public content by design
    • โœ… Read-Only Access: Users cannot modify content
    • โœ… HTTPS Enforcement: GitHub Pages forces HTTPS
    • โœ… No Server-Side Execution: No authentication bypass risks

    Security Rationale:

    • All content is public information from European Parliament
    • No PII or sensitive data
    • Read-only static files eliminate authentication attack surface
    flowchart TD
    subgraph "External Data Sources"
    EP[European Parliament API<br/>Untrusted Input]
    end

    subgraph "Validation Pipeline"
    SCHEMA[Schema Validation<br/>JSON Structure Check]
    TYPE[Type Validation<br/>Data Type Enforcement]
    RANGE[Range Validation<br/>Bounds Checking]
    end

    subgraph "Sanitization Pipeline"
    HTML_STRIP[HTML Tag Stripping<br/>Remove Dangerous Tags]
    ENTITY[Entity Encoding<br/>HTML Special Chars]
    SCRIPT[Script Removal<br/>XSS Prevention]
    end

    subgraph "Output Generation"
    SAFE[Safe HTML<br/>Validated Content]
    end

    EP -->|Raw JSON| SCHEMA
    SCHEMA -->|Valid| TYPE
    SCHEMA -->|Invalid| ERR[Log Error &<br/>Use Fallback]
    TYPE -->|Valid| RANGE
    TYPE -->|Invalid| ERR
    RANGE -->|Valid| HTML_STRIP
    RANGE -->|Invalid| ERR

    HTML_STRIP --> ENTITY
    ENTITY --> SCRIPT
    SCRIPT --> SAFE

    style EP fill:#fff4e1
    style SCHEMA fill:#e1f5ff
    style TYPE fill:#e1f5ff
    style RANGE fill:#e1f5ff
    style HTML_STRIP fill:#ffe1e1
    style ENTITY fill:#ffe1e1
    style SCRIPT fill:#ffe1e1
    style SAFE fill:#e8f5e9
    style ERR fill:#f0f0f0

    Validation Controls:

    1. Schema Validation: MCP response structure validation
    2. Type Checking: Enforce expected data types (string, number, date)
    3. Range Checking: Validate date ranges, text lengths
    4. Encoding Enforcement: UTF-8 only, reject invalid encodings

    Sanitization Controls:

    1. HTML Entity Encoding: Convert <, >, &, ", ' to entities
    2. Script Tag Removal: Strip all <script> tags from input
    3. Event Handler Removal: Remove onclick, onerror, etc.
    4. URL Validation: Validate and sanitize all href/src attributes

    ISMS Alignment:

    Data Type Classification Storage Encryption Retention
    News Articles Public Git repository At-rest (GitHub) Indefinite
    EP API Responses Public Ephemeral (runtime only) In-transit (TLS 1.3) None
    Generation Metadata Public Git repository At-rest (GitHub) Indefinite
    GitHub Tokens Secret GitHub Secrets Encrypted Auto-rotate
    MCP Communication Internal Localhost only N/A (local) None

    ISMS Alignment:

    Control Implementation:

    • โœ… No User Tracking: No cookies, no analytics, no tracking scripts
    • โœ… No Form Inputs: No data collection forms
    • โœ… No User Accounts: No registration or login
    • โœ… Static Content Only: No server-side processing of user data
    • โœ… No JavaScript: No client-side scripts of any kind in generated pages

    GDPR Compliance:

    • Article 25 (Data Protection by Design): No PII by design
    • Article 32 (Security of Processing): Public data only, no processing of personal data
    • No Data Protection Impact Assessment (DPIA) required

    Cryptographic Key Lifecycle:

    As a static site generator, EU Parliament Monitor has a minimal key management footprint:

    Key Type Purpose Management Rotation
    GitHub Actions GITHUB_TOKEN CI/CD authentication Auto-generated per job Per-workflow run (ephemeral)
    MCP PAT EP MCP Server access GitHub Secrets (encrypted at rest) Manual rotation, 90-day recommended
    TLS Certificates HTTPS for GitHub Pages GitHub-managed (Let's Encrypt) Auto-renewed every 90 days
    GPG Signing Keys Commit verification Developer-managed Per policy, minimum 2048-bit RSA

    Key Security Controls:

    • โœ… No Hardcoded Secrets: All secrets stored in GitHub Secrets (encrypted at rest with libsodium sealed boxes)
    • โœ… Ephemeral Tokens: GITHUB_TOKEN scoped to job duration and repository
    • โœ… Least Privilege: Token permissions explicitly declared per workflow (permissions: block)
    • โœ… Secret Scanning: GitHub secret scanning enabled to detect exposed credentials
    • โœ… No Application-Managed Persistent Keys: Static site requires no application-managed long-lived cryptographic keys; all platform keys (TLS, GPG) are externally managed
    • โœ… TLS 1.2+: All external connections use TLS 1.2 or higher; TLS 1.3 preferred where supported by peers (GitHub Pages, npm registry)

    ISMS Alignment:

    graph TB
    subgraph "External Network"
    direction TB
    USERS[๐ŸŒ Internet Users<br/>Public Access]
    EP_NET[๐Ÿ›๏ธ European Parliament<br/>data.europarl.europa.eu]
    end

    subgraph "GitHub Infrastructure"
    direction TB
    GH_CDN[๐ŸŒ GitHub Pages CDN<br/>HTTPS Only]
    GH_RUNNER[โš™๏ธ GitHub Actions Runner<br/>Ephemeral VM]
    end

    subgraph "Application Layer"
    direction TB
    STATIC[๐Ÿ“„ Static HTML/CSS<br/>Read-Only Files]
    MCP[๐Ÿ”Œ MCP Server<br/>localhost:random_port]
    end

    USERS -->|HTTPS 443<br/>TLS 1.3| GH_CDN
    GH_CDN -->|Serve| STATIC

    GH_RUNNER -->|HTTPS 443<br/>TLS 1.3| EP_NET
    GH_RUNNER -->|localhost<br/>stdio/pipe| MCP
    MCP -->|HTTPS 443| EP_NET

    style USERS fill:#e1f5ff
    style EP_NET fill:#fff4e1
    style GH_CDN fill:#f0f0f0
    style GH_RUNNER fill:#f0f0f0
    style STATIC fill:#e8f5e9
    style MCP fill:#e8f5e9

    Network Security Controls:

    1. HTTPS Enforcement

      • GitHub Pages enforces HTTPS for all connections
      • TLS 1.3 with strong cipher suites
      • Automatic HSTS header: max-age=31536000
    2. Localhost-Only MCP Communication

      • MCP server binds to localhost only
      • stdio/pipe communication (no network sockets)
      • Process isolation within GitHub Actions runner
    3. No Exposed Ports

      • Static site: No server ports
      • MCP server: Not exposed externally
      • GitHub Actions: Ephemeral runners, no persistent infrastructure
    4. Outbound Restrictions

      • Only HTTPS to European Parliament API
      • No other external connections
      • DNS: GitHub-managed

    ISMS Alignment:

    Current Security Headers (GitHub Pages Defaults):

    GitHub Pages provides the following default security headers:

    • X-Content-Type-Options: nosniff - Prevent MIME sniffing

    HTML Meta Tags (Implemented):

    The generated HTML pages include no inline JavaScript and no external scripts, which provides inherent XSS protection. A Content-Security-Policy meta tag is also emitted in every generated article page.

    Implemented Security Meta Tags:

    • Content-Security-Policy - Emitted in every article page via article-template.ts:
    <meta http-equiv="Content-Security-Policy"
    content="default-src 'none'; script-src 'none'; style-src 'self' 'unsafe-inline'; img-src 'self' https: data:; font-src 'self'; connect-src 'none'; frame-src 'none'; base-uri 'self'; form-action 'none'">
    • X-Content-Type-Options: nosniff - Emitted in every article page
    • Referrer-Policy: no-referrer - Emitted in every article page
    • X-Frame-Options - Relies on GitHub Pages defaults

    Policy decisions:

    • script-src 'none' โ€” static site has no JavaScript; JSON-LD type="application/ld+json" is CSP-exempt
    • style-src 'unsafe-inline' โ€” required for existing inline styles in article content
    • img-src 'self' https: data: โ€” permits EU Parliament remote images and data URIs
    • connect-src 'none', frame-src 'none', form-action 'none' โ€” hard deny on outbound connectivity and embedding

    Multi-Layer XSS Defense:

    flowchart TD
    INPUT[EP API Data /<br/>External Input]

    subgraph "Defense Layer 1: Input Validation"
    VAL[Schema Validation]
    TYPE[Type Checking]
    end

    subgraph "Defense Layer 2: Sanitization"
    STRIP[HTML Tag Stripping]
    ENCODE[Entity Encoding]
    end

    subgraph "Defense Layer 3: Output Encoding"
    HTML_ENCODE[HTML Context Encoding]
    ATTR_ENCODE[Attribute Encoding]
    end

    subgraph "Defense Layer 4: CSP"
    CSP[Content Security Policy]
    META[CSP Meta Tags]
    end

    OUTPUT[Safe HTML Output]

    INPUT --> VAL
    VAL --> TYPE
    TYPE --> STRIP
    STRIP --> ENCODE
    ENCODE --> HTML_ENCODE
    HTML_ENCODE --> ATTR_ENCODE
    ATTR_ENCODE --> CSP
    CSP --> META
    META --> OUTPUT

    style INPUT fill:#fff4e1
    style VAL fill:#e1f5ff
    style TYPE fill:#e1f5ff
    style STRIP fill:#ffe1e1
    style ENCODE fill:#ffe1e1
    style HTML_ENCODE fill:#ffe1e1
    style ATTR_ENCODE fill:#ffe1e1
    style CSP fill:#e8f5e9
    style META fill:#e8f5e9
    style OUTPUT fill:#e8f5e9

    XSS Controls:

    1. Input Validation: Reject invalid data at API boundary
    2. HTML Sanitization: Remove dangerous tags (<script>, <iframe>, etc.)
    3. Entity Encoding: Convert special characters to HTML entities via escapeHTML() in src/utils/file-utils.ts
    4. URL Validation: isSafeURL() validates URL schemes (http/https only)
    5. No JavaScript Execution: Generated articles contain zero JavaScript โ€” XSS is architecturally impossible in the output

    Testing:

    • ESLint security plugin detects XSS patterns
    • htmlhint validates HTML structure
    • Unit tests validate sanitization functions
    • Integration tests verify end-to-end XSS prevention

    Supply Chain Security Controls:

    graph TB
    subgraph "Dependency Management"
    PKG[package.json<br/>29 Dependencies]
    LOCK[package-lock.json<br/>Locked Versions]
    end

    subgraph "Automated Scanning"
    DEP[Dependabot<br/>Weekly Scans]
    AUDIT[npm audit<br/>CI Checks]
    CODEQL[CodeQL<br/>SAST]
    end

    subgraph "Update Process"
    PR[Auto PR<br/>Version Updates]
    TEST[CI Tests<br/>Validation]
    MERGE[Merge<br/>After Review]
    end

    subgraph "Enforcement"
    FAIL[Block PR<br/>on Vulnerabilities]
    BADGE[Security Badge<br/>Status]
    end

    PKG --> LOCK
    LOCK --> DEP
    LOCK --> AUDIT
    LOCK --> CODEQL

    DEP --> PR
    AUDIT --> FAIL

    PR --> TEST
    TEST --> MERGE
    CODEQL --> FAIL

    MERGE --> BADGE

    style PKG fill:#e8f5e9
    style LOCK fill:#e8f5e9
    style DEP fill:#e1f5ff
    style AUDIT fill:#e1f5ff
    style CODEQL fill:#ffe1e1
    style PR fill:#f0f0f0
    style TEST fill:#e1f5ff
    style MERGE fill:#e8f5e9
    style FAIL fill:#ffe1e1
    style BADGE fill:#e8f5e9

    Dependency Security:

    • Minimal Dependencies: 28 devDependencies, 1 production dependency (european-parliament-mcp-server)
    • Dependabot: Weekly scans, auto-generate PRs for updates
    • npm audit: CI validation, fail on moderate+ vulnerabilities
    • Version Locking: package-lock.json ensures reproducible builds
    • SHA Pinning: GitHub Actions pinned to commit SHA

    Current Dependencies:

    • All devDependencies (28 packages) plus 1 production dependency (european-parliament-mcp-server)
    • Latest versions with security patches
    • No known vulnerabilities (npm audit clean)

    ISMS Alignment:

    Workflow Security Controls:

    flowchart TD
    subgraph "Workflow Trigger"
    SCHED[Schedule Trigger<br/>Weekday Crons]
    MANUAL[Manual Trigger<br/>workflow_dispatch]
    end

    subgraph "Security Checks"
    PIN[SHA-Pinned Actions<br/>Supply Chain]
    PERM[Minimal Permissions<br/>contents: write]
    RUNNER[GitHub-Hosted Runner<br/>Ephemeral]
    end

    subgraph "Execution"
    CHECKOUT[Checkout Code]
    INSTALL[npm ci<br/>Reproducible Build]
    GENERATE[Generate News]
    VALIDATE[Validate HTML]
    end

    subgraph "Security Scans"
    AUDIT[npm audit<br/>Vulnerability Check]
    CODEQL_SCAN[CodeQL<br/>SAST]
    LINT[ESLint Security<br/>Code Quality]
    end

    subgraph "Commit"
    COMMIT[Commit Changes<br/>Automated]
    PUSH[Push to GitHub]
    end

    SCHED --> PIN
    MANUAL --> PIN
    PIN --> PERM
    PERM --> RUNNER
    RUNNER --> CHECKOUT

    CHECKOUT --> INSTALL
    INSTALL --> AUDIT
    AUDIT --> GENERATE
    GENERATE --> VALIDATE

    VALIDATE --> LINT
    LINT --> CODEQL_SCAN

    CODEQL_SCAN --> COMMIT
    COMMIT --> PUSH

    style SCHED fill:#f0f0f0
    style MANUAL fill:#f0f0f0
    style PIN fill:#ffe1e1
    style PERM fill:#ffe1e1
    style RUNNER fill:#e1f5ff
    style AUDIT fill:#ffe1e1
    style CODEQL_SCAN fill:#ffe1e1
    style LINT fill:#e1f5ff
    style COMMIT fill:#e8f5e9
    style PUSH fill:#e8f5e9

    Infrastructure Controls:

    1. Ephemeral Runners

      • GitHub-hosted runners (Ubuntu latest)
      • Destroyed after each job
      • No persistent state or credentials
      • Clean environment for each execution
    2. Secrets Management

      • GITHUB_TOKEN: Auto-generated, auto-expiring
      • No custom secrets required for current operation
      • Future: COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN for org access
    3. Workflow Permissions

      • contents: write - Repository read/write only
      • No secrets, issues, or admin access
      • Token scope limited to repository
    4. Supply Chain Security

      • All GitHub Actions SHA-pinned
      • Dependabot monitors action updates
      • SBOM generation for releases
    5. Workflow Hardening (StepSecurity Harden Runner)

      • step-security/harden-runner deployed across all CI/CD workflows
      • Egress policy: audit mode (monitors outbound network calls)
      • Egress policy: block mode on deployment workflows (only allowed endpoints)
      • Detects and reports anomalous network activity during builds

    ISMS Alignment:

    Hosting Security:

    • โœ… HTTPS Enforcement: Automatic HTTPS redirect
    • โœ… TLS 1.3: Modern protocol with strong ciphers
    • โœ… DDoS Protection: GitHub's CDN infrastructure
    • โœ… Automatic Patching: GitHub manages server updates
    • โœ… No Server Configuration: Zero server attack surface

    Static Site Security:

    • โœ… No Databases: No SQL injection risk
    • โœ… No Server-Side Code: No RCE vulnerabilities
    • โœ… Read-Only Files: Users cannot modify content
    • โœ… No User Input: No injection attack vectors
    • โœ… No Sessions: No session hijacking risk

    The 4 news generation workflows (week-ahead, committee-reports, propositions, motions) use the GitHub Agentic Workflows (gh-aw) framework with built-in security controls:

    Workflow Hardening:

    • โœ… Timeout Enforcement: timeout-minutes: 45 hard stop prevents runaway execution
    • โœ… Allowed Domains Whitelist: Network access restricted to data.europarl.europa.eu, *.europa.eu, github.com, and required infrastructure endpoints via safe-outputs configuration
    • โœ… Deterministic Branch Naming: news/{type}-{date} pattern (e.g., news/week-ahead-2026-02-23) prevents branch conflicts
    • โœ… PR Creation Limits: Maximum 1 pull request per workflow run enforced by gh-aw constraints
    • โœ… Comment Limits: Maximum 1 comment per run, 65536 character limit, 10 mention limit
    • โœ… Concurrency Control: concurrency: gh-aw-${{ github.workflow }} prevents parallel execution of the same workflow
    • โœ… Read-Only Default Permissions: permissions: {} at workflow level, elevated only where needed
    • โœ… SHA-Pinned Actions: All gh-aw actions pinned to specific commit SHA

    MCP Data Resilience:

    • ๐Ÿ”„ Fallback Data: Automatic fallback to cached/sample data if MCP server unavailable
    • โฐ Scheduled Retries: Multiple daily cron triggers ensure eventual success

    EU Parliament Monitor ensures data integrity throughout its news generation pipeline, from European Parliament source data through to published content. As a static site generator operating on public parliamentary data, integrity controls focus on content accuracy, tamper-evident change tracking, and build reproducibility.

    flowchart TD
    subgraph "Data Integrity Architecture"
    direction TB
    EP[๐Ÿ›๏ธ EP Open Data API] -->|HTTPS/TLS 1.3| VALIDATE[๐Ÿ“‹ Input Validation<br/>Schema + Type + Range]
    VALIDATE -->|Valid Data| TRANSFORM[๐Ÿ”„ Content Transform<br/>Multi-language Generation]
    VALIDATE -->|Invalid| REJECT[โš ๏ธ Reject & Log<br/>Fallback to Cached]
    TRANSFORM -->|HTML Output| SANITIZE[๐Ÿ›ก๏ธ HTML Sanitization<br/>XSS Prevention]
    SANITIZE -->|Safe Content| COMMIT[๐Ÿ“ Git Commit<br/>Immutable History]
    COMMIT -->|SHA Verified| DEPLOY[๐Ÿš€ GitHub Pages<br/>CDN Distribution]
    end

    subgraph "Audit Trail"
    direction TB
    GIT_LOG[๐Ÿ“Š Git Log<br/>Immutable Audit Trail]
    GHA_LOG[๐Ÿ“‹ GitHub Actions Logs<br/>90-day Retention]
    CODEQL[๐Ÿ” CodeQL Findings<br/>SAST Audit]
    DEP_AUDIT[๐Ÿ“ฆ Dependency Audit<br/>npm audit History]
    end

    COMMIT --> GIT_LOG
    COMMIT --> GHA_LOG

    style EP fill:#fff4e1
    style VALIDATE fill:#e1f5ff
    style SANITIZE fill:#ffe1e1
    style COMMIT fill:#e8f5e9
    style DEPLOY fill:#e8f5e9
    Control Implementation Evidence
    Immutable Commit History Git SHA-256 hash chain, signed commits via GPG Every content change has traceable commit
    Branch Protection Required reviews, status checks, no force pushes Main branch protected against unauthorized changes
    Build Provenance GitHub Actions workflow logs with SLSA Level 3 Reproducible builds with attestation
    Content Checksums Generated HTML has deterministic output from same inputs Build reproducibility verification
    Dependency Lock package-lock.json ensures reproducible installs npm ci for deterministic dependency resolution
    • โœ… Git Audit Trail: Complete history of all content changes, author attribution, timestamps
    • โœ… GitHub Actions Logs: Build execution logs retained for 90 days
    • โœ… CodeQL SAST Reports: Security scan history with finding lifecycle
    • โœ… Dependabot History: Dependency vulnerability alerts and resolution timeline
    • โœ… PR Review Trail: Code review comments and approval history for all changes
    • โœ… REUSE Compliance: License compliance audit trail via REUSE tool

    ISMS Alignment:


    EU Parliament Monitor, as a static website generator, implements tracking mechanisms appropriate for its architectureโ€”focusing on build-time operations and privacy-respecting analytics. There are no user sessions, cookies, or client-side tracking.

    flowchart TD
    subgraph "Build Session Tracking"
    direction TB
    A[โฐ GitHub Actions Trigger] -->|"Daily Cron"| B[๐Ÿ”„ Workflow Run]
    B -->|"Create"| C[๐Ÿ“ Build Session]

    B -->|"Execute"| D[๐Ÿ› ๏ธ Build Steps]
    D -->|"Generate"| E[๐Ÿ“Š Build Events]
    E -->|"Associated with"| C

    C -->|"Contains"| F[๐Ÿ“‹ Session Metadata]
    F -->|"Records"| G[๐Ÿ”‘ Run ID]
    F -->|"Records"| H[๐Ÿ‘ค Actor/Trigger]
    F -->|"Records"| I[๐ŸŒฟ Branch/Commit]
    F -->|"Records"| J[โฐ Timestamps]

    E -->|"Contains"| K[๐Ÿ“‹ Event Metadata]
    K -->|"Records"| L[๐Ÿ” Operation Type]
    K -->|"Records"| M[๐Ÿ“„ Step Name]
    K -->|"Records"| N[โœ… Success/Failure]
    K -->|"Records"| O[โฑ๏ธ Duration]

    C & E -->|"Store"| P[๐Ÿ’พ GitHub Actions Logs]
    P -->|"Analysis"| Q[๐Ÿ“Š Workflow Insights]
    P -->|"Audit"| R[๐Ÿ” Security Review]
    end

    style A fill:#2979FF,stroke:#0D47A1,stroke-width:2px,color:white,font-weight:bold
    style B fill:#00C853,stroke:#007E33,stroke-width:2px,color:white,font-weight:bold
    style C,E fill:#FF3D00,stroke:#BF360C,stroke-width:2px,color:white,font-weight:bold
    style D fill:#2979FF,stroke:#0D47A1,stroke-width:2px,color:white,font-weight:bold
    style F,K fill:#FFD600,stroke:#FF8F00,stroke-width:2px,color:black,font-weight:bold
    style G,H,I,J,L,M,N,O fill:#00E676,stroke:#00C853,stroke-width:2px,color:black,font-weight:bold
    style P fill:#673AB7,stroke:#311B92,stroke-width:2px,color:white,font-weight:bold
    style Q,R fill:#00C853,stroke:#007E33,stroke-width:2px,color:white,font-weight:bold
    classDef default font-weight:bold

    Every workflow execution creates a tracked session with comprehensive metadata:

    Build Session Metadata:

    • ๐Ÿ”‘ Unique Run Identification: Each workflow run has a unique GITHUB_RUN_ID
    • ๐Ÿ‘ค Trigger Attribution: Tracked via GITHUB_ACTOR and GITHUB_TRIGGERING_ACTOR
    • ๐ŸŒฟ Source Context: Branch (GITHUB_REF), commit SHA (GITHUB_SHA)
    • โฐ Temporal Tracking: Start time, end time, duration
    • ๐Ÿ”„ Workflow Type: Scheduled (cron), manual (workflow_dispatch), push, pull_request
    • ๐Ÿ“Š Outcome: Success, failure, cancelled, skipped

    Implementation:

    # .github/workflows/generate-news.yml
    env:
    RUN_ID: ${{ github.run_id }}
    ACTOR: ${{ github.actor }}
    COMMIT_SHA: ${{ github.sha }}
    BRANCH: ${{ github.ref_name }}

    Every build step generates trackable events:

    Build Event Metadata:

    • ๐Ÿ”„ Operation Type: Checkout, setup, install, test, build, validate, deploy
    • ๐Ÿ“Š Step Context: Step name, job name, workflow name
    • โœ… Success/Failure: Exit code, error messages
    • โฑ๏ธ Duration: Step execution time
    • ๐Ÿ“ฆ Artifacts: Generated files, logs, reports

    Key Build Events Tracked:

    1. Node.js Setup: Version, cache hits
    2. Dependency Installation: npm install duration, vulnerability counts
    3. MCP Server Pre-installation: Success/failure, fallback triggers
    4. News Generation: Articles generated per language, processing time
    5. HTML Validation: W3C validation results, error counts
    6. Deployment: GitHub Pages deploy success, deployed URLs

    Approach: No client-side tracking (no JavaScript analytics), privacy-first

    Analytics Sources:

    1. GitHub Pages CDN Logs (limited access):

      • Aggregate page view counts
      • Geographic distribution (country-level only)
      • Referrer sources
      • No individual visitor tracking
    2. Repository Insights:

      • Traffic views (14-day retention)
      • Popular content
      • Referrer analytics
      • Clone/fork statistics

    Privacy Protections:

    • โŒ No cookies
    • โŒ No fingerprinting
    • โŒ No individual user tracking
    • โŒ No third-party analytics (Google Analytics, etc.)
    • โœ… Aggregate statistics only
    • โœ… GDPR-compliant by design

    GitHub Actions Logs:

    • Retention: 90 days for public repositories
    • Access: Repository maintainers only
    • Contents: Full build logs, environment variables (secrets redacted)
    • Export: Downloadable via GitHub CLI or API

    Security Benefits:

    • ๐Ÿ” Complete build reproducibility
    • ๐Ÿšจ Anomaly detection (unusual build patterns)
    • ๐Ÿ“Š Performance monitoring (build time trends)
    • ๐Ÿ”’ Security event correlation (failed builds after dependency updates)

    EU Parliament Monitor implements security event monitoring appropriate for a static site generator, focusing on build-time security events and dependency vulnerabilities.

    flowchart TD
    subgraph "Security Event Monitoring"
    direction TB
    A[๐Ÿ›ก๏ธ GitHub Security<br>Events] --> B[โœ… Workflow Success]
    A --> C[โš ๏ธ Workflow Failure]

    D[๐Ÿ” Dependency<br>Security] --> E[๐Ÿšจ Dependabot Alert]
    D --> F[๐Ÿ”„ Automated PR]

    G[๐Ÿ”’ Code<br>Scanning] --> H[๐Ÿ” CodeQL Analysis]
    G --> I[โš ๏ธ Security Finding]

    B & C & E & F & H & I -->|"Generate"| J[๐Ÿ“ Security Event]

    J -->|"Contains"| K[๐Ÿ“‹ Event Metadata]
    K -->|"Records"| L[๐Ÿ” Event Type]
    K -->|"Records"| M[โšก Severity]
    K -->|"Records"| N[๐Ÿ”— Affected Component]
    K -->|"Records"| O[โฑ๏ธ Timestamp]

    J -->|"Triggers"| P[๐Ÿšจ Notification]
    P -->|"If Critical"| Q[๐Ÿ‘ฅ Security Team Alert]

    J -->|"Store"| R[๐Ÿ’พ GitHub Security]
    R -->|"Dashboard"| S[๐Ÿ“Š Security Overview]
    R -->|"Compliance"| T[๐Ÿ“‹ Audit Reports]
    end

    style A,D,G fill:#2979FF,stroke:#0D47A1,stroke-width:2px,color:white,font-weight:bold
    style B fill:#00E676,stroke:#00C853,stroke-width:2px,color:black,font-weight:bold
    style C,E,I fill:#FF3D00,stroke:#BF360C,stroke-width:2px,color:white,font-weight:bold
    style F,H fill:#FFD600,stroke:#FF8F00,stroke-width:2px,color:black,font-weight:bold
    style J fill:#673AB7,stroke:#311B92,stroke-width:2px,color:white,font-weight:bold
    style K,P fill:#FFD600,stroke:#FF8F00,stroke-width:2px,color:black,font-weight:bold
    style L,M,N,O fill:#00C853,stroke:#007E33,stroke-width:2px,color:white,font-weight:bold
    style Q fill:#FF3D00,stroke:#BF360C,stroke-width:2px,color:white,font-weight:bold
    style R fill:#673AB7,stroke:#311B92,stroke-width:2px,color:white,font-weight:bold
    style S,T fill:#00C853,stroke:#007E33,stroke-width:2px,color:white,font-weight:bold
    classDef default font-weight:bold

    Our system monitors several categories of security events:

    Workflow Execution Events:

    • โœ… Successful builds (baseline for anomaly detection)
    • โš ๏ธ Failed builds (potential security issues)
    • ๐Ÿ”„ Cancelled builds (manual intervention tracking)
    • โฑ๏ธ Timeout events (potential DoS indicators)

    Authentication Events:

    • ๐Ÿ”‘ GitHub token usage (GITHUB_TOKEN)
    • ๐Ÿ” Secret access patterns
    • ๐Ÿ‘ค Actor changes (unexpected triggers)

    Implementation:

    # .github/workflows/generate-news.yml
    - name: Monitor Build Security
    if: failure()
    run: |
    echo "::warning::Build failed - security review required"
    echo "Actor: ${{ github.actor }}"
    echo "Commit: ${{ github.sha }}"

    Dependabot Alerts:

    • ๐Ÿ”ด Critical vulnerabilities (CVSS โ‰ฅ 9.0)
    • ๐ŸŸ  High vulnerabilities (CVSS 7.0-8.9)
    • ๐ŸŸก Medium vulnerabilities (CVSS 4.0-6.9)
    • ๐Ÿ”ต Low vulnerabilities (CVSS < 4.0)

    Automated Response:

    • Weekly Dependabot scans
    • Automated pull requests for patches
    • Auto-merge for dev dependencies (low-risk)
    • Manual review for breaking changes

    Monitoring:

    # npm audit in CI/CD pipeline
    npm audit --audit-level=moderate

    CodeQL Analysis:

    • Triggers: Every push to main, every pull request
    • Languages: JavaScript/TypeScript (Node.js 25)
    • Security queries: OWASP Top 10, CWE Top 25
    • Findings: XSS, injection, path traversal, crypto issues

    Alert Handling:

    • ๐Ÿšจ Critical: Block PR merge
    • โš ๏ธ High: Require security review
    • ๐Ÿ’ก Medium/Low: Create issue for remediation

    Implementation:

    # .github/workflows/codeql.yml
    - name: Perform CodeQL Analysis
    uses: github/codeql-action/analyze@v3
    with:
    category: '/language:javascript'

    Deployment Security:

    • โœ… Successful deployments
    • โš ๏ธ Failed deployments
    • ๐Ÿ” Asset integrity checks
    • ๐Ÿ“Š Deployment frequency anomalies

    Health Checks:

    • HTTPS certificate validation
    • CSP header verification
    • HTML validation results
    • Link integrity checks

    GitHub Security Dashboard:

    • Location: Repository โ†’ Security tab
    • Features:
      • Dependabot alerts (real-time)
      • Code scanning results (per commit)
      • Secret scanning (not applicable for public repos)
      • Security policies (SECURITY.md)

    Notification Channels:

    1. Email: Security alerts to repository maintainers
    2. GitHub Notifications: In-app alerts
    3. Security Advisories: Public disclosure (90-day embargo)

    Response SLAs:

    • ๐Ÿ”ด Critical: 24 hours
    • ๐ŸŸ  High: 7 days
    • ๐ŸŸก Medium: 30 days
    • ๐Ÿ”ต Low: 90 days or next release

    GitHub Actions Logs:

    • Retention: 90 days
    • Contents: Full workflow execution logs
    • Access: Repository maintainers only

    Security Alert History:

    • Retention: Indefinite (until resolved)
    • Status Tracking: Open, fixed, dismissed
    • Audit Trail: All status changes logged

    EU Parliament Monitor implements a comprehensive vulnerability management program covering code, dependencies, infrastructure, and content delivery.

    flowchart TD
    subgraph "Vulnerability Detection"
    direction TB
    CODEQL[๐Ÿ” CodeQL SAST<br/>Push & PR Scans]
    DEPBOT[๐Ÿค– Dependabot<br/>Weekly Scans]
    NPM_AUDIT[๐Ÿ“ฆ npm audit<br/>CI/CD Pipeline]
    SECRET[๐Ÿ”‘ Secret Scanning<br/>Continuous]
    ESLINT[๐Ÿ“ ESLint Security<br/>Pre-commit]
    end

    subgraph "Triage & Prioritization"
    direction TB
    CVSS[๐Ÿ“Š CVSS Scoring]
    SLA[โฑ๏ธ SLA Assignment]
    ASSIGN[๐Ÿ‘ค Owner Assignment]
    end

    subgraph "Remediation"
    direction TB
    PATCH[๐Ÿ”ง Apply Patch]
    TEST[๐Ÿงช Test Fix]
    DEPLOY[๐Ÿš€ Deploy]
    VERIFY[โœ… Verify]
    end

    CODEQL --> CVSS
    DEPBOT --> CVSS
    NPM_AUDIT --> CVSS
    SECRET --> CVSS
    ESLINT --> CVSS
    CVSS --> SLA --> ASSIGN
    ASSIGN --> PATCH --> TEST --> DEPLOY --> VERIFY

    style CODEQL fill:#e1f5ff
    style DEPBOT fill:#e1f5ff
    style NPM_AUDIT fill:#e1f5ff
    style CVSS fill:#fff4e1
    style VERIFY fill:#e8f5e9
    Severity CVSS Range Response Time Resolution Time Escalation
    ๐Ÿ”ด Critical 9.0-10.0 4 hours 24 hours Immediate CEO notification
    ๐ŸŸ  High 7.0-8.9 24 hours 7 days Weekly security review
    ๐ŸŸก Medium 4.0-6.9 48 hours 30 days Monthly maintenance
    ๐ŸŸข Low 0.1-3.9 7 days 90 days Quarterly update
    • โœ… Zero Known Vulnerabilities: npm audit clean, no open CodeQL alerts
    • โœ… Dependabot PRs: Reviewed and merged within 48 hours
    • โœ… CodeQL Findings: Triaged weekly, zero open critical/high findings
    • โœ… Secret Scanning: No exposed credentials detected
    • โœ… SBOM: Software Bill of Materials generated for supply chain transparency
    Scanner Trigger Frequency Coverage
    CodeQL Push to main, PR Per-commit JavaScript/TypeScript SAST
    Dependabot Scheduled Weekly (Monday) npm ecosystem
    npm audit CI pipeline Every build Direct + transitive deps
    Secret Scanning Push Continuous All committed content
    ESLint Security Pre-commit Every commit Code quality + security rules
    REUSE CI pipeline Every build License compliance

    ISMS Alignment:


    EU Parliament Monitor manages configuration as code, ensuring all infrastructure and application settings are version-controlled, reviewed, and auditable.

    Configuration Source of Truth Validation Change Process
    GitHub Actions Workflows .github/workflows/*.yml YAML lint, action SHA pinning PR review + required checks
    TypeScript Configuration tsconfig.json (strict mode) tsc --noEmit type checking PR review
    ESLint Rules eslint.config.js npm run lint PR review
    Dependabot Config .github/dependabot.yml GitHub validation PR review
    Content Security Policy article-template.ts E2E tests verify CSP headers PR review + automated tests
    Branch Protection GitHub Repository Settings GitHub API audit Admin-only changes
    MCP Server Config .github/copilot-mcp.json Schema validation PR review
    • โœ… Git Version Control: All configuration changes tracked with full audit history
    • โœ… Required PR Reviews: No direct pushes to main branch
    • โœ… CI/CD Validation: Every configuration change validated by automated pipeline
    • โœ… Lock Files: package-lock.json prevents dependency drift
    • โœ… SHA-Pinned Actions: GitHub Actions pinned to commit SHAs for reproducibility
    • โœ… Strict TypeScript: strict: true with all additional strict checks enabled
    Framework Automated Check Frequency Evidence
    REUSE (SPDX) reuse lint in CI Every build License compliance
    OpenSSF Scorecard GitHub-integrated Weekly Supply chain security
    SLSA GitHub attestation Per-release Build provenance
    HTMLHint npm run htmlhint Every build Content standards
    TypeScript Strict tsc --noEmit Every build Type safety
    Prettier npm run format:check Every build Code consistency

    ISMS Alignment:


    EU Parliament Monitor collects security metrics and monitoring data appropriate for its static site architecture, focusing on build-time security events and supply chain monitoring.

    flowchart LR
    subgraph "Data Sources"
    GHA[๐Ÿ“Š GitHub Actions<br/>Build Metrics]
    CODEQL_M[๐Ÿ” CodeQL<br/>Finding Trends]
    DEP_M[๐Ÿ“ฆ Dependabot<br/>Alert Metrics]
    AUDIT_M[๐Ÿ” npm audit<br/>Vulnerability Count]
    end

    subgraph "Metrics Dashboard"
    KPI[๐Ÿ“ˆ Security KPIs]
    TREND[๐Ÿ“‰ Trend Analysis]
    SLA_M[โฑ๏ธ SLA Compliance]
    end

    GHA --> KPI
    CODEQL_M --> KPI
    DEP_M --> KPI
    AUDIT_M --> KPI
    KPI --> TREND
    KPI --> SLA_M

    style KPI fill:#e8f5e9
    style TREND fill:#e1f5ff
    Metric Target Measurement Current
    Mean Time to Detect (MTTD) < 1 hour Automated scanning detection โœ… Real-time (CI/CD)
    Mean Time to Remediate (MTTR) < 48 hours (high) Alert to fix merge โœ… < 48 hours
    Vulnerability Backlog 0 critical/high Open findings count โœ… 0
    Dependency Currency < 30 days behind Package age analysis โœ… Weekly updates
    Build Success Rate > 95% CI/CD pipeline metrics โœ… > 98%
    Security Test Coverage > 80% line Vitest coverage report โœ… 82%+
    SAST False Positive Rate < 10% CodeQL triage ratio โœ… < 5%
    • โœ… GitHub Advisory Database: Automatic CVE matching via Dependabot
    • โœ… npm Security Advisories: Real-time vulnerability alerts for dependencies
    • โœ… CodeQL Query Packs: Community-maintained security query updates
    • โœ… ENISA Threat Landscape: Annual threat assessment reference (documented in THREAT_MODEL.md)

    ISMS Alignment:


    EU Parliament Monitor's static architecture inherently provides high availability through GitHub Pages' globally distributed CDN infrastructure.

    graph TD
    subgraph "GitHub Pages Global CDN"
    A[๐ŸŒ Global CDN] --> B[๐ŸŒ Edge Locations<br>Worldwide]
    B --> C[๐Ÿ‡ช๐Ÿ‡บ Europe]
    B --> D[๐Ÿ‡บ๐Ÿ‡ธ Americas]
    B --> E[๐ŸŒ Asia-Pacific]
    end

    subgraph "Content Delivery"
    F[๐Ÿ‘ค User Request] -->|"DNS Resolution"| G[๐Ÿ“ก Nearest Edge]
    G -->|"Cache Hit"| H[โšก Serve Cached]
    G -->|"Cache Miss"| I[๐Ÿ”„ Origin Fetch]
    I --> J[๐Ÿ’พ GitHub Origin]
    J --> G
    G --> F
    end

    subgraph "Build Redundancy"
    K[๐Ÿ”„ Daily Build] -->|"Trigger"| L[โ˜๏ธ GitHub-Hosted<br>Runner]
    L -->|"Success"| M[โœ… Deploy]
    L -->|"Failure"| N[๐Ÿ”„ Manual Retry]
    M --> O[๐Ÿ“ฆ Static Assets]
    O --> J
    end

    style A fill:#00C853,stroke:#007E33,stroke-width:2px,color:white,font-weight:bold
    style B fill:#2979FF,stroke:#0D47A1,stroke-width:2px,color:white,font-weight:bold
    style C,D,E fill:#FF3D00,stroke:#BF360C,stroke-width:2px,color:white,font-weight:bold
    style F fill:#2979FF,stroke:#0D47A1,stroke-width:2px,color:white,font-weight:bold
    style G,H,I fill:#00E676,stroke:#00C853,stroke-width:2px,color:black,font-weight:bold
    style J fill:#673AB7,stroke:#311B92,stroke-width:2px,color:white,font-weight:bold
    style K,L,N fill:#FFD600,stroke:#FF8F00,stroke-width:2px,color:black,font-weight:bold
    style M,O fill:#00C853,stroke:#007E33,stroke-width:2px,color:white,font-weight:bold
    classDef default font-weight:bold

    Global Distribution:

    • Edge Locations: 200+ worldwide via GitHub's CDN provider (Fastly)
    • Geographic Coverage: All continents, optimized for EU access
    • Latency: <50ms for 95% of European users
    • Bandwidth: Unlimited for static content

    Availability Features:

    • โšก Automatic Failover: Multi-origin redundancy
    • ๐Ÿ”„ Self-Healing: Failed edge nodes automatically replaced
    • ๐Ÿ“Š Load Balancing: Traffic distributed across edge locations
    • ๐Ÿ’พ Persistent Cache: Content cached at edge for fast delivery

    GitHub Pages SLA:

    • Uptime Target: 99.9% (GitHub's historical performance: >99.95%)
    • Planned Downtime: None (rolling updates)
    • Unplanned Downtime: <30 minutes/month average

    EU Parliament Monitor Targets:

    • Content Availability: 99.9% (inherits GitHub Pages SLA)
    • Content Freshness: Daily updates (24-hour refresh cycle)
    • Build Availability: 99.5% (GitHub Actions SLA)

    Calculated Availability:

    • Static Content: 99.9% (GitHub Pages)
    • Build Process: 99.5% (GitHub Actions)
    • Overall System: 99.4% (content always available, builds may fail)

    Content Delivery Network (CDN):

    • Primary: GitHub Pages CDN (Fastly)
    • Regions: Global distribution with EU edge nodes
    • Fallback: GitHub's origin servers

    DNS Configuration:

    • Primary: euparliamentmonitor.hack23.com (GitHub Pages custom domain)
    • CNAME: Points to hack23.github.io
    • CDN: Automatic edge routing via DNS

    Edge Caching:

    • Static Assets: 24-hour cache (HTML, CSS, images)
    • Cache Invalidation: Automatic on new deployments
    • Stale-While-Revalidate: Serve stale content during revalidation

    Static Site Advantages:

    • โœ… No Database: No data loss risk
    • โœ… Git-Backed: Complete history in version control
    • โœ… Reproducible: Rebuild from source at any time
    • โœ… No State: Stateless architecture simplifies recovery

    Recovery Procedures:

    1. GitHub Pages Outage:

    • Detection: Automated health checks, GitHub Status page
    • Response: Wait for GitHub to resolve (typically <30 minutes)
    • Mitigation: Deploy to alternative hosting (Netlify, Vercel) if extended
    • Recovery Time: <1 hour (manual deployment to alternative CDN)

    2. Build Failure:

    • Detection: GitHub Actions workflow failure notification
    • Response: Review logs, fix issues, re-run workflow
    • Mitigation: Manual workflow trigger with workflow_dispatch
    • Recovery Time: <1 hour (investigate + fix + rebuild)

    3. Repository Compromise:

    • Detection: Unauthorized commits, CodeQL alerts
    • Response: Revert commits, rotate secrets, audit access
    • Mitigation: Protected branches, required reviews, signed commits
    • Recovery Time: <4 hours (investigation + remediation)

    4. European Parliament MCP Server Outage:

    • Detection: Build fails to fetch MCP data
    • Response: Automatic fallback to cached data
    • Mitigation: Pre-installed MCP server with sample data
    • Recovery Time: 0 (automatic fallback)

    Build Resilience:

    • ๐Ÿ”„ Retry Logic: MCP client retries failed requests (3 attempts, exponential backoff)
    • ๐Ÿ’พ Data Caching: LRU cache prevents repeated API calls
    • ๐Ÿ”„ Fallback Data: Sample MEP data if MCP unavailable
    • โฐ Scheduled Retries: Daily cron ensures eventual success

    Content Resilience:

    • ๐Ÿ“ฆ Immutable Assets: Once deployed, content persists
    • ๐Ÿ”„ Version Control: Full history in Git
    • ๐Ÿ“Š Atomic Deployments: All-or-nothing deployments
    • ๐Ÿ” Branch Protection: Prevents accidental deletions

    Infrastructure Resilience:

    • โ˜๏ธ Ephemeral Runners: GitHub-hosted runners (no persistent state)
    • ๐ŸŒ CDN Redundancy: Multiple edge nodes per region
    • ๐Ÿ”’ Origin Redundancy: GitHub's distributed infrastructure

    EU Parliament Monitor's resilience strategy leverages the inherent reliability of static site architecture combined with GitHub's infrastructure.

    flowchart TD
    subgraph "Resilience & Operational Readiness"
    A[๐Ÿ—๏ธ Static Site<br>Architecture] --> B[๐Ÿ“Š Resilience<br>Assessment]
    B --> C[๐Ÿ” Resilience<br>Characteristics]

    C --> D[๐Ÿ“ Recovery Time<br>Objective: 24h]
    C --> E[๐Ÿ“ Recovery Point<br>Objective: 1 day]

    F[๐Ÿ”„ Resilience<br>Validation] --> G[๐Ÿงช Build<br>Testing]
    F --> H[๐Ÿ”„ Deployment<br>Testing]
    F --> I[๐Ÿšจ Failover<br>Testing]

    J[โšก Operational<br>Readiness] --> K[๐Ÿ“‘ Runbooks]
    J --> L[๐Ÿ‘ฅ Response<br>Procedures]
    J --> M[๐Ÿ”„ Automated<br>Recovery]

    N[๐Ÿ“Š Business<br>Continuity] --> O[๐ŸŒ CDN<br>Distribution]
    N --> P[๐Ÿ’พ Git<br>Backup]
    N --> Q[๐Ÿ“‹ Recovery<br>Plans]
    end

    style A fill:#2979FF,stroke:#0D47A1,stroke-width:2px,color:white,font-weight:bold
    style B,C fill:#00C853,stroke:#007E33,stroke-width:2px,color:white,font-weight:bold
    style D,E fill:#FFD600,stroke:#FF8F00,stroke-width:2px,color:black,font-weight:bold
    style F,J,N fill:#673AB7,stroke:#311B92,stroke-width:2px,color:white,font-weight:bold
    style G,H,I,K,L,M,O,P,Q fill:#00E676,stroke:#00C853,stroke-width:2px,color:black,font-weight:bold
    classDef default font-weight:bold

    Inherent Resilience Advantages:

    1. ๐Ÿ“ฆ No Dynamic State:

      • No session data to lose
      • No database to corrupt
      • No cache coherency issues
      • Complete recovery from Git
    2. ๐Ÿ”„ Reproducible Builds:

      • Deterministic build process
      • Same input โ†’ same output
      • Version-pinned dependencies
      • Reproducible at any time
    3. ๐ŸŒ Global Distribution:

      • GitHub Pages CDN (200+ edge locations)
      • No single point of failure
      • Automatic edge failover
      • Multi-region redundancy
    4. ๐Ÿ’พ Git-Backed Persistence:

      • Complete history in version control
      • Multiple repository copies (GitHub, local clones)
      • Instant rollback capability
      • Immutable commit history

    Recovery Time Objective (RTO): 24 hours

    Scenario Detection Time Recovery Action Total RTO Impact
    GitHub Pages Outage <5 minutes Wait for GitHub or deploy to alternative CDN <1 hour Low (GitHub SLA: 99.9%)
    Build Failure <5 minutes Fix issue + re-run workflow <1 hour Low (daily updates acceptable)
    Repository Compromise <1 hour Revert commits + rotate secrets <4 hours Medium (requires investigation)
    MCP Server Outage <5 minutes Automatic fallback to cached data 0 (automatic) None (transparent failover)

    Recovery Point Objective (RPO): 1 day

    Data Type Backup Frequency Max Data Loss Recovery Source
    Source Code Every commit 0 (Git-backed) GitHub repository, local clones
    Generated Content Daily build 1 day Regenerate from MCP data
    Build Configuration Every commit 0 (Git-backed) .github/workflows/
    Dependencies Weekly scans 0 (npm lockfile) package-lock.json

    Build Failure Handling:

    1. ๐Ÿ”„ Automatic Retry:

      # .github/workflows/generate-news.yml
      - name: Generate News with Retry
      uses: nick-fields/retry@v2
      with:
      timeout_minutes: 10
      max_attempts: 3
      command: npm run generate-news
    2. ๐Ÿ’พ Dependency Caching:

      - name: Cache npm dependencies
      uses: actions/cache@v4
      with:
      path: ~/.npm
      key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
    3. ๐Ÿ”„ Manual Trigger:

      • workflow_dispatch event for manual execution
      • Allows re-running failed builds immediately
      • No waiting for next scheduled run
    4. โฐ Scheduled Execution:

      • Weekday crons: Committee (04:00), Propositions (05:00), Motions (06:00), Week Ahead (Fridays 07:00 UTC)
      • Ensures fresh content even after failures
      • Multiple retry opportunities per week

    Deployment Resilience:

    • Atomic Deployments: GitHub Pages deploys all files or none
    • Rollback Capability: Revert commit + re-deploy previous version
    • Zero-Downtime: Old content served until new deployment completes
    • Immutable URLs: Assets never change once deployed

    Runbooks:

    1. [RUNBOOK-001] Build Failure Response:

      • Check GitHub Actions logs
      • Review error messages
      • Test locally: npm run generate-news
      • Fix issue โ†’ commit โ†’ push
      • Or: manual trigger via workflow_dispatch
    2. [RUNBOOK-002] Deployment Failure Response:

      • Verify GitHub Pages settings
      • Check branch protection rules
      • Review CNAME configuration
      • Re-run deployment workflow
    3. [RUNBOOK-003] MCP Server Outage:

      • Verify MCP server status
      • Check fallback data activation
      • Monitor automated retries
      • Escalate if outage >24 hours
    4. [RUNBOOK-004] Security Incident Response:

      • Follow SECURITY.md procedures
      • Review GitHub Security Advisories
      • Assess impact โ†’ contain โ†’ remediate โ†’ recover
      • Document lessons learned

    Response Teams:

    • Primary: Repository maintainers (GitHub notifications)
    • Escalation: Hack23 security team (security@hack23.com)
    • External: European Parliament MCP team (for MCP issues)

    Automated Recovery:

    • โœ… Dependabot: Automatic PRs for dependency updates
    • โœ… Branch Protection: Prevents accidental deletions
    • โœ… Status Checks: Block merges that fail tests
    • โœ… MCP Fallback: Automatic data fallback on failures

    1. ๐ŸŒ Multi-Region CDN Distribution:

    • GitHub Pages serves from 200+ edge locations
    • EU users served from European edge nodes
    • Automatic failover between edge nodes
    • <50ms latency for 95% of EU users

    2. ๐Ÿ’พ Git-Based Disaster Recovery:

    • Repository Copies: GitHub + local clones + forks
    • Backup Strategy: Git inherently creates distributed backups
    • Recovery: Clone from any copy + re-deploy
    • Time to Recover: <1 hour

    3. ๐Ÿ“‹ Alternative Hosting Plans:

    • Primary: GitHub Pages
    • Alternative 1: Netlify (similar static hosting)
    • Alternative 2: Vercel (Edge Functions for future enhancements)
    • Alternative 3: AWS S3 + CloudFront (if GitHub entirely unavailable)

    4. ๐Ÿ”„ Build Reproducibility:

    • Node.js version pinned (25.x, upgrading to 26.x LTS ~Apr 2026)
    • Dependencies locked (package-lock.json)
    • Environment variables documented
    • Can rebuild on any system with Node.js

    Availability Metrics:

    • Current Uptime: 99.95% (last 12 months, per GitHub Pages)
    • Mean Time to Recovery (MTTR): <1 hour
    • Mean Time Between Failures (MTBF): 2,190 hours (91 days)

    Build Metrics:

    • Build Success Rate: 98.5% (last 90 days)
    • Average Build Duration: 3m 45s
    • Deployment Success Rate: 99.8%

    Recovery Capabilities:

    • Automated Recovery: 80% of failures (MCP fallback, retry logic)
    • Manual Recovery Time: <1 hour (simple issues)
    • Disaster Recovery Time: <4 hours (complex issues)

    EU Parliament Monitor implements automated security operations through GitHub's native security features and CI/CD automation.

    flowchart TD
    subgraph "Automated Security Maintenance"
    A[โฑ๏ธ Weekly<br>Schedule] --> B[๐Ÿ”„ Automated<br>Operations]

    B --> C[๐Ÿ” Dependency<br>Scanning]
    B --> D[๐Ÿ› ๏ธ Automated<br>Updates]
    B --> E[๐Ÿ”’ Code<br>Analysis]
    B --> F[๐Ÿ“Š Compliance<br>Checks]

    C --> G[๐Ÿ“ Dependabot<br>Alerts]
    D --> H[๐Ÿ”„ Automated<br>PRs]
    E --> I[๐Ÿ” CodeQL<br>Results]
    F --> J[โœ… REUSE<br>Compliance]

    G & H & I & J --> K[๐Ÿ“ฆ Security<br>Dashboard]
    end

    style A fill:#FFD600,stroke:#FF8F00,stroke-width:2px,color:black,font-weight:bold
    style B fill:#00C853,stroke:#007E33,stroke-width:2px,color:white,font-weight:bold
    style C,D,E,F fill:#2979FF,stroke:#0D47A1,stroke-width:2px,color:white,font-weight:bold
    style G,H,I,J fill:#FF3D00,stroke:#BF360C,stroke-width:2px,color:white,font-weight:bold
    style K fill:#673AB7,stroke:#311B92,stroke-width:2px,color:white,font-weight:bold
    classDef default font-weight:bold

    Configuration:

    # .github/dependabot.yml
    version: 2
    updates:
    - package-ecosystem: 'npm'
    directory: '/'
    schedule:
    interval: 'weekly'
    day: 'monday'
    time: '08:00'
    timezone: 'Europe/Stockholm'
    open-pull-requests-limit: 10
    reviewers:
    - 'pethers'
    assignees:
    - 'pethers'
    commit-message:
    prefix: 'chore(deps)'
    include: 'scope'

    Automated Actions:

    • ๐Ÿ” Weekly Scans: Every Monday 08:00 Europe/Stockholm
    • ๐Ÿ”„ Automated PRs: Up to 10 concurrent pull requests
    • ๐ŸŽฏ Severity-Based: Critical/High prioritized first
    • ๐Ÿ‘ค Auto-Assign: PRs assigned to maintainers
    • โœ… Auto-Merge: Dev dependencies (low risk) auto-merged if tests pass

    Severity Handling:

    Severity Response Time Action Auto-Merge
    Critical 24 hours Immediate review + merge โŒ No (breaking changes risk)
    High 7 days Priority review + merge โŒ No
    Medium 30 days Standard review โš ๏ธ If dev dependency
    Low 90 days Batch with other updates โœ… Yes (if dev dependency)

    Configuration:

    # .github/workflows/codeql.yml
    name: 'CodeQL Advanced'
    on:
    push:
    branches: ['main']
    pull_request:
    branches: ['main']
    schedule:
    - cron: '0 8 * * 1' # Weekly Monday 08:00 UTC

    jobs:
    analyze:
    name: Analyze (javascript-typescript)
    runs-on: ubuntu-latest
    steps:
    - name: Checkout repository
    uses: actions/checkout@v4

    - name: Initialize CodeQL
    uses: github/codeql-action/init@v3
    with:
    languages: javascript-typescript
    queries: security-extended

    - name: Perform CodeQL Analysis
    uses: github/codeql-action/analyze@v3
    with:
    category: '/language:javascript-typescript'

    Automated Scanning:

    • โšก Trigger Events: Push to main, pull requests, weekly scheduled
    • ๐Ÿ” Query Suite: security-extended (OWASP Top 10, CWE Top 25)
    • ๐Ÿ“Š Language: JavaScript/TypeScript
    • ๐Ÿšจ Blocking: High/Critical findings block PR merge

    Alert Management:

    • Auto-Dismiss: False positives marked by maintainers
    • Auto-Close: Fixed issues automatically closed when remediated
    • Auto-Comment: CodeQL comments on PRs with findings

    Build-Time Security Checks:

    1. npm audit (every build):

      - name: Run npm audit
      run: npm audit --audit-level=moderate
    2. HTML Validation (every build):

      - name: Validate HTML
      run: npm run validate:html
    3. REUSE Compliance (every build):

      - name: REUSE Compliance Check
      uses: fsfe/reuse-action@v4
    4. Dependency Review (on PRs):

      - name: Dependency Review
      uses: actions/dependency-review-action@v4

    Security Gates:

    • โœ… All checks must pass before merge
    • ๐Ÿšซ Blocking: npm audit failures (moderate+)
    • โš ๏ธ Warning: HTML validation errors (non-blocking)
    • โœ… Required: REUSE compliance

    REUSE Compliance Automation:

    # .github/workflows/reuse.yml
    name: REUSE Compliance
    on: [push, pull_request]
    jobs:
    reuse:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: REUSE Compliance Check
    uses: fsfe/reuse-action@v4

    What It Checks:

    • โœ… License Headers: All source files have SPDX identifiers
    • โœ… License Files: LICENSES/ directory contains license texts
    • โœ… Copyright Statements: Copyright information present
    • โœ… REUSE.toml: Configuration file valid

    Benefits:

    • ๐Ÿ” License Compliance: Automated license header verification
    • ๐Ÿ“‹ Audit Trail: Every file's licensing clearly documented
    • โšก Fast Feedback: <1 minute check on every push
    • ๐Ÿšซ Enforcement: Blocks PRs without proper licensing

    GitHub Security Notifications:

    Event Notification Channel Response Time
    Dependabot Alert Email + GitHub UI 24h (Critical), 7d (High)
    CodeQL Finding PR Comment + Email Immediate (blocks merge)
    Workflow Failure Email <1 hour (during business hours)
    Secret Scanning Email + Security Tab Immediate

    Integration with External Tools:

    • ๐Ÿ”” Slack/Discord: (Future) Webhook notifications
    • ๐Ÿ“ง Email: Built-in GitHub notifications
    • ๐Ÿ“ฑ Mobile: GitHub mobile app push notifications

    Efficiency Gains:

    • โšก Time Savings: ~8 hours/week (manual security checks eliminated)
    • ๐Ÿ”„ Consistency: 100% of commits scanned (no human error)
    • ๐Ÿš€ Speed: Dependabot PRs created within 1 hour of vulnerability disclosure
    • ๐Ÿ“Š Coverage: 29/29 dependencies monitored (100%)

    Security Improvements:

    • ๐Ÿ” Early Detection: Vulnerabilities found before production
    • ๐Ÿ›ก๏ธ Defense-in-Depth: Multiple automated security layers
    • ๐Ÿ“ˆ Continuous Improvement: Weekly scans catch new vulnerabilities
    • ๐Ÿ” Supply Chain Security: Automated dependency review

    EU Parliament Monitor implements comprehensive application-level security controls focused on input validation, output encoding, and content integrity for its static site generation pipeline.

    Layer Control Implementation
    Schema Validation JSON structure verification MCP response schema validation before processing
    Type Enforcement TypeScript strict mode Compile-time type safety with strict: true
    Range Checking Bounds validation Date ranges, string lengths, numeric bounds
    HTML Sanitization XSS prevention html-sanitize.ts strips dangerous HTML tags and attributes
    Content Validation Article quality scoring article-quality-scorer.ts validates generated content
    • โœ… HTML Entity Encoding: All European Parliament data HTML-encoded before insertion
    • โœ… CSP Hash-Based Script Allowlisting: Inline scripts allowed only via SHA-256 hash
    • โœ… No Dynamic Script Generation: All content is static HTML, no runtime script evaluation
    • โœ… Template Escaping: article-template.ts uses safe template patterns
    • โœ… Multi-Language Safety: Content validators check all 14 language variants for XSS vectors
    • โœ… Article Validation: validate-articles.ts checks all generated articles for structural integrity
    • โœ… HTML Standards Compliance: htmlhint validates HTML5 standards compliance
    • โœ… Accessibility Testing: WCAG 2.1 AA compliance via axe-core in E2E tests
    • โœ… Link Integrity: Internal links validated during build process
    • โœ… Metadata Consistency: news-metadata.ts ensures article metadata integrity across languages

    ISMS Alignment:


    EU Parliament Monitor implements a defense-in-depth security strategy with multiple overlapping layers of protection, ensuring that a compromise of any single layer does not lead to complete security failure.

    graph TB
    subgraph "Defense-in-Depth Layers"
    direction TB
    A[๐ŸŒ Edge/CDN Layer] --> B[๐Ÿ”’ Network Layer]
    B --> C[๐Ÿ›ก๏ธ Application Layer]
    C --> D[๐Ÿ” Data Layer]
    D --> E[๐Ÿ’พ Storage Layer]
    E --> F[๐Ÿ—๏ธ Infrastructure Layer]
    F --> G[๐Ÿ“Š Monitoring Layer]

    A --> A1[GitHub Pages CDN<br>DDoS Protection<br>TLS 1.3]
    B --> B1[HTTPS-Only<br>CSP Headers<br>Secure Headers]
    C --> C1[Input Validation<br>XSS Prevention<br>Dependency Security]
    D --> D1[No Persistent Data<br>Public Data Only<br>Sanitization]
    E --> E1[Git-Backed Storage<br>Immutable History<br>Signed Commits]
    F --> F1[GitHub Actions<br>Ephemeral Runners<br>Minimal Secrets]
    G --> G1[CodeQL SAST<br>Dependabot<br>Audit Logs]
    end

    style A,B,C,D,E,F,G fill:#2979FF,stroke:#0D47A1,stroke-width:2px,color:white,font-weight:bold
    style A1,B1,C1,D1,E1,F1,G1 fill:#00E676,stroke:#00C853,stroke-width:2px,color:black,font-weight:bold
    classDef default font-weight:bold

    GitHub Pages CDN Protection:

    • ๐ŸŒ Global Distribution: 200+ edge locations (Fastly-powered)
    • ๐Ÿ›ก๏ธ DDoS Mitigation: Automatic traffic scrubbing at edge
    • ๐Ÿ”’ TLS 1.3: Modern encryption for all traffic
    • โšก Rate Limiting: Edge-level request throttling
    • ๐Ÿ” Certificate Management: Automatic Let's Encrypt renewal

    Security Benefits:

    • Absorbs DDoS attacks before reaching origin
    • Reduces attack surface (no exposed servers)
    • Prevents protocol downgrade attacks
    • Ensures always-on HTTPS

    HTTP Security Headers:

    Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
    X-Content-Type-Options: nosniff

    Note: HSTS and nosniff are provided by GitHub Pages. CSP is implemented via HTML meta tags in article pages. X-Frame-Options and Permissions-Policy are planned as future enhancements.

    Network Controls:

    • โœ… HTTPS-Only: No HTTP traffic (301 redirects)
    • โœ… HSTS Preloading: Browser-enforced HTTPS
    • โœ… No JavaScript: Architectural XSS prevention (no scripts to execute)
    • โœ… No Inline Scripts: HTML output contains zero JavaScript

    Security Benefits:

    • Prevents man-in-the-middle attacks via HTTPS/HSTS
    • XSS is architecturally prevented (no JavaScript in output)
    • Prevents MIME-type confusion attacks
    • Enforces secure communication

    Input Validation & Sanitization:

    // src/utils/file-utils.ts
    export function escapeHTML(str: string): string {
    return str
    .replace(/&/g, '&amp;')
    .replace(/</g, '&lt;')
    .replace(/>/g, '&gt;')
    .replace(/"/g, '&quot;')
    .replace(/'/g, '&#39;');
    }

    export function isSafeURL(url: string): boolean {
    try {
    const parsed = new URL(url);
    return parsed.protocol === 'http:' || parsed.protocol === 'https:';
    } catch {
    return false;
    }
    }

    Dependency Security:

    • ๐Ÿ“ฆ Minimal Dependencies: 28 devDependencies, 1 production dependency
    • ๐Ÿ”’ Lock Files: package-lock.json ensures reproducible builds
    • ๐Ÿ” Weekly Scans: Dependabot monitors for vulnerabilities
    • โœ… Automated Updates: Auto-merge dev dependency patches

    Code Security:

    • ๐Ÿ” CodeQL SAST: Scans for OWASP Top 10, CWE Top 25
    • ๐Ÿ“ ESLint: Enforces secure coding patterns
    • โšก Type Safety: TypeScript type system with strict checks
    • ๐Ÿ”’ No eval(): No dynamic code execution

    Security Benefits:

    • Prevents XSS attacks via sanitization
    • Detects vulnerabilities before production
    • Minimizes supply chain attack surface
    • Enforces secure coding standards

    Data Minimization:

    • No User Data: No authentication, no user accounts
    • Public Data Only: European Parliament open data sources
    • No Cookies: No tracking, no session data
    • No Analytics: No third-party tracking (privacy by design)

    Data Validation:

    // src/clients/ep-mcp-client.ts - Build-time data validation
    // MCP responses are validated and sanitized before HTML generation
    const rawData = await mcpClient.callTool('get_meps', params);
    const sanitizedName = escapeHTML(rawData.name);
    const validUrl = isSafeURL(rawData.photoUrl) ? rawData.photoUrl : '';

    Security Benefits:

    • GDPR compliance by design (no PII)
    • No data breach risk (no sensitive data)
    • Privacy-preserving (no tracking)
    • Integrity protection (schema validation)

    Git-Backed Security:

    • ๐Ÿ’พ Immutable History: All changes tracked in Git
    • โœ๏ธ Signed Commits: (Future) GPG-signed commits for authenticity
    • ๐Ÿ”’ Branch Protection: Main branch requires reviews
    • ๐Ÿ” Required Checks: Tests + CodeQL + REUSE must pass

    Repository Security:

    # Branch protection rules (main branch)
    - Require pull request reviews: 1 reviewer
    - Dismiss stale reviews: true
    - Require status checks: [CodeQL, REUSE, npm audit]
    - Require signed commits: false (future: true)
    - Lock branch: false

    Security Benefits:

    • Complete audit trail of all changes
    • Prevents unauthorized modifications
    • Enables instant rollback
    • Detects unauthorized access

    GitHub Actions Security:

    • โ˜๏ธ Ephemeral Runners: Fresh VM for each build
    • ๐Ÿ”’ Minimal Secrets: Only GITHUB_TOKEN (auto-generated)
    • ๐Ÿ“Œ SHA Pinning: Actions pinned to specific commits
    • ๐Ÿ” Read-Only Tokens: Restricted permissions

    Build Environment:

    permissions:
    contents: read # Read repository
    pages: write # Deploy to GitHub Pages
    id-token: write # OIDC token for GitHub Pages
    security-events: write # CodeQL results

    Security Benefits:

    • No persistent infrastructure to compromise
    • Secrets automatically rotated
    • Supply chain attack prevention (pinned actions)
    • Least privilege access (scoped tokens)

    Continuous Monitoring:

    • ๐Ÿ” CodeQL: Every push, every PR
    • ๐Ÿ“ฆ Dependabot: Weekly dependency scans
    • ๐Ÿ”’ Secret Scanning: (GitHub built-in, not applicable for public repo)
    • ๐Ÿ“Š Workflow Monitoring: Build success/failure tracking

    Audit Logging:

    • Git History: All code changes logged
    • GitHub Actions Logs: 90-day retention
    • Security Events: Dependabot/CodeQL alerts logged
    • Deployment History: GitHub Pages deployment log

    Security Benefits:

    • Early vulnerability detection
    • Real-time security monitoring
    • Complete audit trail
    • Incident response capabilities

    The defense-in-depth approach ensures:

    1. No Single Point of Failure: Compromise of one layer doesn't break entire security
    2. Overlapping Controls: Multiple layers protect same assets (e.g., XSS prevented by CSP + sanitization + CodeQL)
    3. Detection at Multiple Levels: Security events detected at application layer, infrastructure layer, and monitoring layer
    4. Graceful Degradation: If one control fails, others still provide protection

    Example Attack Scenario:

    ๐Ÿšจ XSS Attack Attempt via European Parliament Data
    โ”œโ”€ Layer 1 (CDN): โœ… Passes (static content delivery)
    โ”œโ”€ Layer 2 (Network): ๐Ÿ›ก๏ธ No JavaScript in output (architectural prevention)
    โ”œโ”€ Layer 3 (Application): ๐Ÿงน escapeHTML() sanitizes malicious content
    โ”œโ”€ Layer 4 (Data): โœ… Schema validation rejects invalid input
    โ”œโ”€ Layer 6 (Infrastructure): ๐Ÿ”’ Build fails if XSS in templates
    โ””โ”€ Layer 7 (Monitoring): ๐Ÿ” CodeQL detects XSS vulnerability in code

    Result: Attack blocked by 4 independent layers

    Note: This section provides a summary of the threat model. For comprehensive threat analysis including detailed STRIDE analysis, attack scenarios, and mitigation strategies, see THREAT_MODEL.md.

    Asset Value Confidentiality Integrity Availability
    Generated News Articles High Public High Medium
    European Parliament Data Accuracy High Public High Medium
    Website Availability Medium N/A N/A Medium
    Repository Code Medium Public High Medium
    Git History Medium Public High Low

    Category: Injection (STRIDE: Tampering)

    Scenario: Malicious actor injects JavaScript via European Parliament API responses, executed in user browsers.

    Attack Vector:

    1. Attacker compromises EP API or performs MITM
    2. Injects malicious <script> tags in session titles or descriptions
    3. News generator includes malicious script in HTML
    4. User browsers execute script, potentially redirecting users to malicious sites

    Likelihood: Low (EP API is authoritative source, HTTPS prevents MITM)

    Impact: High (could compromise user trust, redirect to malicious sites)

    Controls:

    • โœ… Input Validation: Schema validation on MCP responses
    • โœ… HTML Sanitization: escapeHTML() encodes all dangerous characters
    • โœ… Entity Encoding: Convert <, >, &, ", ' to HTML entities
    • โœ… URL Validation: isSafeURL() validates URL schemes (http/https only)
    • โœ… No JavaScript: Generated articles contain zero JavaScript โ€” XSS cannot execute in the output
    • โœ… Testing: ESLint security plugin, XSS test cases

    Residual Risk: Low - Multiple defense layers make successful XSS extremely difficult

    MITRE ATT&CK Mapping: T1189 (Drive-by Compromise)


    Category: Elevation of Privilege (STRIDE: Elevation of Privilege)

    Scenario: Malicious code injected into npm dependency, executed during news generation.

    Attack Vector:

    1. Attacker compromises npm package used by project
    2. Malicious code injected into package update
    3. Dependabot creates PR with compromised package
    4. PR merged without detecting malicious code
    5. GitHub Actions executes malicious code with write access to repository

    Likelihood: Low (minimal dependencies, Dependabot alerts, code review)

    Impact: High (could compromise repository, inject malicious content)

    Controls:

    • โœ… Minimal Dependencies: 28 devDependencies, 1 production dependency
    • โœ… Dependabot: Automated vulnerability scanning, weekly updates
    • โœ… npm audit: CI validation fails on moderate+ vulnerabilities
    • โœ… Code Review: All PRs require review before merge
    • โœ… Version Locking: package-lock.json prevents unexpected updates
    • โœ… SBOM: Software Bill of Materials for releases
    • โœ… SHA Pinning: GitHub Actions pinned to commit SHA

    Residual Risk: Low - Multiple validation layers and minimal attack surface

    MITRE ATT&CK Mapping: T1195.002 (Supply Chain Compromise: Compromise Software Supply Chain)


    Category: Information Disclosure / Tampering (STRIDE: Tampering)

    Scenario: Incorrect or misleading news articles generated due to API changes, bugs, or data corruption.

    Attack Vector:

    1. European Parliament API changes data format
    2. MCP client fails to validate new format
    3. News generator produces incorrect articles
    4. Public consumes misleading information about parliamentary activities

    Likelihood: Medium (APIs evolve, schema drift possible)

    Impact: High (misinformation damages credibility, public trust)

    Controls:

    • โœ… Schema Validation: Strict JSON schema validation on MCP responses
    • โœ… Type Checking: Enforce expected data types
    • โœ… Fallback Content: Graceful degradation to placeholder content
    • โœ… Error Logging: All validation failures logged for investigation
    • โœ… Manual Review: Generated content should be spot-checked (future)
    • โš ๏ธ Automated Testing: Integration tests validate MCP client (current)
    • ๐Ÿ”ฎ Digital Signatures: Future enhancement for content verification

    Residual Risk: Medium - Schema validation reduces risk, but manual review not automated

    MITRE ATT&CK Mapping: T1565.001 (Data Manipulation: Stored Data Manipulation)


    Category: Denial of Service (STRIDE: Denial of Service)

    Scenario: GitHub Actions unavailable, preventing news generation.

    Attack Vector:

    1. GitHub Actions experiences downtime (service interruption)
    2. Scheduled workflow fails to execute
    3. News articles not generated for extended period
    4. Website becomes stale, missing recent parliamentary activities

    Likelihood: Low (GitHub has high availability SLA)

    Impact: Medium (24-hour RTO acceptable per classification)

    Controls:

    • โœ… Manual Trigger: workflow_dispatch allows manual execution
    • โœ… Cached Content: Previous articles remain available
    • โœ… Monitoring: GitHub Actions status visible
    • โœ… RTO/RPO Alignment: 24-hour RTO, 1-day RPO acceptable
    • ๐Ÿ”ฎ Alternative Hosting: Future multi-region deployment
    • ๐Ÿ”ฎ Uptime Monitoring: Future Pingdom/StatusCake integration

    Residual Risk: Low - GitHub's infrastructure is highly reliable, manual trigger available

    MITRE ATT&CK Mapping: T1499 (Endpoint Denial of Service)


    Category: Tampering / Elevation of Privilege (STRIDE: Tampering, Elevation of Privilege)

    Scenario: Attacker gains unauthorized access to repository, injects malicious code.

    Attack Vector:

    1. Attacker compromises developer account (phishing, credential theft)
    2. Pushes malicious code to repository
    3. Malicious code bypasses code review (social engineering)
    4. GitHub Actions executes malicious code with repository write access
    5. Malicious content injected into generated articles

    Likelihood: Low (GitHub account security, branch protection, code review)

    Impact: High (could compromise website integrity, user trust)

    Controls:

    • โœ… Branch Protection: Required reviews, status checks before merge
    • โœ… Code Review: All changes reviewed by maintainers
    • โœ… CodeQL: Automated SAST scanning detects common vulnerabilities
    • โœ… ESLint Security: Static analysis for security issues
    • โœ… MFA Required: GitHub organization requires MFA for all members
    • โœ… Audit Logs: Git history provides immutable audit trail
    • โœ… Revert Capability: Easy rollback via git revert

    Residual Risk: Low - Multiple security layers prevent and detect unauthorized changes

    MITRE ATT&CK Mapping: T1078 (Valid Accounts), T1190 (Exploit Public-Facing Application)


    Category: Spoofing / Tampering (STRIDE: Spoofing, Tampering)

    Scenario: Malicious MCP server provides false data or attempts to compromise news generator.

    Attack Vector:

    1. Attacker replaces legitimate MCP server with malicious version
    2. Malicious server returns crafted responses
    3. News generator processes malicious data
    4. Articles contain injected content or malicious links

    Likelihood: Very Low (MCP server runs locally, no external MCP server connections)

    Impact: High (could inject malicious content, compromise integrity)

    Controls:

    • โœ… Localhost Only: MCP server runs on localhost, not exposed externally
    • โœ… Process Isolation: MCP server spawned by news generator, not pre-existing process
    • โœ… Input Validation: All MCP responses validated against schema
    • โœ… Ephemeral Execution: MCP server destroyed after news generation
    • โœ… No Persistent State: MCP server has no persistence between runs
    • ๐Ÿ”ฎ Mutual TLS: Future enhancement for authenticated MCP communication
    • ๐Ÿ”ฎ Response Signatures: Future cryptographic verification of MCP responses

    Residual Risk: Very Low - MCP server process isolation and input validation prevent compromise

    MITRE ATT&CK Mapping: T1557 (Adversary-in-the-Middle)


    Threat Category Likelihood Impact Residual Risk Priority
    XSS via Parliamentary Data Injection Low High Low P3
    Supply Chain Attack Privilege Escalation Low High Low P2
    Data Integrity Issues Tampering Medium High Medium P1
    GitHub Actions Downtime Denial of Service Low Medium Low P4
    Repository Compromise Tampering Low High Low P2
    MCP Server Compromise Spoofing Very Low High Very Low P5

    Priority Key:

    • P1: High priority - requires additional controls
    • P2: Medium priority - monitor and review
    • P3: Low priority - current controls sufficient
    • P4-P5: Very low priority - accept risk

    Risk Treatment Plan:

    • P1 (Data Integrity): Implement automated content verification (Q3 2026)
    • P2 (Supply Chain, Repository): Continue current controls, annual review
    • P3-P5: Accept residual risk, monitor for changes

    EU Parliament Monitor aligns with multiple compliance frameworks to ensure security, privacy, and operational excellence.

    graph TD
    subgraph "Compliance Integration"
    A[๐Ÿ›๏ธ Compliance<br>Framework] --> B[๐Ÿ” NIST CSF 2.0]
    A --> C[๐Ÿ” ISO 27001:2022]
    A --> D[๐Ÿ›ก๏ธ CIS Controls v8.1]
    A --> E[๐Ÿ‡ช๐Ÿ‡บ GDPR]
    A --> F[๐Ÿ‡ช๐Ÿ‡บ NIS2 Directive]
    A --> G[๐Ÿ‡ช๐Ÿ‡บ EU CRA]

    B --> H[๐ŸŽฏ Govern]
    B --> I[๐Ÿ‘๏ธ Identify]
    B --> J[๐Ÿ›ก๏ธ Protect]
    B --> K[๐Ÿ”Ž Detect]
    B --> L[โšก Respond]
    B --> M[๐Ÿ”„ Recover]

    C --> N[๐Ÿ‘ฅ A.9 Access<br>Control]
    C --> O[๐Ÿ”’ A.8 Asset<br>Management]
    C --> P[โš™๏ธ A.5 Policies]
    C --> Q[๐Ÿ“ก A.8 Security<br>Operations]

    D --> R[๐Ÿ”ง Control 1:<br>Inventory]
    D --> S[๐Ÿ”’ Control 4:<br>Secure Config]
    D --> T[๐Ÿ›ก๏ธ Control 10:<br>Malware Defense]
    end

    style A fill:#673AB7,stroke:#311B92,stroke-width:2px,color:white,font-weight:bold
    style B,C,D,E,F,G fill:#00C853,stroke:#007E33,stroke-width:2px,color:white,font-weight:bold
    style H,I,J,K,L,M fill:#2979FF,stroke:#0D47A1,stroke-width:2px,color:white,font-weight:bold
    style N,O,P,Q fill:#FFD600,stroke:#FF8F00,stroke-width:2px,color:black,font-weight:bold
    style R,S,T fill:#FF3D00,stroke:#BF360C,stroke-width:2px,color:white,font-weight:bold
    classDef default font-weight:bold

    Govern (GV)

    • GV.PO-01: Security policies aligned with ISMS-PUBLIC
    • GV.RM-01: Risk management via threat model
    • GV.SC-01: Supply chain security (Dependabot, SBOM)

    Identify (ID)

    • ID.AM-01: Asset inventory (threat model assets)
    • ID.RA-01: Vulnerability scanning (Dependabot, CodeQL)
    • ID.RA-02: Threat intelligence (GitHub Security Advisories)

    Protect (PR)

    • PR.AA-01: Authentication (GitHub CODEOWNERS, MFA)
    • PR.DS-01: Data protection (HTTPS-only, CSP)
    • PR.IP-01: Baseline configurations (ESLint, branch protection)

    Detect (DE)

    • DE.AE-02: Security event analysis (GitHub Actions logs)
    • DE.CM-01: Network monitoring (CDN logs)
    • DE.CM-08: Vulnerability scans (weekly Dependabot)

    Respond (RS)

    • RS.MA-01: Incident response plan (SECURITY.md)
    • RS.CO-02: Coordinated disclosure (90-day embargo)
    • RS.AN-03: Forensics (Git history, Actions logs)

    Recover (RC)

    • RC.RP-01: Recovery plan (runbooks)
    • RC.CO-01: Communication plan (SECURITY.md)
    • RC.IM-01: Recovery improvements (lessons learned)

    A.5 Organizational Controls

    • A.5.1: Information security policies โœ…
    • A.5.10: Acceptable use of information โœ…
    • A.5.23: Information security for cloud services โœ…

    A.8 Technological Controls

    • A.8.3: Information backup โœ… (Git)
    • A.8.9: Configuration management โœ… (Infrastructure as Code)
    • A.8.23: Web filtering โœ… (CSP)
    • A.8.24: Use of cryptography โœ… (TLS 1.3, HTTPS)
    • A.8.28: Secure coding โœ… (CodeQL, ESLint)
    CIS Control Safeguard Description Implementation IG Level Status
    1 1.1 Establish and maintain detailed enterprise asset inventory SBOM (sbom.json), package.json IG1 โœ…
    2 2.1 Establish and maintain software inventory npm dependency tree, TypeScript source IG1 โœ…
    2 2.2 Ensure authorized software is supported Dependabot updates, Node.js 25 Current (upgrading to Node.js 26 LTS ~Apr 2026) IG1 โœ…
    4 4.1 Establish and maintain secure configuration process ESLint, Prettier, htmlhint rules IG1 โœ…
    4 4.7 Manage default accounts No default accounts (static site) IG1 N/A
    5 5.1 Establish and maintain inventory of accounts GitHub organization accounts IG1 โœ…
    5 5.3 Disable dormant accounts GitHub access review process IG1 โœ…
    6 6.1 Establish access control foundation GitHub MFA, branch protection rules IG1 โœ…
    6 6.2 Establish access grants for least privilege contents:write only for GitHub Actions IG1 โœ…
    7 7.1 Establish vulnerability management process Dependabot automated PRs, npm audit IG1 โœ…
    7 7.4 Perform automated vulnerability scanning CodeQL SAST weekly scans IG2 โœ…
    7 7.5 Perform automated patch management Dependabot auto-updates IG2 โœ…
    8 8.2 Collect audit logs GitHub Actions logs 90-day retention IG1 โœ…
    8 8.5 Collect detailed audit logs Git commit history (immutable) IG2 โœ…
    9 9.1 Ensure use of only fully supported browsers Static HTML/CSS/JS, no custom browser code IG1 N/A
    11 11.2 Perform automated backups Git distributed backup (all clones) IG1 โœ…
    11 11.3 Protect recovery data GitHub repository integrity IG1 โœ…
    12 12.2 Establish network infrastructure management No server infrastructure (static site) IG1 N/A
    14 14.1 Establish/maintain security awareness CONTRIBUTING.md, SECURITY.md IG1 โœ…
    16 16.1 Establish secure application development process CodeQL, ESLint security, branch protection IG1 โœ…
    16 16.2 Establish secure coding training Secure coding guidelines documented IG2 โœ…
    16 16.6 Remediate detected software vulnerabilities 7-day SLA for high CVEs, Dependabot IG2 โœ…
    18 18.1 Establish penetration testing program Future DAST implementation (Q3 2026) IG3 ๐Ÿ”ฎ

    Data Protection Principles:

    Principle Implementation Article
    Lawfulness, Fairness, Transparency Public data, no user tracking Art. 5(1)(a)
    Purpose Limitation Single purpose: EU Parliament news Art. 5(1)(b)
    Data Minimisation No PII collected, public data only Art. 5(1)(c)
    Accuracy European Parliament authoritative source Art. 5(1)(d)
    Storage Limitation No persistent user data stored Art. 5(1)(e)
    Integrity & Confidentiality HTTPS, TLS 1.3, CSP headers Art. 5(1)(f)
    Accountability ISMS policies, audit trail Art. 5(2)

    Data Subject Rights:

    • Not applicable (no personal data collected)
    • No data processing activities requiring GDPR compliance

    Risk Management Measures (Article 21):

    • โœ… Risk analysis (threat model)
    • โœ… Incident handling (SECURITY.md)
    • โœ… Business continuity (resilience section)
    • โœ… Supply chain security (Dependabot, SBOM)
    • โœ… Secure development (CodeQL, ESLint)
    • โœ… Vulnerability management (weekly scans)

    Reporting Obligations (Article 23):

    • 24-hour initial notification
    • Incident details via security@hack23.com
    • Follow-up reports as needed

    Essential Cybersecurity Requirements:

    Requirement Implementation Annex I Reference
    Secure by Default HTTPS-only, CSP, minimal attack surface Part I, ยง1
    Vulnerability Handling Coordinated disclosure, 90-day embargo Part I, ยง2
    Security Updates Dependabot automated PRs, weekly scans Part I, ยง2
    Software Bill of Materials npm list --json > sbom.json Part I, ยง2(3)
    Secure Development CodeQL SAST, secure coding guidelines Part II, ยง1
    Incident Reporting SECURITY.md, GitHub Security Advisories Part II, ยง2

    Conformity Assessment:

    • Category: Non-critical product (static website generator)
    • No CE marking required
    • Self-assessment sufficient
    • Documentation publicly available (this document)
    Framework Evidence Documents Repository Locations
    ISO 27001 SECURITY_ARCHITECTURE.md, ISMS-PUBLIC This document, ISMS-PUBLIC
    NIST CSF THREAT_MODEL.md, WORKFLOWS.md THREAT_MODEL.md, WORKFLOWS.md
    CIS Controls Security controls documentation This document (Security Controls section)
    GDPR Privacy policy (no data collection) This document (Data Protection section)
    NIS2 Incident response plan SECURITY.md
    EU CRA SBOM, vulnerability disclosure sbom.json, SECURITY.md

    Theme 5 โ€” Organizational Controls (5.1โ€“5.37)

    Control Requirement Implementation Status Evidence
    5.1 Information security policies ISMS-PUBLIC policy reference โœ… This document, ISMS-PUBLIC repo
    5.2 Information security roles and responsibilities CEO as document owner โœ… Document header
    5.9 Inventory of information and other assets Asset inventory in threat model โœ… Threat Model section
    5.12 Classification of information Public data classification โœ… Executive Summary, Classification Framework
    5.14 Information transfer TLS 1.3 in transit โœ… Network Security section
    5.15 Access control Minimal GitHub Actions permissions โœ… Authentication & Authorization section
    5.16 Identity management GitHub account MFA โœ… GitHub organization settings
    5.17 Authentication information Code review requirements โœ… Branch protection rules
    5.24 Information security incident management planning and preparation GitHub Issues for incidents โœ… CONTRIBUTING.md
    5.29 Information security during disruption Manual trigger, cached content โœ… Infrastructure Security section
    5.36 Compliance with policies, rules and standards This document โœ… Compliance Matrix section
    5.37 Documented operating procedures CI/CD workflows documented โœ… .github/workflows/

    Theme 6 โ€” People Controls (6.1โ€“6.8)

    Control Requirement Implementation Status Evidence
    6.3 Information security awareness, education and training CONTRIBUTING.md security guidance โœ… CONTRIBUTING.md

    Theme 7 โ€” Physical Controls (7.1โ€“7.14)

    Control Requirement Implementation Status Evidence
    7.10 Storage media Git-based version control โœ… GitHub repository

    Theme 8 โ€” Technological Controls (8.1โ€“8.34)

    Control Requirement Implementation Status Evidence
    8.3 Information access restriction GITHUB_TOKEN auto-expiry โœ… GitHub Actions configuration
    8.7 Protection against malware CodeQL, ESLint security โœ… Application Security section
    8.8 Management of technical vulnerabilities Dependabot, npm audit โœ… Dependency Security section
    8.13 Information backup Git version control โœ… GitHub repository
    8.15 Logging GitHub Actions logs โœ… GitHub Actions audit logs
    8.16 Monitoring activities Dependabot & CodeQL continuous scans โœ… Security Operations section
    8.20 Networks security HTTPS only, localhost MCP โœ… Network Security section
    8.24 Use of cryptography TLS 1.3, GitHub Pages HTTPS โœ… Network Security section
    8.25 Secure development lifecycle SAST, dependency scanning โœ… Application Security section
    8.27 Secure system architecture and engineering principles Code review, branch protection โœ… Security Operations section
    8.33 Test information No production data in tests โœ… test/fixtures/ uses mock data

    Overall ISO 27001:2022 Compliance: โœ… Compliant (25/25 applicable controls implemented)

    Subcategory Description Implementation Status
    GV.OC-01 Organizational mission understood and informs cybersecurity risk management Democratic transparency mandate โœ…
    GV.OC-05 Outcomes, capabilities, and services that the organization depends on are understood and communicated to supply chain Public ISMS documentation โœ…
    GV.RM-01 Risk management objectives are established and agreed to by organizational stakeholders ISMS risk framework โœ…
    GV.RM-02 Risk appetite and risk tolerance statements are established, communicated, and maintained Low risk tolerance (public platform) โœ…
    GV.PO-01 Policy for managing cybersecurity risks is established based on organizational context ISMS-PUBLIC policies โœ…
    GV.RR-01 Organizational leadership is responsible and accountable for cybersecurity risk CEO document ownership โœ…
    GV.SC-01 A cybersecurity supply chain risk management program, strategy, objectives, policies, and processes are established Dependabot, SHA-pinned actions โœ…
    GV.SC-06 Planning and due diligence are performed to reduce risks before entering into formal supplier or other third-party relationships Minimal dependencies, SCA scanning โœ…
    ID.AM-01 Inventories of hardware managed by the organization are maintained SBOM, package.json, GitHub repo โœ…
    ID.AM-02 Inventories of software, services, and systems managed by the organization are maintained npm dependency tree, Dependabot โœ…
    ID.AM-08 Systems, hardware, software, services, and data are managed throughout their life cycles ARCHITECTURE.md C4 diagrams โœ…
    ID.RA-01 Vulnerabilities in assets are identified, validated, and recorded CodeQL SAST, Dependabot SCA โœ…
    ID.RA-05 Threats, vulnerabilities, likelihoods, and impacts are used to understand inherent risk and inform risk response prioritization THREAT_MODEL.md STRIDE analysis โœ…
    ID.RA-06 Risks are prioritized, responded to, and communicated to applicable stakeholders Risk register, threat model โœ…
    ID.IM-01 Improvements are identified from security assessments Annual security review cycle โœ…
    PR.AA-01 Identities and credentials for authorized users, services, and hardware are managed by the organization GitHub MFA, auto-expiring GITHUB_TOKEN โœ…
    PR.AA-05 Access permissions, entitlements, and authorizations are defined in a policy, managed, enforced, and reviewed Branch protection, CODEOWNERS, least privilege โœ…
    PR.AT-01 Personnel are provided with awareness and training so that they possess the knowledge and skills to perform general tasks with cybersecurity risks in mind CONTRIBUTING.md, SECURITY.md โœ…
    PR.DS-01 The confidentiality, integrity, and availability of data-at-rest are protected Git repository integrity, immutable history โœ…
    PR.DS-02 The confidentiality, integrity, and availability of data-in-transit are protected TLS 1.3 HTTPS-only, GitHub Pages enforcement โœ…
    PR.DS-10 The confidentiality, integrity, and availability of data-in-use are protected No PII processing, public data only โœ…
    PR.IR-01 Networks and environments are protected from unauthorized logical access and usage No server network, localhost MCP only โœ…
    PR.IR-02 The organization's technology assets are protected from environmental threats No sensitive data collected โœ…
    PR.PS-01 Configuration management practices are established and applied ESLint config, branch protection rules โœ…
    PR.PS-02 Software is maintained, replaced, and removed commensurate with risk Dependabot, npm audit, Node.js LTS โœ…
    DE.AE-02 Potentially adverse events are analyzed to better characterize them and detect cybersecurity incidents GitHub Security Alerts, CodeQL findings โœ…
    DE.AE-06 Information on adverse events is provided to authorized staff and tools Public SECURITY.md, GitHub Security Advisories โœ…
    DE.CM-01 Networks and network services are monitored to find potentially adverse events Dependabot, CodeQL, npm audit continuous scanning โœ…
    DE.CM-09 Computing hardware and software, runtime environments, and their data are monitored to find potentially adverse events GitHub Actions logs, audit trail โœ…
    RS.MA-01 The incident response plan is executed in coordination with relevant third parties once an incident is declared SECURITY.md incident procedures โœ…
    RS.AN-03 Analysis is performed to establish what has taken place during an incident and the root cause of the incident Git history, Actions logs forensics โœ…
    RS.CO-02 Internal and external stakeholders are notified of incidents in a timely manner GitHub Security Advisories, SECURITY.md โœ…
    RS.MI-02 Incidents are contained Revert commits, disable workflows โœ…
    RC.RP-01 The recovery portion of the incident response plan is executed once initiated from the incident response process BCPPlan.md recovery procedures โœ…
    RC.CO-03 Recovery activities and progress in restoring operational capabilities are communicated to designated internal and external stakeholders GitHub Issues, SECURITY.md โœ…
    RC.IM-01 Recovery plans incorporate lessons learned Post-incident reviews documented โœ…

    Overall NIST CSF 2.0 Compliance: โœ… Aligned (36/36 subcategories implemented across all 6 functions: GV, ID, PR, DE, RS, RC)

    Article Requirement Implementation Status Evidence
    Art. 5 Principles of Processing No PII collected โœ… No tracking, no forms, static site
    Art. 25 Data Protection by Design Security by design architecture โœ… Executive Summary, no PII by design
    Art. 30 Records of Processing No processing of personal data โœ… Static site, no user data
    Art. 32 Security of Processing Defense-in-depth controls โœ… Security Controls section
    Art. 33 Breach Notification Incident response via GitHub Issues โœ… CONTRIBUTING.md
    Art. 35 DPIA Not required (no PII) โœ… N/A - no high-risk processing

    GDPR Compliance: โœ… Compliant - No personal data processing, data protection by design

    DPIA Required: โŒ No - Static website with no PII collection

    Article Requirement Implementation Status Evidence
    Art. 20 Cybersecurity Risk Management Threat modeling, risk assessment โœ… Threat Model section
    Art. 21 Cybersecurity Measures Defense-in-depth controls โœ… Security Controls section
    Art. 21(2)(a) Risk Analysis & Security Policies ISMS-PUBLIC policy framework โœ… ISMS alignment throughout
    Art. 21(2)(b) Incident Handling GitHub Issues, audit logs โœ… Security Operations section
    Art. 21(2)(c) Business Continuity RTO/RPO defined, manual trigger โœ… Executive Summary
    Art. 21(2)(d) Supply Chain Security Dependabot, SHA-pinned actions โœ… Dependency Security section
    Art. 21(2)(e) Effectiveness of Measures Annual review, monitoring โœ… Document header (annual review)
    Art. 23 Incident Reporting 24-hour reporting to CSIRT โš ๏ธ Future implementation

    NIS2 Compliance: โœ… Compliant - 7/8 requirements implemented Gap: Automated CSIRT reporting (future enhancement)

    Requirement Implementation Status Evidence
    SBOM Generated for releases โœ… .github/workflows/release.yml
    Vulnerability Disclosure Public security advisories โœ… GitHub Security Advisories
    Security Updates Dependabot automated updates โœ… .github/dependabot.yml
    Security by Design Threat modeling, secure architecture โœ… This document
    Conformity Assessment Annual security review โœ… Document header

    CRA Alignment: โœ… Aligned - All applicable requirements implemented


    Current Monitoring:

    • โœ… GitHub Actions Logs: Job execution logs retained for 90 days
    • โœ… CodeQL Alerts: Automated SAST findings triaged weekly
    • โœ… Dependabot Alerts: Dependency vulnerabilities addressed within 7 days
    • โœ… npm audit: Pre-commit and CI validation
    • โœ… Git Audit Trail: Immutable commit history

    Future Monitoring (FUTURE_SECURITY_ARCHITECTURE.md):

    • ๐Ÿ”ฎ Uptime Monitoring: Pingdom/StatusCake (Q2 2026)
    • ๐Ÿ”ฎ Error Tracking: Sentry integration (Q2 2026)
    • ๐Ÿ”ฎ Security Metrics Dashboard: ISMS compliance scores (Q3 2026)

    Incident Classification:

    • P0 (Critical): Repository compromise, malicious content injection
    • P1 (High): XSS vulnerability, dependency compromise
    • P2 (Medium): Data integrity issues, workflow failures
    • P3 (Low): Documentation errors, non-critical bugs

    Response Procedures:

    1. Detection: GitHub Security Advisories, Dependabot alerts, manual reports
    2. Containment: Revert commits, disable workflows, remove compromised content
    3. Investigation: Review git logs, GitHub Actions logs, CodeQL findings
    4. Remediation: Apply patches, update dependencies, fix vulnerabilities
    5. Recovery: Deploy fixes, verify integrity, resume operations
    6. Post-Incident Review: Document lessons learned, update threat model

    Communication:

    • GitHub Issues for tracking
    • Security Advisories for public disclosure
    • CHANGELOG.md for user notification

    See dedicated ๐Ÿ” Vulnerability Management section above for comprehensive scanning, SLA targets, and remediation processes.


    Metric Target Current Status
    Known Vulnerabilities 0 0 โœ…
    Dependabot Alert Response Time < 7 days < 48 hours โœ…
    Code Coverage > 80% 82%+ โœ…
    CodeQL Findings 0 critical/high 0 โœ…
    Security Test Pass Rate 100% 100% โœ…
    Uptime SLA > 99% GitHub Pages SLA โœ…

    Automated Testing:

    • โœ… Unit Tests: 87 tests covering core functionality
    • โœ… Integration Tests: 82 tests for MCP client, workflows
    • โœ… E2E Tests: 60+ Playwright tests (accessibility, responsive, multi-language)
    • โœ… SAST: CodeQL, ESLint security plugin
    • โœ… SCA: Dependabot, npm audit
    • โœ… HTML Validation: htmlhint in CI
    • โš ๏ธ DAST: Future implementation (Q3 2026)

    Test Coverage:

    • Lines: 82%+
    • Branches: 83%+
    • Functions: 89%+
    • Statements: 82%+

    EU Parliament Monitor demonstrates security excellence through public, verifiable evidence per Hack23 ISMS Open Source Policy:

    Badge Status Score/Level Description
    OpenSSF Scorecard โœ… Implemented Target โ‰ฅ7.0 Supply chain security assessment
    CII Best Practices ๐Ÿ“ Registration Pending Target: Passing Open source development best practices
    SLSA Provenance โœ… Implemented Level 3 Build attestations and SBOM generation
    SonarCloud โœ… Implemented Target: A Code quality and security analysis
    FOSSA ๐Ÿ“ Setup Required Target: Clean License compliance scanning
    REUSE โœ… Implemented Passing FSFE license header compliance

    Badge Links:


    The release workflow implements documentation-as-code principles, automatically generating comprehensive technical documentation with every release:

    Documentation Pipeline:

    graph LR
    A[Release Trigger] --> B[Run Tests]
    B --> C[Generate Coverage]
    C --> D[Generate API Docs]
    D --> E[Copy Reports]
    E --> F[Create Index]
    F --> G[Commit to Main]
    G --> H[Deploy to GitHub Pages]
    Documentation Type Generator Security Controls
    API Documentation JSDoc Input sanitization, no script injection
    Test Coverage Vitest HTML Static HTML, no dynamic content
    E2E Test Reports Playwright Screenshots sanitized, no PII
    Documentation Index Custom script Static generation, XSS-safe

    Integrity:

    • โœ… Version Controlled: All documentation committed to git
    • โœ… Immutable History: Complete audit trail of changes
    • โœ… Reproducible: Regenerate docs from any release tag
    • โœ… Signed: Part of SLSA Level 3 attested artifacts

    Transparency:

    • โœ… Public Access: Documentation on GitHub Pages
    • โœ… Evidence-Based: Generated from actual code and tests
    • โœ… Real-Time: Updated with every release
    • โœ… Comprehensive: API, coverage, E2E, all in one place

    Compliance:

    • โœ… ISMS ยง3.2: Architecture documentation requirements met
    • โœ… ISO 27001 A.12.1.1: Documented operating procedures
    • โœ… Audit Trail: Full documentation history in git
    • โœ… Evidence: Automated generation eliminates documentation drift
    Control Implementation Purpose
    Static Generation No server-side execution Eliminates injection attacks
    Input Sanitization JSDoc, HTML encoding Prevents XSS in generated docs
    Access Control GitHub Pages authentication Public read, write via workflow only
    Audit Trail Git commits for all changes Complete history and accountability
    Attestations SLSA Level 3 provenance Verifiable documentation integrity

    See FUTURE_WORKFLOWS.md for planned documentation improvements:

    • Automated architecture diagram generation
    • Interactive documentation search
    • Documentation versioning (per release)
    • PDF export for compliance reports

    EU Parliament Monitor implements a security-by-design architecture with defense-in-depth controls appropriate for a public information platform. The static site architecture eliminates common attack vectors (SQL injection, session hijacking, server-side vulnerabilities) while maintaining transparency and accessibility.

    Key Security Strengths:

    1. โœ… Minimal Attack Surface: Static content, no databases, no server-side execution
    2. โœ… Automated Security: CodeQL, Dependabot, npm audit prevent vulnerabilities
    3. โœ… Supply Chain Security: SHA-pinned actions, minimal dependencies, SBOM generation
    4. โœ… Data Integrity: Input validation, HTML sanitization, CSP enforcement
    5. โœ… Compliance: ISO 27001, GDPR, NIS2, EU CRA aligned
    6. โœ… Transparency: Public code, public security advisories, ISMS framework

    Residual Risks:

    • Medium: Data integrity (manual review not automated) - Addressed in Q3 2026
    • Low: Supply chain attacks - Mitigated by minimal dependencies and Dependabot
    • Low: Repository compromise - Mitigated by branch protection and code review

    Future Enhancements:


    Document Approval:

    Role Name Date Signature
    CEO (Document Owner) [Name] 2025-02-17 [Electronic]
    CISO [Name] 2025-02-17 [Electronic]

    Next Review Date: 2027-02-20


    This document is maintained as part of Hack23 AB's Information Security Management System (ISMS)
    ISMS Framework: Hack23/ISMS-PUBLIC