| name | spec-security-analysis |
| description | Analyze specifications and implementations to identify applicable security standards and generate compliance traceability documentation. |
Security Compliance Analysis
Analyze a component's specification and implementation to generate comprehensive security compliance traceability. Apply ALL security standards for maximum coverage - overlapping controls strengthen rather than conflict.
Mandatory Standards
Apply ALL of these standards to EVERY analysis (scope varies by component function):
| Standard | Version | Scope |
|---|
| AICPA SOC 2 | 2017 TSC | Trust Services Criteria |
| ISO/IEC 27001 | 2022 | Annex A Controls |
| NIST SP 800-53 | Rev 5.2.0 | Security & Privacy Controls |
| OWASP ASVS | 5.0.0 | Application Security Verification |
| EU GDPR | 2016/679 | Data Protection Articles |
Process
-
Gather Context
- Read
spec/spec.md (if exists)
- Scan implementation for security-relevant patterns (auth, data, API, logging)
- Identify component type and function
-
Identify Applicable Controls
- Read references/standards-index.md for standard selection
- Select relevant chapters from each standard's index:
- Use index decision guides to choose specific chapters to investigate
- Reference component-type-mapping.md for scope guidance
- [REQUIRED] Verify identified controls against official FREE sources:
- Local references are summaries; use web search for specific control details
-
Map Controls to Requirements
- Link each applicable control to existing FR/NFR/StR requirements
- Identify gaps where controls lack requirement coverage
- Document requirement-to-control bidirectional traceability
-
Define Scope Boundaries
- Identify controls outside component scope
- Assign responsible component for out-of-scope controls
- Document explicitly what is NOT covered and why
-
Generate Output
Output Sections
- 19.1 Targeted Standards: All 5 mandatory standards with version and scope
- 19.2 Control Mapping: Control ID → Standard → Name → Component Requirement
- 19.3 GDPR Compliance: Specific GDPR article coverage
- 19.4 Audit Support Controls: Cross-standard audit and logging controls
- 19.5 Out of Scope: Controls outside component boundary with responsible component
Rules
- Apply ALL standards - comprehensive coverage trumps minimal compliance
- Every control mapping MUST reference specific FR/NFR/StR identifiers
- Overlapping controls from multiple standards reinforce coverage
- Out-of-scope controls MUST identify the responsible component
- Gap identification is required - missing control coverage is a finding
References