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: MIT5metadata:6 source: https://skillmd.com/skills/hack23/compliance-frameworks7---89# Compliance Frameworks Skill1011## Context1213This skill applies when:14- Mapping security controls to compliance frameworks15- Creating compliance documentation16- Conducting compliance audits17- Implementing EU Cyber Resilience Act (CRA) requirements18- Generating compliance evidence portfolios19- Responding to compliance questionnaires20- Preparing for security certifications2122This skill enforces **[Hack23 ISMS policies](https://github.com/Hack23/ISMS-PUBLIC)** for multi-standard compliance alignment.2324## Rules2526### 1. ISO 27001:2022 (Secure Development Policy 📜)27281. **A.5**: Organizational controls (policies, roles)292. **A.8**: Asset management (handling, classification, deletion)303. **A.12**: Operations security (change management, vulnerabilities)314. **A.13**: Communications security (network controls, encryption)325. **A.14**: System acquisition and development (secure SDLC)3334### 2. NIST Cybersecurity Framework 2.0 (Secure Development Policy 📜)35366. **GOVERN**: Risk management, policy, oversight377. **IDENTIFY**: Asset management, risk assessment388. **PROTECT**: Access control, data security, awareness399. **DETECT**: Continuous monitoring, anomaly detection4010. **RESPOND**: Incident analysis, mitigation, communication4111. **RECOVER**: Recovery planning, improvements, communications4243### 3. CIS Controls v8.1 (Secure Development Policy 📜)444512. **IG1 (Implementation Group 1)**: Basic cyber hygiene (8 controls)4613. **IG2 (Implementation Group 2)**: Medium-sized organizations (56 additional controls)4714. **IG3 (Implementation Group 3)**: Large organizations/high security (additional 64 controls)4849### 4. EU Cyber Resilience Act (Open Source Policy 🛡️)505115. **Conformity Assessment**: CE marking for digital products5216. **Security Updates**: Timely vulnerability patching5317. **Risk Management**: Classification-based security requirements5418. **Documentation**: Technical documentation for 10 years5519. **Incident Reporting**: Report actively exploited vulnerabilities5657## Examples5859### ✅ Good Pattern: ISO 27001:2022 Control Mapping6061```typescript62/**63 * ISO 27001:2022 Control Implementation Matrix64 * 65 * ISMS Policy: Compliance Framework Integration66 * Evidence: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md#compliance-framework-integration67 */6869const iso27001Controls = {70 // A.5 Organizational Controls71 'A.5.1': {72 control: 'Policies for information security',73 implementation: 'SECURITY.md, Open_Source_Policy.md, Secure_Development_Policy.md',74 evidence: [75 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md',76 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/Open_Source_Policy.md'77 ],78 status: 'Implemented',79 lastReview: '2026-02-16'80 },81 82 // A.8 Asset Management83 'A.8.3': {84 control: 'Handling of assets',85 implementation: 'Input validation with Zod, data classification per Data_Classification_Policy.md',86 evidence: [87 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/validation/',88 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Data_Classification_Policy.md'89 ],90 status: 'Implemented',91 lastReview: '2026-02-16'92 },93 94 'A.8.10': {95 control: 'Information deletion',96 implementation: 'LRU cache with TTL, GDPR right to erasure support',97 evidence: [98 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/cache.ts',99 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/gdpr-compliance/SKILL.md'100 ],101 status: 'Implemented',102 lastReview: '2026-02-16'103 },104 105 // A.12 Operations Security106 'A.12.1.2': {107 control: 'Change management',108 implementation: 'GitHub PRs, code review, CI/CD pipeline',109 evidence: [110 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/workflows/',111 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/PULL_REQUEST_TEMPLATE.md'112 ],113 status: 'Implemented',114 lastReview: '2026-02-16'115 },116 117 'A.12.6.1': {118 control: 'Management of technical vulnerabilities',119 implementation: 'Dependabot, npm audit, CodeQL, vulnerability remediation SLAs',120 evidence: [121 'https://github.com/Hack23/European-Parliament-MCP-Server/security/dependabot',122 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/workflows/codeql.yml',123 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#vulnerability-management'124 ],125 status: 'Implemented',126 lastReview: '2026-02-16'127 },128 129 // A.13 Communications Security130 'A.13.1.1': {131 control: 'Network controls',132 implementation: 'HTTPS only for EP API, TLS 1.3, no open network ports',133 evidence: [134 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/api/client.ts',135 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY_HEADERS.md'136 ],137 status: 'Implemented',138 lastReview: '2026-02-16'139 },140 141 // A.14 System Acquisition, Development and Maintenance142 'A.14.2.1': {143 control: 'Secure development policy',144 implementation: 'Secure_Development_Policy.md, security by design, threat modeling',145 evidence: [146 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md',147 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md'148 ],149 status: 'Implemented',150 lastReview: '2026-02-16'151 },152 153 'A.14.2.5': {154 control: 'Secure system engineering principles',155 implementation: 'Defense in depth, fail secure, input validation, least privilege',156 evidence: [157 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/ARCHITECTURE.md',158 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/security-by-design/SKILL.md'159 ],160 status: 'Implemented',161 lastReview: '2026-02-16'162 }163};164165// Export for compliance reporting166export function generateISO27001Report(): string {167 const implemented = Object.values(iso27001Controls).filter(c => c.status === 'Implemented').length;168 const total = Object.keys(iso27001Controls).length;169 170 return `171# ISO 27001:2022 Compliance Report172173**Project**: European Parliament MCP Server 174**Date**: ${new Date().toISOString()} 175**Status**: ${implemented}/${total} controls implemented (${Math.round(implemented/total*100)}%)176177## Control Implementation Summary178179${Object.entries(iso27001Controls).map(([id, control]) => `180### ${id}: ${control.control}181182**Implementation**: ${control.implementation} 183**Status**: ${control.status} 184**Last Review**: ${control.lastReview}185186**Evidence**:187${control.evidence.map(e => `- ${e}`).join('\n')}188`).join('\n')}189190## Compliance Statement191192This 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).193 `;194}195```196197**Policy Reference**: [Secure Development Policy Section 📜](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md#compliance-framework-integration)198199**Evidence**: [CIA ISO 27001 Mapping](https://github.com/Hack23/cia/blob/master/ISO27001_MAPPING.md)200201### ✅ Good Pattern: NIST CSF 2.0 Function Mapping202203```typescript204/**205 * NIST Cybersecurity Framework 2.0 Implementation206 * 207 * Functions: GOVERN, IDENTIFY, PROTECT, DETECT, RESPOND, RECOVER208 */209210const nistCSF2Mapping = {211 // GOVERN (GV)212 'GV.OC-01': {213 function: 'GOVERN',214 category: 'Organizational Context',215 subcategory: 'Organizational mission, objectives, and activities are understood',216 implementation: 'ISMS policies define organizational security requirements',217 evidence: 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Information_Security_Policy.md'218 },219 220 'GV.RM-01': {221 function: 'GOVERN',222 category: 'Risk Management',223 subcategory: 'Risk management objectives are established',224 implementation: 'Threat modeling, risk register, classification framework',225 evidence: [226 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md',227 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Risk_Register.md'228 ]229 },230 231 // IDENTIFY (ID)232 'ID.AM-01': {233 function: 'IDENTIFY',234 category: 'Asset Management',235 subcategory: 'Physical devices and systems are inventoried',236 implementation: 'SBOM generation, dependency tracking, asset inventory',237 evidence: [238 'https://github.com/Hack23/European-Parliament-MCP-Server/releases',239 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/package-lock.json'240 ]241 },242 243 'ID.RA-01': {244 function: 'IDENTIFY',245 category: 'Risk Assessment',246 subcategory: 'Vulnerabilities are identified and documented',247 implementation: 'CodeQL scanning, Dependabot, npm audit, OSSF Scorecard',248 evidence: [249 'https://github.com/Hack23/European-Parliament-MCP-Server/security/code-scanning',250 'https://securityscorecards.dev/viewer/?uri=github.com/Hack23/European-Parliament-MCP-Server'251 ]252 },253 254 // PROTECT (PR)255 'PR.AC-01': {256 function: 'PROTECT',257 category: 'Access Control',258 subcategory: 'Identities and credentials are issued, managed, and verified',259 implementation: 'MCP stdio transport (process-level isolation), no network auth needed',260 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/index.ts'261 },262 263 'PR.DS-01': {264 function: 'PROTECT',265 category: 'Data Security',266 subcategory: 'Data-at-rest is protected',267 implementation: 'HTTPS for transit, no persistent storage of personal data',268 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/api/client.ts'269 },270 271 // DETECT (DE)272 'DE.CM-01': {273 function: 'DETECT',274 category: 'Continuous Monitoring',275 subcategory: 'Networks and network services are monitored',276 implementation: 'Audit logging, error monitoring, GDPR access logs',277 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/audit.ts'278 },279 280 // RESPOND (RS)281 'RS.AN-01': {282 function: 'RESPOND',283 category: 'Analysis',284 subcategory: 'Notifications are investigated',285 implementation: 'Vulnerability disclosure process, security incident response',286 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md'287 },288 289 // RECOVER (RC)290 'RC.RP-01': {291 function: 'RECOVER',292 category: 'Recovery Planning',293 subcategory: 'Recovery plan is executed',294 implementation: 'Incident response procedures, backup and restore capabilities',295 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md#incident-response'296 }297};298```299300**Policy Reference**: [Secure Development Policy Section 📜](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md#compliance-framework-integration)301302**Evidence**: [Black Trigram NIST CSF Mapping](https://github.com/Hack23/blacktrigram/blob/main/NIST_CSF_MAPPING.md)303304### ✅ Good Pattern: CIS Controls v8.1 Implementation305306```typescript307/**308 * CIS Controls v8.1 Safeguards309 * Implementation Groups: IG1 (Basic), IG2 (Foundational), IG3 (Organizational)310 */311312const cisControlsMapping = {313 // CIS Control 1: Inventory and Control of Enterprise Assets314 '1.1': {315 control: 'Establish and Maintain Detailed Enterprise Asset Inventory',316 safeguard: 'Basic',317 ig: 'IG1',318 implementation: 'SBOM generation with CycloneDX, dependency tracking',319 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/releases/latest/download/sbom.json'320 },321 322 // CIS Control 2: Inventory and Control of Software Assets323 '2.1': {324 control: 'Establish and Maintain Software Inventory',325 safeguard: 'Basic',326 ig: 'IG1',327 implementation: 'package.json, package-lock.json, SBOM',328 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/package.json'329 },330 331 '2.3': {332 control: 'Address Unauthorized Software',333 safeguard: 'Basic',334 ig: 'IG1',335 implementation: 'License scanning with FOSSA, approved license list enforcement',336 evidence: [337 'https://app.fossa.com/projects/git%2Bgithub.com%2FHack23%2FEuropean-Parliament-MCP-Server',338 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#approved-licenses'339 ]340 },341 342 // CIS Control 3: Data Protection343 '3.1': {344 control: 'Establish and Maintain Data Management Process',345 safeguard: 'Basic',346 ig: 'IG1',347 implementation: 'Data classification, GDPR compliance, data minimization',348 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/gdpr-compliance/SKILL.md'349 },350 351 '3.3': {352 control: 'Configure Data Access Control Lists',353 safeguard: 'Basic',354 ig: 'IG1',355 implementation: 'Least privilege, process-level isolation via stdio',356 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/index.ts'357 },358 359 // CIS Control 8: Audit Log Management360 '8.2': {361 control: 'Collect Audit Logs',362 safeguard: 'Basic',363 ig: 'IG1',364 implementation: 'Structured audit logging for all security events',365 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/audit.ts'366 },367 368 '8.5': {369 control: 'Collect Detailed Audit Logs',370 safeguard: 'Foundational',371 ig: 'IG2',372 implementation: 'Detailed logs with timestamps, event types, actors, outcomes',373 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/src/audit.ts'374 },375 376 // CIS Control 16: Application Software Security377 '16.1': {378 control: 'Establish and Maintain Secure Application Development Process',379 safeguard: 'Basic',380 ig: 'IG1',381 implementation: 'Secure Development Policy, security by design, threat modeling',382 evidence: 'https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md'383 },384 385 '16.10': {386 control: 'Apply Secure Design Principles in Application Architectures',387 safeguard: 'Foundational',388 ig: 'IG2',389 implementation: 'Defense in depth, fail secure, input validation, least privilege',390 evidence: [391 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/ARCHITECTURE.md',392 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/.github/skills/security-by-design/SKILL.md'393 ]394 }395};396```397398**Policy Reference**: [Secure Development Policy Section 📜](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md#compliance-framework-integration)399400### ✅ Good Pattern: EU Cyber Resilience Act (CRA) Compliance401402```typescript403/**404 * EU Cyber Resilience Act Conformity Assessment405 * 406 * ISMS Policy: Open Source Policy Section 🛡️407 * Evidence: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#cra-conformity-assessment-evidence408 */409410const craCompliance = {411 product: 'European Parliament MCP Server',412 classification: 'Important (Class I)', // Based on risk assessment413 414 // Essential Requirements415 essentialRequirements: {416 security: {417 'Art. 10': {418 requirement: 'Products with digital elements shall be delivered without known exploitable vulnerabilities',419 implementation: 'CodeQL scanning, Dependabot, npm audit, OSSF Scorecard ≥7.0',420 evidence: [421 'https://github.com/Hack23/European-Parliament-MCP-Server/security/code-scanning',422 'https://securityscorecards.dev/viewer/?uri=github.com/Hack23/European-Parliament-MCP-Server'423 ]424 },425 'Art. 11': {426 requirement: 'Products shall be delivered with a secure by default configuration',427 implementation: 'Security by design, threat modeling, input validation mandatory',428 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md'429 }430 },431 432 updates: {433 'Art. 12': {434 requirement: 'Manufacturers shall provide security updates for the expected lifetime',435 implementation: 'Dependabot automated updates, 5-year support lifecycle',436 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md#supported-versions'437 }438 },439 440 documentation: {441 'Art. 13': {442 requirement: 'Technical documentation shall be maintained for 10 years',443 implementation: 'SECURITY_ARCHITECTURE.md, THREAT_MODEL.md, compliance mappings maintained in git',444 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server'445 }446 },447 448 incidentReporting: {449 'Art. 14': {450 requirement: 'Actively exploited vulnerabilities shall be reported within 24 hours',451 implementation: 'Vulnerability disclosure process, CSIRT coordination',452 evidence: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY.md#reporting-a-vulnerability'453 }454 }455 },456 457 // Conformity Assessment458 conformityAssessment: {459 type: 'Module A (Internal Control)', // For Class I products460 ceMarking: false, // Not required for open source tools461 declarationOfConformity: true,462 technicalDocumentation: {463 description: 'European Parliament MCP Server - Model Context Protocol server for parliamentary data',464 architecture: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/SECURITY_ARCHITECTURE.md',465 threatModel: 'https://github.com/Hack23/European-Parliament-MCP-Server/blob/main/THREAT_MODEL.md',466 sbom: 'https://github.com/Hack23/European-Parliament-MCP-Server/releases/latest/download/sbom.json'467 }468 }469};470```471472**Policy Reference**: [Open Source Policy Section 🛡️](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md#cra-conformity-assessment-evidence)473474## Anti-Patterns475476### ❌ Bad: No Compliance Mapping477478```479// Just code, no compliance documentation480```481482### ❌ Bad: Outdated Compliance Evidence483484```485Last compliance review: 2022 // More than 1 year old!486```487488## Evidence Portfolio489490### Reference Implementations4914921. **Citizen Intelligence Agency (CIA)**493 - ISO 27001 Mapping: https://github.com/Hack23/cia/blob/master/ISO27001_MAPPING.md494 - NIST CSF: https://github.com/Hack23/cia/blob/master/NIST_CSF_MAPPING.md495 - CIS Controls: https://github.com/Hack23/cia/blob/master/CIS_CONTROLS_MAPPING.md4964972. **Black Trigram Game**498 - Compliance Dashboard: https://github.com/Hack23/blacktrigram/blob/main/COMPLIANCE.md4995003. **CIA Compliance Manager**501 - Multi-Framework Mapping: https://github.com/Hack23/cia-compliance-manager/blob/main/COMPLIANCE_MAPPING.md502503### Policy Documents504505- **Secure Development Policy**: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md506- **Open Source Policy**: https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md507- **ISMS-PUBLIC Repository**: https://github.com/Hack23/ISMS-PUBLIC508509## ISMS Compliance510511This skill enforces:512- **CF-001**: ISO 27001:2022 control mapping513- **CF-002**: NIST CSF 2.0 function alignment514- **CF-003**: CIS Controls v8.1 safeguards515- **CF-004**: EU CRA conformity assessment516- **CF-005**: GDPR / NIS2 linkage517518### Policy References519520**Primary:**521522- [Information Security Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Information_Security_Policy.md) — Top-level frame for multi-standard alignment523- [Hack23 ISMS-PUBLIC](https://github.com/Hack23/ISMS-PUBLIC) — Full policy portfolio524525**All policies contribute to compliance mapping:**526527- [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 16528- [Open Source Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md) → ISO A.5.19/23, NIST ID.SC, CIS 15529- [Privacy Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Privacy_Policy.md) → GDPR Art. 5/6/25/30, ISO A.5.34530- [Access Control Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Access_Control_Policy.md) → ISO A.5.15-18, NIST PR.AA, CIS 6531- [Cryptography Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Cryptography_Policy.md) → ISO A.8.24, NIST PR.DS, CIS 3.11532- [Vulnerability Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Vulnerability_Management.md) → ISO A.8.8, NIST ID.RA/DE.CM-8, CIS 7533- [Incident Response Plan](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Incident_Response_Plan.md) → ISO A.5.24-28, NIST RS, CIS 17534- [Change Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Change_Management.md) → ISO A.8.32, NIST ID.GV535- [Threat Modeling](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Threat_Modeling.md) → ISO A.8.27, NIST ID.RA536- [Business Continuity Plan](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Business_Continuity_Plan.md) → ISO A.5.29-30, NIST RC537- [Backup Recovery Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Backup_Recovery_Policy.md) → ISO A.8.13, NIST PR.IP-4538- [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)539- [Third Party Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Third_Party_Management.md) → ISO A.5.19-22, NIST ID.SC540- [Segregation of Duties Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Segregation_of_Duties_Policy.md) → ISO A.5.3, CIS 6.8