Process & Data Flow Documentation for European Parliament Intelligence
๐ Security Flows โข ๐ CI/CD Pipeline โข ๐ Data Processing
๐ Document Owner: CEO | ๐ Version: 1.1 | ๐
Last Updated:
2026-03-19 (UTC)
๐ Review Cycle: Quarterly | โฐ Next Review: 2026-06-19
| 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 |
This document provides detailed process flow diagrams showing security controls, data flows, and decision points in the EU Parliament Monitor platform.
This document aligns with Hack23's Information Security Management System (ISMS) policies and ISO 27001:2022 controls. All flowcharts demonstrate implementation of security controls required by these policies.
| ISMS Policy | ISO 27001 Control | Document Section | Description |
|---|---|---|---|
| Information Security Policy | A.5.1 | All sections | Overarching security governance framework |
| Secure Development Policy | A.8.25, A.8.28 | News Generation Security Flow, CI/CD Security Pipeline | Secure coding practices, input validation, code review |
| Access Control Policy | A.5.15, A.5.18 | MCP Client Connection Security Flow | Authentication, authorization, least privilege |
| Vulnerability Management Policy | A.8.8 | Vulnerability Management Workflow | Vulnerability scanning, remediation, patch management |
| Incident Response Policy | A.5.24, A.5.25, A.5.26 | Incident Response Flow | Detection, response, recovery, post-incident review |
| Change Management Policy | A.8.32 | CI/CD Security Pipeline, Release Workflow | Controlled deployments, testing, approval gates |
| Cryptography Policy | A.8.24 | Content Delivery Security Flow, Deployment Security Flow | TLS 1.3, HTTPS-only, cryptographic signatures |
flowchart TD
Start[๐ GitHub Actions Trigger<br/>Schedule: 06:00 UTC<br/>Manual: workflow_dispatch] --> CheckMCP{๐ MCP Server<br/>Available?}
CheckMCP -->|โ
Yes| ConnectMCP[๐ Connect to EP MCP Server<br/>stdio/localhost]
CheckMCP -->|โ No| Fallback[โ ๏ธ Use Placeholder Content<br/>Log Error]
ConnectMCP --> RetryCheck{๐ Connection<br/>Successful?}
RetryCheck -->|โ No| RetryCount{Retry < 3?}
RetryCount -->|โ
Yes| BackoffWait[โณ Wait 30s<br/>Between Retries]
BackoffWait --> ConnectMCP
RetryCount -->|โ No| Fallback
RetryCheck -->|โ
Yes| FetchData[๐ฅ Fetch Parliamentary Data<br/>Plenary Sessions<br/>Committee Meetings<br/>Documents, Voting Records]
FetchData --> ValidateSchema{โ
Validate<br/>JSON Schema?}
ValidateSchema -->|โ Invalid| LogError1[๐ Log Validation Error<br/>Error Type<br/>Field Name] --> Fallback
ValidateSchema -->|โ
Valid| ValidateType{โ
Type Check<br/>Data Types?}
ValidateType -->|โ Invalid| LogError2[๐ Log Type Error<br/>Expected vs Actual] --> Fallback
ValidateType -->|โ
Valid| ValidateRange{โ
Range Check<br/>Dates, Lengths?}
ValidateRange -->|โ Invalid| LogError3[๐ Log Range Error<br/>Out of Bounds] --> Fallback
ValidateRange -->|โ
Valid| SanitizeHTML[๐งน Sanitize HTML<br/>Strip Script Tags<br/>Remove Event Handlers]
Fallback --> AgentContext
SanitizeHTML --> EncodeHTML[๐ HTML Entity Encoding<br/>Convert: < > & " ']
EncodeHTML --> AgentContext[๐ค Copilot/LLM Agent<br/>Receives Article Type Context<br/>5 Types: week-ahead, motions,<br/>propositions, committee-reports,<br/>breaking-news]
AgentContext --> GenerateEN[๐ Generate English Content<br/>Agent Calls MCP Tools<br/>Plenary, Committees,<br/>Documents, Voting Records]
GenerateEN --> Translate[๐ Translate Content<br/>English โ 13 Languages<br/>14 Total Languages]
Translate --> GenHTML[๐ generateArticleHTML()<br/>Per Language<br/>SEO, JSON-LD, Open Graph]
GenHTML --> HTMLValidate[โ
Validate HTML<br/>htmlhint Rules<br/>Standards Compliance]
HTMLValidate -->|โ Fail| FixHTML[๐ง Fix HTML Issues<br/>Auto-correct<br/>Report Issues]
FixHTML --> HTMLValidate
HTMLValidate -->|โ
Pass| GenerateIndex[๐ Generate Language Indexes<br/>index-{lang}.html<br/>Sort by Date]
GenerateIndex --> GenerateSitemap[๐บ๏ธ Generate Sitemap<br/>sitemap.xml<br/>SEO Optimization]
GenerateSitemap --> CreateBranch[๐ฟ Create Branch<br/>news/{type}-{date}]
CreateBranch --> CommitPR[๐ฆ Commit & Create PR<br/>Article HTML Files<br/>Updated Indexes & Sitemap]
CommitPR --> MergePR[๐ Merge PR to Main]
MergePR --> DeployPages[๐ Deploy to GitHub Pages<br/>Updated Static Site]
DeployPages --> Complete[โ
Generation Complete<br/>Articles Published<br/>Site Updated]
Complete --> End[๐ Workflow Success]
style Start fill:#e8f5e9
style CheckMCP fill:#fff4e1
style ConnectMCP fill:#e1f5ff
style Fallback fill:#ffe1e1
style ValidateSchema fill:#e1f5ff
style ValidateType fill:#e1f5ff
style ValidateRange fill:#e1f5ff
style SanitizeHTML fill:#e8f5e9
style EncodeHTML fill:#e8f5e9
style AgentContext fill:#e1f5ff
style GenerateEN fill:#e8f5e9
style Translate fill:#e8f5e9
style GenHTML fill:#e8f5e9
style HTMLValidate fill:#e1f5ff
style CreateBranch fill:#e1f5ff
style CommitPR fill:#e8f5e9
style MergePR fill:#e8f5e9
style DeployPages fill:#d4edda
style Complete fill:#d4edda
style End fill:#d4edda
flowchart TD
Input[๐ฅ External Input<br/>European Parliament API<br/>Untrusted Data] --> Layer1{๐ก๏ธ Layer 1<br/>Schema Validation}
Layer1 -->|โ Invalid Structure| Reject1[โ Reject Input<br/>Log: Invalid JSON<br/>Use Fallback]
Layer1 -->|โ
Valid Structure| Layer2{๐ก๏ธ Layer 2<br/>Type Validation}
Layer2 -->|โ Wrong Types| Reject2[โ Reject Input<br/>Log: Type Mismatch<br/>Use Fallback]
Layer2 -->|โ
Correct Types| Layer3{๐ก๏ธ Layer 3<br/>Range Validation}
Layer3 -->|โ Out of Bounds| Reject3[โ Reject Input<br/>Log: Range Error<br/>Use Fallback]
Layer3 -->|โ
Within Bounds| Layer4{๐ก๏ธ Layer 4<br/>Content Sanitization}
Layer4 --> StripScript[๐งน Strip Script Tags<br/>Remove: <script><br/>Remove: <iframe><br/>Remove: <object>]
StripScript --> RemoveEvents[๐งน Remove Event Handlers<br/>Remove: onclick<br/>Remove: onerror<br/>Remove: onload]
RemoveEvents --> ValidateURLs[๐ Validate URLs<br/>Check Protocol<br/>Sanitize Path]
ValidateURLs --> Layer5{๐ก๏ธ Layer 5<br/>HTML Encoding}
Layer5 --> EncodeSpecial[๐ Encode Special Chars<br/>< โ &lt;<br/>> โ &gt;<br/>& โ &amp;<br/>" โ &quot;<br/>' โ &#39;]
EncodeSpecial --> Layer6{๐ก๏ธ Layer 6<br/>CSP Compliance}
Layer6 --> CheckCSP[โ
Check CSP Headers<br/>No Inline Scripts<br/>No Eval()<br/>No External Scripts]
CheckCSP -->|โ Violation| Reject4[โ Block Content<br/>Log: CSP Violation<br/>Return Error]
CheckCSP -->|โ
Compliant| SafeOutput[โ
Safe Output<br/>Validated<br/>Sanitized<br/>Encoded]
Reject1 --> FallbackContent[โ ๏ธ Fallback Content<br/>Placeholder Articles<br/>Safe Default]
Reject2 --> FallbackContent
Reject3 --> FallbackContent
Reject4 --> FallbackContent
SafeOutput --> DeliverContent[๐ค Deliver to Template<br/>Generate HTML<br/>Serve to Users]
FallbackContent --> DeliverContent
style Input fill:#fff4e1
style Layer1 fill:#e1f5ff
style Layer2 fill:#e1f5ff
style Layer3 fill:#e1f5ff
style Layer4 fill:#e8f5e9
style Layer5 fill:#e8f5e9
style Layer6 fill:#e8f5e9
style Reject1 fill:#ffe1e1
style Reject2 fill:#ffe1e1
style Reject3 fill:#ffe1e1
style Reject4 fill:#ffe1e1
style SafeOutput fill:#d4edda
style FallbackContent fill:#fff3cd
style DeliverContent fill:#d4edda
flowchart TD
Trigger[๐ Git Event<br/>Push to PR<br/>Merge to Main] --> Checkout[๐ฅ Checkout Code<br/>SHA-Pinned Action<br/>actions/checkout@v4]
Checkout --> SetupNode[โ๏ธ Setup Node.js 25<br/>SHA-Pinned Action<br/>actions/setup-node@v6]
SetupNode --> InstallDeps[๐ฆ Install Dependencies<br/>npm ci<br/>Reproducible Build<br/>package-lock.json]
InstallDeps --> SecurityAudit{๐ npm audit<br/>Vulnerabilities?}
SecurityAudit -->|โ Moderate+| AuditFail[โ Security Audit Failed<br/>Block PR Merge<br/>Create Issue]
SecurityAudit -->|โ
None/Low| Lint[๐ ESLint<br/>Security Rules<br/>Code Quality<br/>Complexity Check]
Lint -->|โ Errors| LintFail[โ Lint Failed<br/>Block PR Merge<br/>Show Errors]
Lint -->|โ
Pass| Format[โจ Prettier Check<br/>Code Formatting<br/>Consistency]
Format -->|โ Not Formatted| FormatFail[โ Format Failed<br/>Run: npm run format<br/>Commit Changes]
Format -->|โ
Formatted| HTMLHint[๐ HTMLHint<br/>HTML Validation<br/>Standards Compliance]
HTMLHint -->|โ Errors| HTMLFail[โ HTML Failed<br/>Fix Issues<br/>Re-validate]
HTMLHint -->|โ
Pass| UnitTests[๐งช Unit Tests<br/>87 Tests<br/>Vitest]
UnitTests -->|โ Fail| TestFail[โ Tests Failed<br/>Block PR Merge<br/>Debug Failures]
UnitTests -->|โ
Pass| IntegrationTests[๐ Integration Tests<br/>82 Tests<br/>MCP Client Tests]
IntegrationTests -->|โ Fail| TestFail
IntegrationTests -->|โ
Pass| Coverage{๐ Code Coverage<br/>> 80% Lines?<br/>> 75% Branches?}
Coverage -->|โ Below Threshold| CoverageFail[โ Coverage Failed<br/>Add Tests<br/>Meet Threshold]
Coverage -->|โ
Above Threshold| CodeQL[๐ CodeQL SAST<br/>Security Analysis<br/>Vulnerability Detection]
CodeQL -->|โ Findings| CodeQLFail[โ CodeQL Failed<br/>Critical/High Issues<br/>Fix Vulnerabilities]
CodeQL -->|โ
Clean| BuildCheck[๐๏ธ Build Check<br/>News Generation<br/>Index Generation<br/>Sitemap Generation]
BuildCheck -->|โ Fail| BuildFail[โ Build Failed<br/>Check Logs<br/>Fix Errors]
BuildCheck -->|โ
Pass| Approve[โ
All Checks Passed<br/>Ready to Merge<br/>Deploy on Merge]
AuditFail --> End[โ Pipeline Failed]
LintFail --> End
FormatFail --> End
HTMLFail --> End
TestFail --> End
CoverageFail --> End
CodeQLFail --> End
BuildFail --> End
Approve --> End[โ
Pipeline Success]
style Trigger fill:#e8f5e9
style SecurityAudit fill:#ffe1e1
style Lint fill:#e1f5ff
style Format fill:#e1f5ff
style HTMLHint fill:#e1f5ff
style UnitTests fill:#e8f5e9
style IntegrationTests fill:#e8f5e9
style Coverage fill:#e1f5ff
style CodeQL fill:#ffe1e1
style BuildCheck fill:#e8f5e9
style Approve fill:#d4edda
style End fill:#d4edda
style AuditFail fill:#ffe1e1
style LintFail fill:#ffe1e1
style TestFail fill:#ffe1e1
style CodeQLFail fill:#ffe1e1
flowchart TD
Start[๐ Initialize MCP Client<br/>Connection Parameters<br/>Retry Config] --> CheckEnv{๐ Check Environment<br/>USE_EP_MCP?}
CheckEnv -->|โ Disabled| DisabledMode[โ ๏ธ MCP Disabled<br/>Skip Connection<br/>Use Fallback]
CheckEnv -->|โ
Enabled| AttemptCount{๐ Attempt Count<br/>< Max Attempts?}
AttemptCount -->|โ Exceeded| MaxRetries[โ Max Retries Reached<br/>Log Error<br/>Use Fallback]
AttemptCount -->|โ
Within Limit| SpawnProcess[โ๏ธ Spawn MCP Process<br/>npx european-parliament-mcp-server<br/>stdio: pipe]
SpawnProcess --> WaitConnection[โณ Wait for Ready<br/>Startup Delay: 500ms<br/>Monitor stderr]
WaitConnection --> ConnectionCheck{โ
Connection<br/>Established?}
ConnectionCheck -->|โ Timeout| IncrementRetry[๐ Increment Counter<br/>Calculate Backoff<br/>2^n seconds]
IncrementRetry --> BackoffWait[โณ Exponential Backoff<br/>1s โ 2s โ 4s]
BackoffWait --> AttemptCount
ConnectionCheck -->|โ Process Error| ProcessError[โ Process Failed<br/>Log stderr<br/>Kill Process]
ProcessError --> IncrementRetry
ConnectionCheck -->|โ
Connected| SendHandshake[๐ค Send Initialize Request<br/>JSON-RPC 2.0<br/>List Available Tools]
SendHandshake --> HandshakeCheck{โ
Initialize<br/>Valid?}
HandshakeCheck -->|โ Invalid| HandshakeFail[โ Initialize Failed<br/>Protocol Mismatch<br/>Close Connection]
HandshakeFail --> IncrementRetry
HandshakeCheck -->|โ
Valid| Authenticated[โ
Connection Ready<br/>Reset Retry Counter<br/>Log Success]
Authenticated --> RequestLoop[๐ Request Loop<br/>Send Requests<br/>60s Timeout Per Request]
RequestLoop --> ValidateResponse{โ
Validate<br/>Response?}
ValidateResponse -->|โ Invalid| ResponseError[โ Invalid Response<br/>Log Error<br/>Retry Request]
ResponseError --> RetryRequest{Retry < 3?}
RetryRequest -->|โ
Yes| RequestLoop
RetryRequest -->|โ No| UseCached[โ ๏ธ Use Cached Data<br/>Or Fallback]
ValidateResponse -->|โ
Valid| ProcessData[โ
Process Data<br/>Parse Response<br/>Extract Fields]
DisabledMode --> End[๐ฏ Complete]
MaxRetries --> End
UseCached --> End
ProcessData --> End
style Start fill:#e8f5e9
style CheckEnv fill:#fff4e1
style AttemptCount fill:#e1f5ff
style SpawnProcess fill:#e8f5e9
style ConnectionCheck fill:#e1f5ff
style HandshakeCheck fill:#e1f5ff
style ValidateResponse fill:#e1f5ff
style Authenticated fill:#d4edda
style ProcessData fill:#d4edda
style DisabledMode fill:#fff3cd
style MaxRetries fill:#ffe1e1
style ProcessError fill:#ffe1e1
style HandshakeFail fill:#ffe1e1
style ResponseError fill:#ffe1e1
style End fill:#d4edda
flowchart LR
subgraph "User Browser"
User[๐ค User<br/>Browser Request]
end
subgraph "GitHub Pages"
CDN[๐ GitHub CDN<br/>TLS 1.3<br/>HTTPS Only]
CACHE[๐พ Edge Cache<br/>Static Content<br/>Immutable]
end
subgraph "Security Headers"
HSTS[๐ HSTS<br/>max-age=31536000<br/>Force HTTPS]
CSP[๐ก๏ธ CSP<br/>default-src 'self'<br/>No Inline Scripts]
XCTO[๐ X-Content-Type-Options<br/>nosniff]
XFO[๐ซ X-Frame-Options<br/>DENY]
end
subgraph "Static Content"
HTML[๐ HTML<br/>Validated<br/>Sanitized]
CSS[๐จ CSS<br/>Inline Styles<br/>No External]
end
subgraph "Monitoring"
LOGS[๐ Access Logs<br/>GitHub Analytics]
METRICS[๐ Metrics<br/>Requests<br/>Response Time]
end
User -->|HTTPS Request| CDN
CDN -->|Check Cache| CACHE
CACHE -->|Hit| Return
CACHE -->|Miss| Fetch
Fetch[Fetch from Origin] --> HTML
HTML --> CSS
CSS --> Apply_Headers
Apply_Headers[Apply Security Headers] --> HSTS
Apply_Headers --> CSP
Apply_Headers --> XCTO
Apply_Headers --> XFO
HSTS --> Return[Return to User]
CSP --> Return
XCTO --> Return
XFO --> Return
CDN --> LOGS
Return --> METRICS
Return --> User
style User fill:#e1f5ff
style CDN fill:#f0f0f0
style CACHE fill:#e8f5e9
style HSTS fill:#ffe1e1
style CSP fill:#ffe1e1
style XCTO fill:#ffe1e1
style XFO fill:#ffe1e1
style HTML fill:#e8f5e9
style CSS fill:#e8f5e9
style Return fill:#d4edda
flowchart TD
Detection[๐ Incident Detection<br/>Security Alert<br/>Dependabot<br/>CodeQL<br/>User Report] --> Classify{๐ Classify Severity<br/>CVSS Score<br/>Impact Assessment}
Classify -->|P0 Critical| Critical[๐จ P0: Critical<br/>Repository Compromise<br/>Malicious Content]
Classify -->|P1 High| High[โ ๏ธ P1: High<br/>XSS Vulnerability<br/>Dependency Issue]
Classify -->|P2 Medium| Medium[โน๏ธ P2: Medium<br/>Data Integrity<br/>Workflow Failure]
Classify -->|P3 Low| Low[๐ P3: Low<br/>Documentation<br/>Non-Critical Bug]
Critical --> ImmediateResponse[โก Immediate Response<br/>Disable Workflows<br/>Revert Commits<br/>Notify Team]
High --> UrgentResponse[๐ฅ Urgent Response<br/>Create Security Advisory<br/>Block PR Merges]
Medium --> StandardResponse[๐ Standard Response<br/>Create Issue<br/>Schedule Fix]
Low --> RoutineResponse[๐ Routine Response<br/>Add to Backlog<br/>Next Sprint]
ImmediateResponse --> Contain[๐ Containment<br/>Remove Malicious Content<br/>Isolate Compromised Code<br/>Revoke Tokens]
UrgentResponse --> Contain
StandardResponse --> Contain
RoutineResponse --> Contain
Contain --> Investigate[๐ Investigation<br/>Review Git Logs<br/>Check Actions Logs<br/>Analyze CodeQL Findings]
Investigate --> RootCause{๐ฏ Root Cause<br/>Identified?}
RootCause -->|โ No| DeepDive[๐ฌ Deep Analysis<br/>Forensics<br/>External Review]
DeepDive --> RootCause
RootCause -->|โ
Yes| Remediate[๐ง Remediation<br/>Apply Patches<br/>Update Dependencies<br/>Fix Vulnerabilities]
Remediate --> Test[๐งช Testing<br/>Unit Tests<br/>Integration Tests<br/>Security Scans]
Test -->|โ Fail| FixIssues[๐ ๏ธ Fix Issues<br/>Debug<br/>Re-apply Fixes]
FixIssues --> Remediate
Test -->|โ
Pass| Deploy[๐ Deploy Fix<br/>Merge PR<br/>GitHub Actions<br/>Update Documentation]
Deploy --> Verify[โ
Verification<br/>Monitor Metrics<br/>Check Logs<br/>Confirm Resolution]
Verify -->|โ Not Resolved| Escalate[โฌ๏ธ Escalate<br/>Senior Review<br/>External Help]
Escalate --> Investigate
Verify -->|โ
Resolved| Document[๐ Documentation<br/>Incident Report<br/>Lessons Learned<br/>Update Threat Model]
Document --> Communicate[๐ข Communication<br/>Security Advisory<br/>CHANGELOG.md<br/>Close Issue]
Communicate --> PostMortem[๐ Post-Mortem<br/>Team Review<br/>Process Improvements<br/>Update Procedures]
PostMortem --> Complete[โ
Incident Closed<br/>Controls Updated<br/>Metrics Recorded]
style Detection fill:#fff4e1
style Critical fill:#ffe1e1
style High fill:#fff3cd
style Medium fill:#e1f5ff
style Low fill:#f0f0f0
style Contain fill:#e8f5e9
style Remediate fill:#e8f5e9
style Deploy fill:#e8f5e9
style Complete fill:#d4edda
This workflow implements ISO 27001:2022 Control A.8.8 (Management of Technical Vulnerabilities) with defined severity levels and SLA-based remediation timelines.
flowchart TD
Discovery[๐ Vulnerability Discovery] --> Source{Discovery<br/>Source}
Source -->|Dependabot| DepAlert[๐ค Dependabot Alert<br/>Dependencies<br/>GitHub Security]
Source -->|CodeQL| CodeQLAlert[๐ CodeQL Finding<br/>SAST Scanning<br/>Security Issue]
Source -->|npm audit| AuditAlert[๐ฆ npm audit<br/>Package Vulnerabilities<br/>CVE Database]
Source -->|Manual| ManualReport[๐ค Manual Report<br/>Security Researcher<br/>User Report]
DepAlert --> Assess
CodeQLAlert --> Assess
AuditAlert --> Assess
ManualReport --> Assess
Assess[๐ Assessment Phase] --> CVSSScore{๐ฏ CVSS Score<br/>Calculation}
CVSSScore --> Exploit{๐ฌ Exploitability<br/>Analysis}
Exploit --> Impact{๐ฅ Impact<br/>Assessment}
Impact --> Prioritize{โก Prioritization}
Prioritize -->|Critical 9.0-10.0| Critical[๐จ P0: Critical<br/>SLA: 24 hours<br/>Remote Code Execution<br/>Data Breach Risk]
Prioritize -->|High 7.0-8.9| High[โ ๏ธ P1: High<br/>SLA: 7 days<br/>Privilege Escalation<br/>XSS/CSRF]
Prioritize -->|Medium 4.0-6.9| Medium[โน๏ธ P2: Medium<br/>SLA: 30 days<br/>Information Disclosure<br/>DoS]
Prioritize -->|Low 0.1-3.9| Low[๐ P3: Low<br/>SLA: 90 days<br/>Minor Issues<br/>Low Impact]
Critical --> EmergencyTeam[๐จ Emergency Response<br/>Notify Security Team<br/>Disable Affected Feature]
High --> UrgentAction[๐ฅ Urgent Action<br/>Create Security Advisory<br/>Block Deployments]
Medium --> StandardTrack[๐ Standard Track<br/>Create Issue<br/>Schedule Sprint]
Low --> BacklogAdd[๐ Backlog<br/>Log for Future<br/>Next Release]
EmergencyTeam --> Remediation
UrgentAction --> Remediation
StandardTrack --> Remediation
BacklogAdd --> Remediation
Remediation[๐ง Remediation Strategy] --> Strategy{Strategy<br/>Selection}
Strategy -->|Available| Patch[๐ฉน Apply Patch<br/>Update Dependency<br/>Upgrade Version]
Strategy -->|Not Available| Workaround[๐ Implement Workaround<br/>Code Changes<br/>Configuration Update]
Strategy -->|Not Feasible| Mitigate[๐ก๏ธ Mitigate Risk<br/>Additional Controls<br/>Monitoring]
Strategy -->|False Positive| Accept[โ
Accept Risk<br/>Document Rationale<br/>Security Exception]
Patch --> Testing
Workaround --> Testing
Mitigate --> Testing
Accept --> Document
Testing[๐งช Verification Testing] --> UnitTest[โ
Unit Tests<br/>169 Tests Pass]
UnitTest --> IntegTest[๐ Integration Tests<br/>82 Tests Pass]
IntegTest --> SecScan[๐ Security Scan<br/>CodeQL Clean<br/>npm audit Clean]
SecScan --> TestResult{Tests<br/>Pass?}
TestResult -->|โ Fail| FixFailed[๐ ๏ธ Fix Failed Tests<br/>Debug Issues<br/>Adjust Fix]
FixFailed --> Remediation
TestResult -->|โ
Pass| Deploy[๐ Deploy Fix<br/>Merge PR<br/>Production Release]
Deploy --> Verify[โ
Post-Deploy Verification] --> Rescan{Vulnerability<br/>Resolved?}
Rescan -->|โ Not Fixed| Escalate[โฌ๏ธ Escalate<br/>Senior Security Review<br/>External Consultation]
Escalate --> Remediation
Rescan -->|โ
Fixed| Document[๐ Documentation]
Document --> UpdateAdvisory[๐ Update Security Advisory<br/>CVE Details<br/>Remediation Steps]
UpdateAdvisory --> UpdateCHANGELOG[๐ Update CHANGELOG.md<br/>Security Fix Entry<br/>Version Bump]
UpdateCHANGELOG --> CloseIssue[๐ Close Issue<br/>Link to Commit<br/>Verification Evidence]
CloseIssue --> Metrics[๐ Update Metrics<br/>MTTR Calculation<br/>Vulnerability Stats]
Metrics --> Review[๐ Post-Fix Review<br/>Lessons Learned<br/>Process Improvement]
Review --> Complete[โ
Vulnerability Closed<br/>Evidence Recorded<br/>Controls Updated]
style Discovery fill:#fff4e1
style Critical fill:#ffe1e1
style High fill:#fff3cd
style Medium fill:#e1f5ff
style Low fill:#f0f0f0
style Patch fill:#e8f5e9
style Testing fill:#e1f5ff
style Deploy fill:#e8f5e9
style Complete fill:#d4edda
style Accept fill:#fff3cd
| Phase | Control | SLA | ISMS Reference |
|---|---|---|---|
| Discovery | Automated scanning (Dependabot, CodeQL, npm audit) | Continuous | ISO 27001 A.8.8 |
| Assessment | CVSS scoring, exploitability analysis | 24 hours | NIST SP 800-30 |
| Prioritization | Risk-based tiers with SLAs | By severity | ISO 27001 A.5.9 |
| Remediation | Patch/workaround/mitigate/accept | 24h-90d | ISO 27001 A.8.8 |
| Verification | Testing, scanning, deployment validation | Before close | ISO/IEC 27001:2013 A.14.2.8 |
| Documentation | Advisories, CHANGELOG, evidence | Required | ISO/IEC 27001:2013 A.12.1.1 |
| Metrics | MTTR, vulnerability stats tracking | Monthly | ISO/IEC 27001:2013 A.18.2.1 |
Mean Time to Remediate (MTTR) Targets:
This flow shows the end-to-end secure data pipeline from European Parliament APIs through the MCP server to static site generation, with comprehensive security controls at each stage.
flowchart TD
subgraph "European Parliament APIs"
EPAPI[๐๏ธ EP Official APIs<br/>MEPs, Sessions<br/>Documents, Votes]
end
subgraph "MCP Server Layer"
MCPServer[โ๏ธ EP MCP Server<br/>TypeScript 5.7<br/>Node.js 25]
MCPTransport[๐ก JSON-RPC 2.0<br/>stdio Transport<br/>Protocol v1.0]
MCPCache[๐พ LRU Cache<br/>TTL: 5 min<br/>Max: 500 entries]
end
subgraph "Client Layer"
MCPClient[๐ MCP Client<br/>Custom JSON-RPC over stdio<br/>src/mcp/ep-mcp-client.ts<br/>Planned: @modelcontextprotocol/sdk]
SchemaVal[๐งช Planned: Schema Validation<br/>JSON Schema<br/>Type Checking]
TypeCheck[๐ Planned: Type Validation<br/>TypeScript Interfaces<br/>Runtime Checks]
end
subgraph "Sanitization Pipeline"
HTMLSan[๐งน Planned: HTML Sanitizer<br/>DOMPurify<br/>Strip Scripts]
XSSEncode[๐ Planned: XSS Encoding<br/>HTML Entities<br/>< > & " ']
URLVal[๐ Planned: URL Validation<br/>HTTPS Only<br/>Domain Whitelist]
LengthCheck[๐ Planned: Length Validation<br/>Max Lengths<br/>Truncation]
end
subgraph "Content Generation"
Template[๐ Template Engine<br/>14 Languages<br/>HTML5]
CSPCheck[๐ก๏ธ CSP Compliance<br/>JSON-LD Allowed<br/>No eval()]
HTMLVal[โ
HTML Validation<br/>htmlhint<br/>Standards Check]
end
subgraph "Output Layer"
StaticFiles[๐ฆ Static HTML<br/>index-{lang}.html<br/>CSS Inline]
Sitemap[๐บ๏ธ Sitemap.xml<br/>SEO Optimized<br/>14 Languages]
Deploy[๐ GitHub Pages<br/>Static Site Hosting<br/>GitHub Actions Deploy]
end
subgraph "Error Handling"
FallbackData[โ ๏ธ Fallback Content<br/>Placeholder Articles<br/>Safe Defaults]
ErrorLog[๐ Error Logging<br/>Structured Logs<br/>GitHub Actions]
end
EPAPI -->|HTTPS Request| MCPServer
MCPServer --> MCPTransport
MCPTransport --> MCPCache
MCPCache -->|Cache Hit| ReturnCached[โ
Return Cached<br/>Skip API Call]
MCPCache -->|Cache Miss| FetchFresh[๐ฅ Fetch Fresh<br/>Call EP API]
ReturnCached --> MCPClient
FetchFresh --> MCPClient
MCPClient --> SchemaVal
SchemaVal -->|โ Invalid| ErrorLog
SchemaVal -->|โ
Valid| TypeCheck
TypeCheck -->|โ Invalid| ErrorLog
TypeCheck -->|โ
Valid| HTMLSan
ErrorLog --> FallbackData
FallbackData --> Template
HTMLSan --> XSSEncode
XSSEncode --> URLVal
URLVal --> LengthCheck
LengthCheck --> Template
Template --> CSPCheck
CSPCheck -->|โ Violation| ErrorLog
CSPCheck -->|โ
Compliant| HTMLVal
HTMLVal -->|โ Invalid| FixHTML[๐ง Auto-Fix HTML<br/>Correct Issues]
FixHTML --> HTMLVal
HTMLVal -->|โ
Valid| StaticFiles
StaticFiles --> Sitemap
Sitemap --> Deploy
Deploy --> CDN[๐ GitHub CDN<br/>Edge Caching<br/>Global Distribution]
style EPAPI fill:#e3f2fd
style MCPServer fill:#f0f4c3
style MCPClient fill:#c8e6c9
style HTMLSan fill:#fff9c4
style XSSEncode fill:#ffe1e1
style Template fill:#e1f5ff
style StaticFiles fill:#e8f5e9
style Deploy fill:#c8e6c9
style FallbackData fill:#fff3cd
style ErrorLog fill:#ffcdd2
style CDN fill:#d4edda
| Layer | Control | Purpose | Implementation |
|---|---|---|---|
| API Layer | HTTPS-only communication | Encryption in transit | TLS 1.3, HTTPS-only, HSTS via CDN/hosting config |
| MCP Server | JSON-RPC 2.0 protocol | Structured communication | Standard protocol implementation |
| Caching | LRU cache with TTL | Performance + resilience | 5 min TTL, 500 entry max |
| Schema Validation | JSON Schema enforcement (future control) | Data structure integrity | Planned: Ajv validator (strict mode), not yet implemented in codebase |
| Type Checking | Runtime type validation (future control) | Type safety beyond TypeScript | Planned: io-ts runtime checks, not yet implemented in codebase |
| HTML Sanitization | Planned: DOMPurify scrubbing (future control) | XSS prevention | Not yet in codebase; current: HTML entity encoding via template |
| XSS Encoding | HTML entity encoding (future control) | Output encoding | Planned: template-level encoding for all user-controlled data, not yet implemented in codebase |
| URL Validation | HTTPS + whitelist (future control) | Prevent malicious redirects | Planned: HTTPS-only + europarl.europa.eu allowlist for article/source URLs, not yet implemented in codebase |
| CSP Enforcement | JSON-LD inline scripts allowed; no eval() | XSS mitigation | default-src 'self'; script-src allows type=application/ld+json |
| HTML Validation | Standards compliance | Cross-browser compatibility | htmlhint, W3C validation |
| Fallback Content | Graceful degradation | Availability | Placeholder articles |
| Error Logging | Structured logging | Debugging + monitoring | GitHub Actions logs |
This workflow illustrates the full CI/CD content generation and validation pipeline for European Parliament news in 14 languages (PR/test-and-report.yml and release.yml). The scheduled daily .github/workflows/news-generation.yml job only runs the generate-and-commit subset (no HTML/SEO/a11y validation loop).
flowchart TD
Start[๐ Content Generation<br/>CI/CD: PRs / Releases<br/>Daily 06:00 UTC (subset)] --> FetchData[๐ฅ Fetch Source Data<br/>EP MCP Server<br/>Validated JSON]
FetchData --> LangDetect{โ๏ธ Language Args &<br/>Preset Expansion}
LangDetect --> EN[๐ฌ๐ง English<br/>index.html]
LangDetect --> SV[๐ธ๐ช Swedish<br/>index-sv.html]
LangDetect --> DA[๐ฉ๐ฐ Danish<br/>index-da.html]
LangDetect --> NO[๐ณ๐ด Norwegian<br/>index-no.html]
LangDetect --> FI[๐ซ๐ฎ Finnish<br/>index-fi.html]
LangDetect --> DE[๐ฉ๐ช German<br/>index-de.html]
LangDetect --> FR[๐ซ๐ท French<br/>index-fr.html]
LangDetect --> ES[๐ช๐ธ Spanish<br/>index-es.html]
LangDetect --> NL[๐ณ๐ฑ Dutch<br/>index-nl.html]
LangDetect --> AR[๐ธ๐ฆ Arabic<br/>index-ar.html]
LangDetect --> HE[๐ฎ๐ฑ Hebrew<br/>index-he.html]
LangDetect --> JA[๐ฏ๐ต Japanese<br/>index-ja.html]
LangDetect --> KO[๐ฐ๐ท Korean<br/>index-ko.html]
LangDetect --> ZH[๐จ๐ณ Chinese<br/>index-zh.html]
EN --> ENTemplate[๐ EN Template<br/>HTML5 Structure<br/>Semantic Tags]
SV --> SVTemplate[๐ SV Template<br/>HTML5 Structure<br/>Semantic Tags]
DA --> DATemplate[๐ DA Template<br/>HTML5 Structure<br/>Semantic Tags]
NO --> NOTemplate[๐ NO Template<br/>HTML5 Structure<br/>Semantic Tags]
FI --> FITemplate[๐ FI Template<br/>HTML5 Structure<br/>Semantic Tags]
DE --> DETemplate[๐ DE Template<br/>HTML5 Structure<br/>Semantic Tags]
FR --> FRTemplate[๐ FR Template<br/>HTML5 Structure<br/>Semantic Tags]
ES --> ESTemplate[๐ ES Template<br/>HTML5 Structure<br/>Semantic Tags]
NL --> NLTemplate[๐ NL Template<br/>HTML5 Structure<br/>Semantic Tags]
AR --> ARTemplate[๐ AR Template<br/>HTML5 Structure<br/>RTL Support]
HE --> HETemplate[๐ HE Template<br/>HTML5 Structure<br/>RTL Support]
JA --> JATemplate[๐ JA Template<br/>HTML5 Structure<br/>Semantic Tags]
KO --> KOTemplate[๐ KO Template<br/>HTML5 Structure<br/>Semantic Tags]
ZH --> ZHTemplate[๐ ZH Template<br/>HTML5 Structure<br/>Semantic Tags]
ENTemplate --> ENSecCheck[๐ EN Security<br/>Sanitize + Validate]
SVTemplate --> SVSecCheck[๐ SV Security<br/>Sanitize + Validate]
DATemplate --> DASecCheck[๐ DA Security<br/>Sanitize + Validate]
NOTemplate --> NOSecCheck[๐ NO Security<br/>Sanitize + Validate]
FITemplate --> FISecCheck[๐ FI Security<br/>Sanitize + Validate]
DETemplate --> DESecCheck[๐ DE Security<br/>Sanitize + Validate]
FRTemplate --> FRSecCheck[๐ FR Security<br/>Sanitize + Validate]
ESTemplate --> ESSecCheck[๐ ES Security<br/>Sanitize + Validate]
NLTemplate --> NLSecCheck[๐ NL Security<br/>Sanitize + Validate]
ARTemplate --> ARSecCheck[๐ AR Security<br/>Sanitize + Validate]
HETemplate --> HESecCheck[๐ HE Security<br/>Sanitize + Validate]
JATemplate --> JASecCheck[๐ JA Security<br/>Sanitize + Validate]
KOTemplate --> KOSecCheck[๐ KO Security<br/>Sanitize + Validate]
ZHTemplate --> ZHSecCheck[๐ ZH Security<br/>Sanitize + Validate]
ENSecCheck --> Aggregate
SVSecCheck --> Aggregate
DASecCheck --> Aggregate
NOSecCheck --> Aggregate
FISecCheck --> Aggregate
DESecCheck --> Aggregate
FRSecCheck --> Aggregate
ESSecCheck --> Aggregate
NLSecCheck --> Aggregate
ARSecCheck --> Aggregate
HESecCheck --> Aggregate
JASecCheck --> Aggregate
KOSecCheck --> Aggregate
ZHSecCheck --> Aggregate
Aggregate[๐ Aggregate Results<br/>14 Language Indexes<br/>Collect Metadata] --> MainIndex[๐ Generate Main Index<br/>index.html<br/>Language Selector]
MainIndex --> Sitemap[๐บ๏ธ Generate Sitemap<br/>sitemap.xml<br/>All 14 Languages]
Sitemap --> ValidateAll{โ
Validate<br/>All Files?}
ValidateAll -->|โ Validation Errors| ShowErrors[โ Show Errors<br/>htmlhint Output<br/>Line Numbers]
ShowErrors --> FixErrors[๐ง Auto-Fix<br/>Common Issues<br/>Re-validate]
FixErrors --> ValidateAll
ValidateAll -->|โ
All Valid| A11yCheck[โฟ Accessibility Check<br/>WCAG 2.1 AA<br/>E2E Workflow Only]
A11yCheck -->|โ A11y Issues| FixA11y[๐ง Fix A11y<br/>Add lang Attributes<br/>Alt Text]
FixA11y --> A11yCheck
A11yCheck -->|โ
Compliant| SEOCheck[๐ SEO Validation<br/>Meta Tags<br/>hreflang Links<br/>Release Workflow Only]
SEOCheck --> Complete[โ
Generation Complete<br/>14 Languages<br/>Ready to Deploy]
style Start fill:#e3f2fd
style LangDetect fill:#fff4e1
style EN fill:#e8f5e9
style FR fill:#e8f5e9
style DE fill:#e8f5e9
style ES fill:#e8f5e9
style IT fill:#e8f5e9
style PT fill:#e8f5e9
style ENSecCheck fill:#ffe1e1
style FRSecCheck fill:#ffe1e1
style DESecCheck fill:#ffe1e1
style ESSecCheck fill:#ffe1e1
style ITSecCheck fill:#ffe1e1
style PTSecCheck fill:#ffe1e1
style Aggregate fill:#e1f5ff
style MainIndex fill:#c8e6c9
style Sitemap fill:#c8e6c9
style Complete fill:#d4edda
| Control | Applied to | Purpose | Standard |
|---|---|---|---|
| HTML Sanitization | All 14 languages | XSS prevention | OWASP ASVS 5.3 |
| HTML Entity Encoding | All 14 languages | Output encoding | OWASP ASVS 5.2 |
| HTML Validation | All 14 languages | Standards compliance | W3C HTML5 |
| Language Attributes | All 14 languages | Accessibility | WCAG 2.1 AA 3.1.1 |
| hreflang Links | All 14 languages | SEO, crawling | Google Guidelines |
| CSP Headers | All 14 languages | Script execution control | OWASP CSP |
| Character Encoding | All 14 languages | UTF-8 declaration | HTML5 Standard |
| Text Direction Handling | All 14 languages (LTR/RTL) | Ensure correct text direction rendering | HTML dir attribute / W3C HTML5 |
Supported Languages:
This flow shows the secure deployment pipeline from Git commit to GitHub Pages with comprehensive security gates, SBOM generation, and SLSA attestations. Note: linting, testing, and coverage gates apply to PR merges and release workflows; the daily news-generation workflow triggers GitHub Pages deployment directly after build.
flowchart TD
Commit[๐พ Git Commit<br/>Developer Push<br/>Feature Branch] --> SHAVerify[๐ SHA Verification<br/>Git Integrity Check<br/>GPG Signature]
SHAVerify --> GHActions[๐ค GitHub Actions<br/>Workflow Trigger<br/>ubuntu-latest]
GHActions --> SecGates[๐ก๏ธ Security Gates<br/>PR & Release Workflows] --> Gate1{Gate 1:<br/>Linting}
Gate1 -->|โ Fail| BlockDeploy1[๐ซ Block PR / Release<br/>ESLint Errors<br/>Fix Required]
Gate1 -->|โ
Pass| Gate2{Gate 2:<br/>Unit Tests}
Gate2 -->|โ Fail| BlockDeploy2[๐ซ Block PR / Release<br/>169 Tests Failed<br/>Debug Required]
Gate2 -->|โ
Pass| Gate3{Gate 3:<br/>Integration Tests}
Gate3 -->|โ Fail| BlockDeploy3[๐ซ Block PR / Release<br/>82 Tests Failed<br/>Fix Required]
Gate3 -->|โ
Pass| Gate4{Gate 4:<br/>Security Scan}
Gate4 -->|โ Critical/High| BlockDeploy4[๐ซ Block PR / Release<br/>CodeQL Issues<br/>Vulnerability Fix]
Gate4 -->|โ
Pass| Gate5{Gate 5:<br/>Coverage}
Gate5 -->|โ Below 80%| BlockDeploy5[๐ซ Block PR / Release<br/>Coverage Too Low<br/>Add Tests]
Gate5 -->|โ
Pass| Build[๐๏ธ Build Phase]
Build --> GenNews[๐ฐ Generate News<br/>14 Languages<br/>All Article Types]
GenNews --> GenIndex[๐ Generate Indexes<br/>Language Indexes<br/>Main Index]
GenIndex --> GenSitemap[๐บ๏ธ Generate Sitemap<br/>sitemap.xml<br/>SEO Optimization]
GenSitemap --> SBOM[๐ฆ SBOM Generation<br/>SPDX Format<br/>All Dependencies]
SBOM --> Attest1[๐ Build Provenance<br/>SLSA Level 3<br/>GitHub Attestations]
Attest1 --> Attest2[๐ SBOM Attestation<br/>Cryptographic Sign<br/>Sigstore]
Attest2 --> Artifacts[๐ฆ Collect Artifacts<br/>HTML Files<br/>CSS Files<br/>Sitemap<br/>SBOM]
Artifacts --> DeployPrep[๐ Deployment Prep<br/>Organize Files<br/>Check Integrity]
DeployPrep --> DeployGHP[๐ค Deploy to GitHub Pages<br/>Static Files<br/>actions/deploy-pages]
DeployGHP --> GHPages[๐ GitHub Pages Live<br/>GitHub CDN<br/>Global Distribution]
GHPages --> HealthCheck{๐ฅ Health Check<br/>Site Accessible?}
HealthCheck -->|โ Failed| Rollback[๐ Rollback<br/>Revert to Previous<br/>Restore Last Good]
Rollback --> NotifyFailure[๐ง Notify Team<br/>Deployment Failed<br/>Incident Created]
HealthCheck -->|โ
Success| Verify[โ
Verification Phase] --> CheckHTTPS{HTTPS<br/>Working?}
CheckHTTPS -->|โ No| Rollback
CheckHTTPS -->|โ
Yes| CheckContent{Content<br/>Loads?}
CheckContent -->|โ No| Rollback
CheckContent -->|โ
Yes| CheckLangs{All 14<br/>Languages?}
CheckLangs -->|โ Missing| Rollback
CheckLangs -->|โ
Present| CheckSitemap{Sitemap<br/>Valid?}
CheckSitemap -->|โ Invalid| Rollback
CheckSitemap -->|โ
Valid| UpdateMetrics[๐ Update Metrics<br/>Deployment Time<br/>Build Duration<br/>Success Rate]
UpdateMetrics --> TagRelease[๐ท๏ธ Tag Release<br/>Git Tag<br/>Version Bump<br/>Create GitHub Release]
TagRelease --> NotifySuccess[๐ง Notify Team<br/>Deployment Successful<br/>Version + URL]
NotifySuccess --> Complete[โ
Deployment Complete<br/>Live on GitHub Pages<br/>Attested + Verified]
style Commit fill:#e3f2fd
style SHAVerify fill:#ffe1e1
style Gate1 fill:#e1f5ff
style Gate2 fill:#e1f5ff
style Gate3 fill:#e1f5ff
style Gate4 fill:#ffe1e1
style Gate5 fill:#e1f5ff
style BlockDeploy1 fill:#ffcdd2
style BlockDeploy2 fill:#ffcdd2
style BlockDeploy3 fill:#ffcdd2
style BlockDeploy4 fill:#ffcdd2
style BlockDeploy5 fill:#ffcdd2
style SBOM fill:#fff9c4
style Attest1 fill:#ffe1e1
style Attest2 fill:#ffe1e1
style DeployGHP fill:#c8e6c9
style GHPages fill:#e8f5e9
style Rollback fill:#ffcdd2
style Complete fill:#d4edda
| Stage | Control | Purpose | Implementation |
|---|---|---|---|
| Commit | SHA verification, GPG signatures | Code integrity | Git built-in |
| Linting | ESLint security rules | Code quality, vulnerabilities | eslint-plugin-security |
| Unit Tests | 169 tests, 82%+ coverage | Functional correctness | Vitest |
| Integration Tests | 82 MCP client tests | API contract validation | Vitest + custom JSON-RPC MCP client |
| Security Scan | CodeQL SAST | Vulnerability detection | GitHub CodeQL |
| Coverage Gate | 80% lines, 75% branches | Test thoroughness | Vitest v8 provider (@vitest/coverage-v8) |
| SBOM | SPDX JSON format | Supply chain transparency | Anchore SBOM Action |
| Provenance | SLSA Level 3 | Build integrity | GitHub Attestations |
| Attestation | Cryptographic signing | Artifact authenticity | Sigstore |
| Health Check | Multi-point verification | Deployment validation | Custom checks |
| Rollback | Automated revert | Failure recovery | Git + GitHub Pages re-deploy |
| Metrics | Deployment tracking | Performance monitoring | GitHub Actions logs |
Deployment Security Requirements:
This comprehensive flow shows the automated release process with SLSA Level 3 attestations and documentation-as-code implementation.
flowchart TD
Start[๐ Release Trigger<br/>Manual or Tag Push] --> Prepare[๐ Prepare Job]
Prepare --> Lint[๐ Run Linter<br/>ESLint Validation]
Lint --> HTMLVal[โ
Validate HTML<br/>htmlhint]
HTMLVal --> Coverage[๐ Run Tests with Coverage<br/>169 Unit Tests<br/>82%+ Coverage]
Coverage --> CoverageCheck{Coverage<br/>Thresholds?}
CoverageCheck -->|โ Fail| Fail1[โ Build Failed]
CoverageCheck -->|โ
Pass| E2E[๐ญ Run E2E Tests<br/>Playwright Chromium]
E2E --> E2ECheck{E2E Tests<br/>Pass?}
E2ECheck -->|โ Fail| Fail2[โ Build Failed]
E2ECheck -->|โ
Pass| CleanDocs[๐งน Clean Old Documentation<br/>Remove docs/api, coverage, test-results]
CleanDocs --> GenAPI[๐ Generate API Documentation<br/>JSDoc โ docs/api/<br/>52 files]
GenAPI --> CopyReports[๐ Copy Test Reports<br/>Coverage โ docs/coverage/<br/>Test Results โ docs/test-results/]
CopyReports --> GenIndex[๐จ Generate Documentation Index<br/>Beautiful Hub Page<br/>docs/index.html]
GenIndex --> VerifyDocs{Verify<br/>Documentation<br/>Structure?}
VerifyDocs -->|โ Missing Files| Fail3[โ Build Failed]
VerifyDocs -->|โ
Complete| CommitDocs[๐พ Commit Documentation<br/>Git Auto-Commit<br/>To Main Branch]
CommitDocs --> TagVersion{Workflow<br/>Dispatch?}
TagVersion -->|โ
Yes| CreateTag[๐ท๏ธ Create Version Tag<br/>npm version + git tag]
TagVersion -->|โ No| Build[๐จ Build Job]
CreateTag --> Build
Build --> Checkout2[๐ฅ Checkout at Tag]
Checkout2 --> GenNews{News<br/>Directory<br/>Empty?}
GenNews -->|โ
Yes| SampleNews[๐ฐ Generate Sample News<br/>Week Ahead Articles]
GenNews -->|โ No| CreateArtifact
SampleNews --> CreateArtifact[๐ฆ Create Release Artifacts<br/>Include docs/, playwright-report/<br/>ZIP Archive]
CreateArtifact --> GenSBOM[๐ Generate SBOM<br/>SPDX JSON Format<br/>Anchore SBOM Action]
GenSBOM --> BuildProv[๐ Build Provenance Attestation<br/>SLSA Level 3<br/>GitHub Attestations API]
BuildProv --> SBOMAttest[๐ SBOM Attestation<br/>Cryptographic Signing]
SBOMAttest --> UploadArtifacts[๐ค Upload All Artifacts<br/>Build + Security Artifacts]
UploadArtifacts --> Release[๐ Release Job]
Release --> DraftNotes[๐ Draft Release Notes<br/>Release Drafter]
DraftNotes --> CreateRelease[๐ Create GitHub Release<br/>Attach All Artifacts]
CreateRelease --> Verify{Verification<br/>Required?}
Verify -->|โ
Yes| VerifyCmd[๐ Verify Attestations<br/>gh attestation verify]
Verify -->|โ No| Complete[โ
Release Complete<br/>Documentation Published<br/>Artifacts Attested]
VerifyCmd --> Complete
style Start fill:#e3f2fd
style Prepare fill:#f0f4c3
style Lint fill:#e1f5ff
style Coverage fill:#e1f5ff
style E2E fill:#e1f5ff
style CleanDocs fill:#fff9c4
style GenAPI fill:#c8e6c9
style CopyReports fill:#c8e6c9
style GenIndex fill:#c8e6c9
style CommitDocs fill:#a5d6a7
style Build fill:#f0f4c3
style GenSBOM fill:#ffe1e1
style BuildProv fill:#ffe1e1
style SBOMAttest fill:#ffe1e1
style Release fill:#f0f4c3
style CreateRelease fill:#c5cae9
style Complete fill:#c8e6c9
style Fail1 fill:#ffcdd2
style Fail2 fill:#ffcdd2
style Fail3 fill:#ffcdd2
| Stage | Control | Purpose | ISMS Reference |
|---|---|---|---|
| Validation | Linter + HTML validation | Code quality, syntax errors | Quality standards |
| Testing | 169 unit tests, 82%+ coverage | Functional correctness | ยง3.3 Testing Requirements |
| E2E Testing | Playwright across browsers | User workflow validation | Quality assurance |
| Documentation | JSDoc, coverage, E2E reports | Evidence generation | ยง3.2 Architecture Documentation |
| Version Control | Git commit + tag | Audit trail, traceability | ISO 27001 A.12.1.1 |
| SBOM Generation | SPDX format, all dependencies | Supply chain transparency | ยง4.4 Supply Chain Security |
| Build Provenance | SLSA Level 3 attestation | Build integrity | SLSA Framework |
| SBOM Attestation | Cryptographic signing | Artifact authenticity | Non-repudiation |
| Verification | gh attestation verify | Release validation | Trust establishment |
Integrity:
Transparency:
Compliance:
Document Status: Active
Next Review: 2026-05-24
Owner: Development Team, Hack23 AB
Classification: Public
Version: 1.1