Compliance Frameworks Skill
Context
This skill applies when:
- Mapping security controls to compliance frameworks
- Creating compliance documentation
- Conducting compliance audits
- Implementing EU Cyber Resilience Act (CRA) requirements
- Generating compliance evidence portfolios
- Responding to compliance questionnaires
- Preparing for security certifications
This skill enforces Hack23 ISMS policies for multi-standard compliance alignment.
Rules
1. ISO 27001:2022 (Secure Development Policy 📜)
- A.5: Organizational controls (policies, roles)
- A.8: Asset management (handling, classification, deletion)
- A.12: Operations security (change management, vulnerabilities)
- A.13: Communications security (network controls, encryption)
- A.14: System acquisition and development (secure SDLC)
2. NIST Cybersecurity Framework 2.0 (Secure Development Policy 📜)
- GOVERN: Risk management, policy, oversight
- IDENTIFY: Asset management, risk assessment
- PROTECT: Access control, data security, awareness
- DETECT: Continuous monitoring, anomaly detection
- RESPOND: Incident analysis, mitigation, communication
- RECOVER: Recovery planning, improvements, communications
3. CIS Controls v8.1 (Secure Development Policy 📜)
- IG1 (Implementation Group 1): Basic cyber hygiene (8 controls)
- IG2 (Implementation Group 2): Medium-sized organizations (56 additional controls)
- IG3 (Implementation Group 3): Large organizations/high security (additional 64 controls)
4. EU Cyber Resilience Act (Open Source Policy 🛡️)
- Conformity Assessment: CE marking for digital products
- Security Updates: Timely vulnerability patching
- Risk Management: Classification-based security requirements
- Documentation: Technical documentation for 10 years
- Incident Reporting: Report actively exploited vulnerabilities
Examples
✅ Good Pattern: ISO 27001:2022 Control Mapping
/**
* ISO 27001:2022 Control Implementation Matrix
*
* ISMS Policy: Compliance Framework Integration
* Evidence: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md#compliance-framework-integration
*/
const iso27001Controls = {
// A.5 Organizational Controls
'A.5.1': {
control: 'Policies for information security',
implementation: 'SECURITY.md, Open_Source_Policy.md, Secure_Development_Policy.md',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md',
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/Open_Source_Policy.md'
],
status: 'Implemented',
lastReview: '2026-02-16'
},
// A.8 Asset Management
'A.8.3': {
control: 'Handling of assets',
implementation: 'Input validation with Zod, data classification per Data_Classification_Policy.md',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/validation/',
'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Data_Classification_Policy.md'
],
status: 'Implemented',
lastReview: '2026-02-16'
},
'A.8.10': {
control: 'Information deletion',
implementation: 'LRU cache with TTL, GDPR right to erasure support',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/cache.ts',
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/gdpr-compliance/SKILL.md'
],
status: 'Implemented',
lastReview: '2026-02-16'
},
// A.12 Operations Security
'A.12.1.2': {
control: 'Change management',
implementation: 'GitHub PRs, code review, CI/CD pipeline',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/workflows/',
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/PULL_REQUEST_TEMPLATE.md'
],
status: 'Implemented',
lastReview: '2026-02-16'
},
'A.12.6.1': {
control: 'Management of technical vulnerabilities',
implementation: 'Dependabot, npm audit, CodeQL, vulnerability remediation SLAs',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/security/dependabot',
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/workflows/codeql.yml',
'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#vulnerability-management'
],
status: 'Implemented',
lastReview: '2026-02-16'
},
// A.13 Communications Security
'A.13.1.1': {
control: 'Network controls',
implementation: 'HTTPS only for EP API, TLS 1.3, no open network ports',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/api/client.ts',
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY_HEADERS.md'
],
status: 'Implemented',
lastReview: '2026-02-16'
},
// A.14 System Acquisition, Development and Maintenance
'A.14.2.1': {
control: 'Secure development policy',
implementation: 'Secure_Development_Policy.md, security by design, threat modeling',
evidence: [
'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md',
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md'
],
status: 'Implemented',
lastReview: '2026-02-16'
},
'A.14.2.5': {
control: 'Secure system engineering principles',
implementation: 'Defense in depth, fail secure, input validation, least privilege',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/ARCHITECTURE.md',
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/security-by-design/SKILL.md'
],
status: 'Implemented',
lastReview: '2026-02-16'
}
};
// Export for compliance reporting
export function generateISO27001Report(): string {
const implemented = Object.values(iso27001Controls).filter(c => c.status === 'Implemented').length;
const total = Object.keys(iso27001Controls).length;
return `
# ISO 27001:2022 Compliance Report
**Project**: European Parliament MCP Server
**Date**: ${new Date().toISOString()}
**Status**: ${implemented}/${total} controls implemented (${Math.round(implemented/total*100)}%)
## Control Implementation Summary
${Object.entries(iso27001Controls).map(([id, control]) => `
### ${id}: ${control.control}
**Implementation**: ${control.implementation}
**Status**: ${control.status}
**Last Review**: ${control.lastReview}
**Evidence**:
${control.evidence.map(e => `- ${e}`).join('\n')}
`).join('\n')}
## Compliance Statement
This system implements security controls aligned with ISO 27001:2022 standard, demonstrating commitment to information security management per [Hack23 ISMS](https://github.com/Hack23/ISMS-PUBLIC).
`;
}
Policy Reference: Secure Development Policy Section 📜
Evidence: CIA ISO 27001 Mapping
✅ Good Pattern: NIST CSF 2.0 Function Mapping
/**
* NIST Cybersecurity Framework 2.0 Implementation
*
* Functions: GOVERN, IDENTIFY, PROTECT, DETECT, RESPOND, RECOVER
*/
const nistCSF2Mapping = {
// GOVERN (GV)
'GV.OC-01': {
function: 'GOVERN',
category: 'Organizational Context',
subcategory: 'Organizational mission, objectives, and activities are understood',
implementation: 'ISMS policies define organizational security requirements',
evidence: 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Information_Security_Policy.md'
},
'GV.RM-01': {
function: 'GOVERN',
category: 'Risk Management',
subcategory: 'Risk management objectives are established',
implementation: 'Threat modeling, risk register, classification framework',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md',
'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Risk_Register.md'
]
},
// IDENTIFY (ID)
'ID.AM-01': {
function: 'IDENTIFY',
category: 'Asset Management',
subcategory: 'Physical devices and systems are inventoried',
implementation: 'SBOM generation, dependency tracking, asset inventory',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/releases',
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/package-lock.json'
]
},
'ID.RA-01': {
function: 'IDENTIFY',
category: 'Risk Assessment',
subcategory: 'Vulnerabilities are identified and documented',
implementation: 'CodeQL scanning, Dependabot, npm audit, OSSF Scorecard',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/security/code-scanning',
'https://securityscorecards.dev/viewer/?uri=github.com/Hack23/European-Parliament-MCP-Server'
]
},
// PROTECT (PR)
'PR.AC-01': {
function: 'PROTECT',
category: 'Access Control',
subcategory: 'Identities and credentials are issued, managed, and verified',
implementation: 'MCP stdio transport (process-level isolation), no network auth needed',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/index.ts'
},
'PR.DS-01': {
function: 'PROTECT',
category: 'Data Security',
subcategory: 'Data-at-rest is protected',
implementation: 'HTTPS for transit, no persistent storage of personal data',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/api/client.ts'
},
// DETECT (DE)
'DE.CM-01': {
function: 'DETECT',
category: 'Continuous Monitoring',
subcategory: 'Networks and network services are monitored',
implementation: 'Audit logging, error monitoring, GDPR access logs',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/audit.ts'
},
// RESPOND (RS)
'RS.AN-01': {
function: 'RESPOND',
category: 'Analysis',
subcategory: 'Notifications are investigated',
implementation: 'Vulnerability disclosure process, security incident response',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md'
},
// RECOVER (RC)
'RC.RP-01': {
function: 'RECOVER',
category: 'Recovery Planning',
subcategory: 'Recovery plan is executed',
implementation: 'Incident response procedures, backup and restore capabilities',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md#incident-response'
}
};
Policy Reference: Secure Development Policy Section 📜
Evidence: Black Trigram NIST CSF Mapping
✅ Good Pattern: CIS Controls v8.1 Implementation
/**
* CIS Controls v8.1 Safeguards
* Implementation Groups: IG1 (Basic), IG2 (Foundational), IG3 (Organizational)
*/
const cisControlsMapping = {
// CIS Control 1: Inventory and Control of Enterprise Assets
'1.1': {
control: 'Establish and Maintain Detailed Enterprise Asset Inventory',
safeguard: 'Basic',
ig: 'IG1',
implementation: 'SBOM generation with CycloneDX, dependency tracking',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/releases/latest/download/sbom.json'
},
// CIS Control 2: Inventory and Control of Software Assets
'2.1': {
control: 'Establish and Maintain Software Inventory',
safeguard: 'Basic',
ig: 'IG1',
implementation: 'package.json, package-lock.json, SBOM',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/package.json'
},
'2.3': {
control: 'Address Unauthorized Software',
safeguard: 'Basic',
ig: 'IG1',
implementation: 'License scanning with FOSSA, approved license list enforcement',
evidence: [
'https://app.fossa.com/projects/git%2Bgithub.com%2FHack23%2FEuropean-Parliament-MCP-Server',
'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#approved-licenses'
]
},
// CIS Control 3: Data Protection
'3.1': {
control: 'Establish and Maintain Data Management Process',
safeguard: 'Basic',
ig: 'IG1',
implementation: 'Data classification, GDPR compliance, data minimization',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/gdpr-compliance/SKILL.md'
},
'3.3': {
control: 'Configure Data Access Control Lists',
safeguard: 'Basic',
ig: 'IG1',
implementation: 'Least privilege, process-level isolation via stdio',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/index.ts'
},
// CIS Control 8: Audit Log Management
'8.2': {
control: 'Collect Audit Logs',
safeguard: 'Basic',
ig: 'IG1',
implementation: 'Structured audit logging for all security events',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/audit.ts'
},
'8.5': {
control: 'Collect Detailed Audit Logs',
safeguard: 'Foundational',
ig: 'IG2',
implementation: 'Detailed logs with timestamps, event types, actors, outcomes',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/audit.ts'
},
// CIS Control 16: Application Software Security
'16.1': {
control: 'Establish and Maintain Secure Application Development Process',
safeguard: 'Basic',
ig: 'IG1',
implementation: 'Secure Development Policy, security by design, threat modeling',
evidence: 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md'
},
'16.10': {
control: 'Apply Secure Design Principles in Application Architectures',
safeguard: 'Foundational',
ig: 'IG2',
implementation: 'Defense in depth, fail secure, input validation, least privilege',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/ARCHITECTURE.md',
'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/security-by-design/SKILL.md'
]
}
};
Policy Reference: Secure Development Policy Section 📜
✅ Good Pattern: EU Cyber Resilience Act (CRA) Compliance
/**
* EU Cyber Resilience Act Conformity Assessment
*
* ISMS Policy: Open Source Policy Section 🛡️
* Evidence: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#cra-conformity-assessment-evidence
*/
const craCompliance = {
product: 'European Parliament MCP Server',
classification: 'Important (Class I)', // Based on risk assessment
// Essential Requirements
essentialRequirements: {
security: {
'Art. 10': {
requirement: 'Products with digital elements shall be delivered without known exploitable vulnerabilities',
implementation: 'CodeQL scanning, Dependabot, npm audit, OSSF Scorecard ≥7.0',
evidence: [
'https://github.com/Hack23/European-Parliament-MCP-Server/security/code-scanning',
'https://securityscorecards.dev/viewer/?uri=github.com/Hack23/European-Parliament-MCP-Server'
]
},
'Art. 11': {
requirement: 'Products shall be delivered with a secure by default configuration',
implementation: 'Security by design, threat modeling, input validation mandatory',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md'
}
},
updates: {
'Art. 12': {
requirement: 'Manufacturers shall provide security updates for the expected lifetime',
implementation: 'Dependabot automated updates, 5-year support lifecycle',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md#supported-versions'
}
},
documentation: {
'Art. 13': {
requirement: 'Technical documentation shall be maintained for 10 years',
implementation: 'SECURITY_ARCHITECTURE.md, THREAT_MODEL.md, compliance mappings maintained in git',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server'
}
},
incidentReporting: {
'Art. 14': {
requirement: 'Actively exploited vulnerabilities shall be reported within 24 hours',
implementation: 'Vulnerability disclosure process, CSIRT coordination',
evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md#reporting-a-vulnerability'
}
}
},
// Conformity Assessment
conformityAssessment: {
type: 'Module A (Internal Control)', // For Class I products
ceMarking: false, // Not required for open source tools
declarationOfConformity: true,
technicalDocumentation: {
description: 'European Parliament MCP Server - Model Context Protocol server for parliamentary data',
architecture: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY_ARCHITECTURE.md',
threatModel: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md',
sbom: 'https://github.com/Hack23/European-Parliament-MCP-Server/releases/latest/download/sbom.json'
}
}
};
Policy Reference: Open Source Policy Section 🛡️
Anti-Patterns
❌ Bad: No Compliance Mapping
// Just code, no compliance documentation
❌ Bad: Outdated Compliance Evidence
Last compliance review: 2022 // More than 1 year old!
Evidence Portfolio
Reference Implementations
Citizen Intelligence Agency (CIA)
Black Trigram Game
CIA Compliance Manager
Policy Documents
ISMS Compliance
This skill enforces:
- CF-001: ISO 27001:2022 control mapping
- CF-002: NIST CSF 2.0 function alignment
- CF-003: CIS Controls v8.1 safeguards
- CF-004: EU CRA conformity assessment
- CF-005: GDPR / NIS2 linkage
Policy References
Primary:
All policies contribute to compliance mapping:
- Secure Development Policy → ISO A.8.25 / A.8.28, NIST PR.PS, CIS 16
- Open Source Policy → ISO A.5.19/23, NIST ID.SC, CIS 15
- Privacy Policy → GDPR Art. 5/6/25/30, ISO A.5.34
- Access Control Policy → ISO A.5.15-18, NIST PR.AA, CIS 6
- Cryptography Policy → ISO A.8.24, NIST PR.DS, CIS 3.11
- Vulnerability Management → ISO A.8.8, NIST ID.RA/DE.CM-8, CIS 7
- Incident Response Plan → ISO A.5.24-28, NIST RS, CIS 17
- Change Management → ISO A.8.32, NIST ID.GV
- Threat Modeling → ISO A.8.27, NIST ID.RA
- Business Continuity Plan → ISO A.5.29-30, NIST RC
- Backup Recovery Policy → ISO A.8.13, NIST PR.IP-4
- AI Policy + OWASP LLM Security Policy → EU AI Act, ISO 42001 (emerging)
- Third Party Management → ISO A.5.19-22, NIST ID.SC
- Segregation of Duties Policy → ISO A.5.3, CIS 6.8
1---2name: compliance-frameworks3description: ISO 27001, NIST CSF 2.0, CIS Controls v8.1, EU CRA compliance mapping, multi-standard alignment per Hack23 ISMS policies4license: MIT5---67# Compliance Frameworks Skill89## Context1011This skill applies when:12- Mapping security controls to compliance frameworks13- Creating compliance documentation14- Conducting compliance audits15- Implementing EU Cyber Resilience Act (CRA) requirements16- Generating compliance evidence portfolios17- Responding to compliance questionnaires18- Preparing for security certifications1920This skill enforces **[Hack23 ISMS policies](https://github.com/Hack23/ISMS-PUBLIC)** for multi-standard compliance alignment.2122## Rules2324### 1. ISO 27001:2022 (Secure Development Policy 📜)25261. **A.5**: Organizational controls (policies, roles)272. **A.8**: Asset management (handling, classification, deletion)283. **A.12**: Operations security (change management, vulnerabilities)294. **A.13**: Communications security (network controls, encryption)305. **A.14**: System acquisition and development (secure SDLC)3132### 2. NIST Cybersecurity Framework 2.0 (Secure Development Policy 📜)33346. **GOVERN**: Risk management, policy, oversight357. **IDENTIFY**: Asset management, risk assessment368. **PROTECT**: Access control, data security, awareness379. **DETECT**: Continuous monitoring, anomaly detection3810. **RESPOND**: Incident analysis, mitigation, communication3911. **RECOVER**: Recovery planning, improvements, communications4041### 3. CIS Controls v8.1 (Secure Development Policy 📜)424312. **IG1 (Implementation Group 1)**: Basic cyber hygiene (8 controls)4413. **IG2 (Implementation Group 2)**: Medium-sized organizations (56 additional controls)4514. **IG3 (Implementation Group 3)**: Large organizations/high security (additional 64 controls)4647### 4. EU Cyber Resilience Act (Open Source Policy 🛡️)484915. **Conformity Assessment**: CE marking for digital products5016. **Security Updates**: Timely vulnerability patching5117. **Risk Management**: Classification-based security requirements5218. **Documentation**: Technical documentation for 10 years5319. **Incident Reporting**: Report actively exploited vulnerabilities5455## Examples5657### ✅ Good Pattern: ISO 27001:2022 Control Mapping5859```typescript60/**61 * ISO 27001:2022 Control Implementation Matrix62 * 63 * ISMS Policy: Compliance Framework Integration64 * Evidence: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md#compliance-framework-integration65 */6667const iso27001Controls = {68 // A.5 Organizational Controls69 'A.5.1': {70 control: 'Policies for information security',71 implementation: 'SECURITY.md, Open_Source_Policy.md, Secure_Development_Policy.md',72 evidence: [73 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md',74 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/Open_Source_Policy.md'75 ],76 status: 'Implemented',77 lastReview: '2026-02-16'78 },79 80 // A.8 Asset Management81 'A.8.3': {82 control: 'Handling of assets',83 implementation: 'Input validation with Zod, data classification per Data_Classification_Policy.md',84 evidence: [85 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/validation/',86 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Data_Classification_Policy.md'87 ],88 status: 'Implemented',89 lastReview: '2026-02-16'90 },91 92 'A.8.10': {93 control: 'Information deletion',94 implementation: 'LRU cache with TTL, GDPR right to erasure support',95 evidence: [96 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/cache.ts',97 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/gdpr-compliance/SKILL.md'98 ],99 status: 'Implemented',100 lastReview: '2026-02-16'101 },102 103 // A.12 Operations Security104 'A.12.1.2': {105 control: 'Change management',106 implementation: 'GitHub PRs, code review, CI/CD pipeline',107 evidence: [108 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/workflows/',109 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/PULL_REQUEST_TEMPLATE.md'110 ],111 status: 'Implemented',112 lastReview: '2026-02-16'113 },114 115 'A.12.6.1': {116 control: 'Management of technical vulnerabilities',117 implementation: 'Dependabot, npm audit, CodeQL, vulnerability remediation SLAs',118 evidence: [119 'https://github.com/Hack23/European-Parliament-MCP-Server/security/dependabot',120 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/workflows/codeql.yml',121 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#vulnerability-management'122 ],123 status: 'Implemented',124 lastReview: '2026-02-16'125 },126 127 // A.13 Communications Security128 'A.13.1.1': {129 control: 'Network controls',130 implementation: 'HTTPS only for EP API, TLS 1.3, no open network ports',131 evidence: [132 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/api/client.ts',133 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY_HEADERS.md'134 ],135 status: 'Implemented',136 lastReview: '2026-02-16'137 },138 139 // A.14 System Acquisition, Development and Maintenance140 'A.14.2.1': {141 control: 'Secure development policy',142 implementation: 'Secure_Development_Policy.md, security by design, threat modeling',143 evidence: [144 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md',145 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md'146 ],147 status: 'Implemented',148 lastReview: '2026-02-16'149 },150 151 'A.14.2.5': {152 control: 'Secure system engineering principles',153 implementation: 'Defense in depth, fail secure, input validation, least privilege',154 evidence: [155 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/ARCHITECTURE.md',156 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/security-by-design/SKILL.md'157 ],158 status: 'Implemented',159 lastReview: '2026-02-16'160 }161};162163// Export for compliance reporting164export function generateISO27001Report(): string {165 const implemented = Object.values(iso27001Controls).filter(c => c.status === 'Implemented').length;166 const total = Object.keys(iso27001Controls).length;167 168 return `169# ISO 27001:2022 Compliance Report170171**Project**: European Parliament MCP Server 172**Date**: ${new Date().toISOString()} 173**Status**: ${implemented}/${total} controls implemented (${Math.round(implemented/total*100)}%)174175## Control Implementation Summary176177${Object.entries(iso27001Controls).map(([id, control]) => `178### ${id}: ${control.control}179180**Implementation**: ${control.implementation} 181**Status**: ${control.status} 182**Last Review**: ${control.lastReview}183184**Evidence**:185${control.evidence.map(e => `- ${e}`).join('\n')}186`).join('\n')}187188## Compliance Statement189190This system implements security controls aligned with ISO 27001:2022 standard, demonstrating commitment to information security management per [Hack23 ISMS](https://github.com/Hack23/ISMS-PUBLIC).191 `;192}193```194195**Policy Reference**: [Secure Development Policy Section 📜](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md#compliance-framework-integration)196197**Evidence**: [CIA ISO 27001 Mapping](https://github.com/Hack23/cia/blob/master/ISO27001_MAPPING.md)198199### ✅ Good Pattern: NIST CSF 2.0 Function Mapping200201```typescript202/**203 * NIST Cybersecurity Framework 2.0 Implementation204 * 205 * Functions: GOVERN, IDENTIFY, PROTECT, DETECT, RESPOND, RECOVER206 */207208const nistCSF2Mapping = {209 // GOVERN (GV)210 'GV.OC-01': {211 function: 'GOVERN',212 category: 'Organizational Context',213 subcategory: 'Organizational mission, objectives, and activities are understood',214 implementation: 'ISMS policies define organizational security requirements',215 evidence: 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Information_Security_Policy.md'216 },217 218 'GV.RM-01': {219 function: 'GOVERN',220 category: 'Risk Management',221 subcategory: 'Risk management objectives are established',222 implementation: 'Threat modeling, risk register, classification framework',223 evidence: [224 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md',225 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Risk_Register.md'226 ]227 },228 229 // IDENTIFY (ID)230 'ID.AM-01': {231 function: 'IDENTIFY',232 category: 'Asset Management',233 subcategory: 'Physical devices and systems are inventoried',234 implementation: 'SBOM generation, dependency tracking, asset inventory',235 evidence: [236 'https://github.com/Hack23/European-Parliament-MCP-Server/releases',237 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/package-lock.json'238 ]239 },240 241 'ID.RA-01': {242 function: 'IDENTIFY',243 category: 'Risk Assessment',244 subcategory: 'Vulnerabilities are identified and documented',245 implementation: 'CodeQL scanning, Dependabot, npm audit, OSSF Scorecard',246 evidence: [247 'https://github.com/Hack23/European-Parliament-MCP-Server/security/code-scanning',248 'https://securityscorecards.dev/viewer/?uri=github.com/Hack23/European-Parliament-MCP-Server'249 ]250 },251 252 // PROTECT (PR)253 'PR.AC-01': {254 function: 'PROTECT',255 category: 'Access Control',256 subcategory: 'Identities and credentials are issued, managed, and verified',257 implementation: 'MCP stdio transport (process-level isolation), no network auth needed',258 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/index.ts'259 },260 261 'PR.DS-01': {262 function: 'PROTECT',263 category: 'Data Security',264 subcategory: 'Data-at-rest is protected',265 implementation: 'HTTPS for transit, no persistent storage of personal data',266 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/api/client.ts'267 },268 269 // DETECT (DE)270 'DE.CM-01': {271 function: 'DETECT',272 category: 'Continuous Monitoring',273 subcategory: 'Networks and network services are monitored',274 implementation: 'Audit logging, error monitoring, GDPR access logs',275 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/audit.ts'276 },277 278 // RESPOND (RS)279 'RS.AN-01': {280 function: 'RESPOND',281 category: 'Analysis',282 subcategory: 'Notifications are investigated',283 implementation: 'Vulnerability disclosure process, security incident response',284 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md'285 },286 287 // RECOVER (RC)288 'RC.RP-01': {289 function: 'RECOVER',290 category: 'Recovery Planning',291 subcategory: 'Recovery plan is executed',292 implementation: 'Incident response procedures, backup and restore capabilities',293 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md#incident-response'294 }295};296```297298**Policy Reference**: [Secure Development Policy Section 📜](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md#compliance-framework-integration)299300**Evidence**: [Black Trigram NIST CSF Mapping](https://github.com/Hack23/blacktrigram/blob/main/NIST_CSF_MAPPING.md)301302### ✅ Good Pattern: CIS Controls v8.1 Implementation303304```typescript305/**306 * CIS Controls v8.1 Safeguards307 * Implementation Groups: IG1 (Basic), IG2 (Foundational), IG3 (Organizational)308 */309310const cisControlsMapping = {311 // CIS Control 1: Inventory and Control of Enterprise Assets312 '1.1': {313 control: 'Establish and Maintain Detailed Enterprise Asset Inventory',314 safeguard: 'Basic',315 ig: 'IG1',316 implementation: 'SBOM generation with CycloneDX, dependency tracking',317 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/releases/latest/download/sbom.json'318 },319 320 // CIS Control 2: Inventory and Control of Software Assets321 '2.1': {322 control: 'Establish and Maintain Software Inventory',323 safeguard: 'Basic',324 ig: 'IG1',325 implementation: 'package.json, package-lock.json, SBOM',326 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/package.json'327 },328 329 '2.3': {330 control: 'Address Unauthorized Software',331 safeguard: 'Basic',332 ig: 'IG1',333 implementation: 'License scanning with FOSSA, approved license list enforcement',334 evidence: [335 'https://app.fossa.com/projects/git%2Bgithub.com%2FHack23%2FEuropean-Parliament-MCP-Server',336 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#approved-licenses'337 ]338 },339 340 // CIS Control 3: Data Protection341 '3.1': {342 control: 'Establish and Maintain Data Management Process',343 safeguard: 'Basic',344 ig: 'IG1',345 implementation: 'Data classification, GDPR compliance, data minimization',346 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/gdpr-compliance/SKILL.md'347 },348 349 '3.3': {350 control: 'Configure Data Access Control Lists',351 safeguard: 'Basic',352 ig: 'IG1',353 implementation: 'Least privilege, process-level isolation via stdio',354 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/index.ts'355 },356 357 // CIS Control 8: Audit Log Management358 '8.2': {359 control: 'Collect Audit Logs',360 safeguard: 'Basic',361 ig: 'IG1',362 implementation: 'Structured audit logging for all security events',363 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/audit.ts'364 },365 366 '8.5': {367 control: 'Collect Detailed Audit Logs',368 safeguard: 'Foundational',369 ig: 'IG2',370 implementation: 'Detailed logs with timestamps, event types, actors, outcomes',371 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/audit.ts'372 },373 374 // CIS Control 16: Application Software Security375 '16.1': {376 control: 'Establish and Maintain Secure Application Development Process',377 safeguard: 'Basic',378 ig: 'IG1',379 implementation: 'Secure Development Policy, security by design, threat modeling',380 evidence: 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md'381 },382 383 '16.10': {384 control: 'Apply Secure Design Principles in Application Architectures',385 safeguard: 'Foundational',386 ig: 'IG2',387 implementation: 'Defense in depth, fail secure, input validation, least privilege',388 evidence: [389 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/ARCHITECTURE.md',390 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/security-by-design/SKILL.md'391 ]392 }393};394```395396**Policy Reference**: [Secure Development Policy Section 📜](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md#compliance-framework-integration)397398### ✅ Good Pattern: EU Cyber Resilience Act (CRA) Compliance399400```typescript401/**402 * EU Cyber Resilience Act Conformity Assessment403 * 404 * ISMS Policy: Open Source Policy Section 🛡️405 * Evidence: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#cra-conformity-assessment-evidence406 */407408const craCompliance = {409 product: 'European Parliament MCP Server',410 classification: 'Important (Class I)', // Based on risk assessment411 412 // Essential Requirements413 essentialRequirements: {414 security: {415 'Art. 10': {416 requirement: 'Products with digital elements shall be delivered without known exploitable vulnerabilities',417 implementation: 'CodeQL scanning, Dependabot, npm audit, OSSF Scorecard ≥7.0',418 evidence: [419 'https://github.com/Hack23/European-Parliament-MCP-Server/security/code-scanning',420 'https://securityscorecards.dev/viewer/?uri=github.com/Hack23/European-Parliament-MCP-Server'421 ]422 },423 'Art. 11': {424 requirement: 'Products shall be delivered with a secure by default configuration',425 implementation: 'Security by design, threat modeling, input validation mandatory',426 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md'427 }428 },429 430 updates: {431 'Art. 12': {432 requirement: 'Manufacturers shall provide security updates for the expected lifetime',433 implementation: 'Dependabot automated updates, 5-year support lifecycle',434 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md#supported-versions'435 }436 },437 438 documentation: {439 'Art. 13': {440 requirement: 'Technical documentation shall be maintained for 10 years',441 implementation: 'SECURITY_ARCHITECTURE.md, THREAT_MODEL.md, compliance mappings maintained in git',442 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server'443 }444 },445 446 incidentReporting: {447 'Art. 14': {448 requirement: 'Actively exploited vulnerabilities shall be reported within 24 hours',449 implementation: 'Vulnerability disclosure process, CSIRT coordination',450 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md#reporting-a-vulnerability'451 }452 }453 },454 455 // Conformity Assessment456 conformityAssessment: {457 type: 'Module A (Internal Control)', // For Class I products458 ceMarking: false, // Not required for open source tools459 declarationOfConformity: true,460 technicalDocumentation: {461 description: 'European Parliament MCP Server - Model Context Protocol server for parliamentary data',462 architecture: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY_ARCHITECTURE.md',463 threatModel: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md',464 sbom: 'https://github.com/Hack23/European-Parliament-MCP-Server/releases/latest/download/sbom.json'465 }466 }467};468```469470**Policy Reference**: [Open Source Policy Section 🛡️](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#cra-conformity-assessment-evidence)471472## Anti-Patterns473474### ❌ Bad: No Compliance Mapping475476```477// Just code, no compliance documentation478```479480### ❌ Bad: Outdated Compliance Evidence481482```483Last compliance review: 2022 // More than 1 year old!484```485486## Evidence Portfolio487488### Reference Implementations4894901. **Citizen Intelligence Agency (CIA)**491 - ISO 27001 Mapping: https://github.com/Hack23/cia/blob/master/ISO27001_MAPPING.md492 - NIST CSF: https://github.com/Hack23/cia/blob/master/NIST_CSF_MAPPING.md493 - CIS Controls: https://github.com/Hack23/cia/blob/master/CIS_CONTROLS_MAPPING.md4944952. **Black Trigram Game**496 - Compliance Dashboard: https://github.com/Hack23/blacktrigram/blob/main/COMPLIANCE.md4974983. **CIA Compliance Manager**499 - Multi-Framework Mapping: https://github.com/Hack23/cia-compliance-manager/blob/main/COMPLIANCE_MAPPING.md500501### Policy Documents502503- **Secure Development Policy**: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md504- **Open Source Policy**: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md505- **ISMS-PUBLIC Repository**: https://github.com/Hack23/ISMS-PUBLIC506507## ISMS Compliance508509This skill enforces:510- **CF-001**: ISO 27001:2022 control mapping511- **CF-002**: NIST CSF 2.0 function alignment512- **CF-003**: CIS Controls v8.1 safeguards513- **CF-004**: EU CRA conformity assessment514- **CF-005**: GDPR / NIS2 linkage515516### Policy References517518**Primary:**519520- [Information Security Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Information_Security_Policy.md) — Top-level frame for multi-standard alignment521- [Hack23 ISMS-PUBLIC](https://github.com/Hack23/ISMS-PUBLIC) — Full policy portfolio522523**All policies contribute to compliance mapping:**524525- [Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md) → ISO A.8.25 / A.8.28, NIST PR.PS, CIS 16526- [Open Source Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md) → ISO A.5.19/23, NIST ID.SC, CIS 15527- [Privacy Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Privacy_Policy.md) → GDPR Art. 5/6/25/30, ISO A.5.34528- [Access Control Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Access_Control_Policy.md) → ISO A.5.15-18, NIST PR.AA, CIS 6529- [Cryptography Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Cryptography_Policy.md) → ISO A.8.24, NIST PR.DS, CIS 3.11530- [Vulnerability Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Vulnerability_Management.md) → ISO A.8.8, NIST ID.RA/DE.CM-8, CIS 7531- [Incident Response Plan](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Incident_Response_Plan.md) → ISO A.5.24-28, NIST RS, CIS 17532- [Change Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Change_Management.md) → ISO A.8.32, NIST ID.GV533- [Threat Modeling](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Threat_Modeling.md) → ISO A.8.27, NIST ID.RA534- [Business Continuity Plan](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Business_Continuity_Plan.md) → ISO A.5.29-30, NIST RC535- [Backup Recovery Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Backup_Recovery_Policy.md) → ISO A.8.13, NIST PR.IP-4536- [AI Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/AI_Policy.md) + [OWASP LLM Security Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/OWASP_LLM_Security_Policy.md) → EU AI Act, ISO 42001 (emerging)537- [Third Party Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Third_Party_Management.md) → ISO A.5.19-22, NIST ID.SC538- [Segregation of Duties Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Segregation_of_Duties_Policy.md) → ISO A.5.3, CIS 6.8