home / skills / vadimcomanescu / codex-skills / security-compliance
This skill helps design defense-in-depth security, perform lightweight threat modeling, and map mitigations to SOC2/ISO27001/GDPR/HIPAA for compliant releases.
npx playbooks add skill vadimcomanescu/codex-skills --skill security-complianceReview the files below or copy the command above to add this skill to your agents.
---
name: security-compliance
description: "Security and compliance workflow for designing defense-in-depth controls, performing threat modeling and risk assessments, and mapping mitigations to frameworks (SOC2/ISO27001/GDPR/HIPAA). Use when reviewing security posture, shipping sensitive features, preparing compliance evidence, or running a lightweight secrets scan."
---
# Security & Compliance
Build real security, not checkbox security.
## Quick Start
1) Scope the system and data:
- What data types exist (PII/PHI/payment/secrets)? Where is it stored and transmitted?
- Trust boundaries (browser ↔ edge ↔ API ↔ DB ↔ 3rd parties)
2) Threat model (lightweight): list top 5 abuse cases + mitigations.
3) Controls: pick practical controls (authN/authZ, encryption, logging, rate limits, backups, key mgmt).
4) Evidence: document decisions and “how we know it works” (configs, screenshots, logs, tests).
## Output artifacts (default)
- 5-item threat model table (abuse case → impact → mitigation).
- Control checklist mapped to the system’s trust boundaries.
- Evidence list: concrete proofs (configs, logs, tests) with where to find them.
## Optional tool: scan for likely secrets in a repo
```bash
python ~/.codex/skills/security-compliance/scripts/secret_scan.py . --json --output /tmp/secrets.json
```
## References
- Threat model template: `references/threat-model.md`
- Control checklist: `references/control-checklist.md`
This skill provides a practical security and compliance workflow for designing defense-in-depth controls, performing lightweight threat modeling and risk assessments, and mapping mitigations to common frameworks like SOC 2, ISO 27001, GDPR, and HIPAA. It combines clear scoping, a concise threat model, control checklists, and concrete evidence gathering to move teams from checkbox compliance to real security outcomes.
Start by scoping the system and data: identify data types, storage, transmission paths, and trust boundaries. Produce a five-item threat model listing top abuse cases, impacts, and mitigations. Create a controls checklist mapped to trust boundaries and the selected compliance frameworks, and produce an evidence list of configs, logs, tests, and screenshots that demonstrate controls are in place.
How detailed should the threat model be?
Keep it lightweight: focus on the top 5 abuse cases that pose the greatest risk and list clear mitigations and impacts.
What counts as acceptable evidence?
Concrete, verifiable artifacts such as configuration files, access logs, test results, screenshots of settings, and links to automated checks.