shieldx/tests/unit/compliance/ISO27001Mapper.test.ts
Claude 1b5f698f4c
Some checks failed
security-scan / secret-scan (push) Failing after 3s
feat(compliance): add NIS2/ISO27001/SOC2 mappers, Compliance-Robot, EU-AI-Act-Agent; docs(flexoptix-os): consolidation concept
Extends the existing ATLAS/OWASP/EU-AI-Act compliance module with three
new control-framework mappers (NIS2 Art. 21(2), ISO/IEC 27001 Annex A,
SOC 2 Trust Services Criteria), each honestly marking what ShieldX
covers vs. what remains an organizational/legal gap.

ComplianceRobot aggregates all four frameworks into a single prioritized,
owned action plan. EUAIActAgent adds active workflows on top of the
existing static reporter: Art. 6/Annex III risk pre-screening, Annex IV
technical documentation scaffolding, Art. 72 post-market monitoring plan,
and the corrected 2027/2028 enforcement timeline.

Adds docs/flexoptix-os/ — a broader consolidation concept covering the
current state (Magatama/ShieldX, EO Global Pulse), target architecture
for BEO (LibreChat/Presidio-based), a Transceiver Intelligence Platform
architecture recommendation, and RunWork OS externalization strategy,
grounded in adversarially-verified research citations.
2026-07-14 14:46:51 +00:00

47 lines
1.4 KiB
TypeScript

import { describe, it, expect, beforeEach } from 'vitest'
import { ISO27001Mapper } from '../../../src/compliance/ISO27001Mapper.js'
describe('ISO27001Mapper', () => {
let mapper: ISO27001Mapper
beforeEach(() => {
mapper = new ISO27001Mapper()
})
describe('getControl()', () => {
it('should return the logging control as implemented', () => {
const control = mapper.getControl('A.8.15')
expect(control).toBeDefined()
expect(control!.implemented).toBe(true)
expect(control!.theme).toBe('technological')
})
it('should return physical security as a gap', () => {
const control = mapper.getControl('A.7.1')
expect(control).toBeDefined()
expect(control!.implemented).toBe(false)
expect(control!.theme).toBe('physical')
expect(control!.gapNote).toBeTruthy()
})
it('should return undefined for unknown control', () => {
expect(mapper.getControl('A.99.99')).toBeUndefined()
})
})
describe('getCoverage()', () => {
it('should compute covered/total/gaps consistently', () => {
const coverage = mapper.getCoverage()
expect(coverage.covered + coverage.gaps.length).toBe(coverage.total)
})
})
describe('getAllMappings()', () => {
it('should return a frozen array of mappings', () => {
const mappings = mapper.getAllMappings()
expect(Object.isFrozen(mappings)).toBe(true)
expect(mappings.length).toBeGreaterThan(0)
})
})
})