awesome-claude-code-security-compliance-suite

Security & compliance skill suite providing OWASP scanning, CVE detection, GDPR/SOC2 audits, threat modeling, and incident response workflows for AI coding agents

Skill file

Preview skill file↓↑
---
name: awesome-claude-code-security-compliance-suite
description: Security & compliance skill suite providing OWASP scanning, CVE detection, GDPR/SOC2 audits, threat modeling, and incident response workflows for AI coding agents
triggers:
  - scan this code for OWASP vulnerabilities
  - check dependencies for CVEs and security issues
  - audit this application for GDPR compliance
  - generate a threat model for this architecture
  - create a SOC2 readiness assessment
  - detect secrets and credentials in the codebase
  - perform an IAM least privilege audit
  - generate a security incident response playbook
---

# πŸ”’ Security & Compliance Skills Suite

> Skill by [ara.so](https://ara.so) β€” Security Skills collection.

A comprehensive security and compliance skill suite derived from hesreallyhim/awesome-claude-code, providing specialized commands and workflows for security audits, vulnerability management, GDPR/SOC2/ISO27001 compliance, and incident response.

## What This Project Does

This skill suite provides **10 specialized security commands** and **5 multi-step compliance workflows** with structured output UI for:

- **Vulnerability Scanning**: OWASP Top-10 analysis, dependency CVE detection
- **Compliance Auditing**: GDPR, SOC2, ISO27001 gap analysis
- **Security Operations**: Threat modeling, penetration testing, IAM audits
- **Incident Response**: Breach response playbooks and investigation workflows
- **Policy Generation**: Privacy policies, security documentation

All commands use consistent structured output with progress tracking, findings tables, and prioritized action plans.

## Installation

### Quick Install (Local Skills Directory)

```bash
# Create Claude skills directory if it doesn't exist
mkdir -p ~/.claude/skills

# Clone the skill suite
git clone https://github.com/sparkfinderoven/r01-hesreallyhim-awesome-claude-code-security.git \
  ~/.claude/skills/awesome-claude-code-security

# Activate in Claude Code session
# In your IDE with Claude Code, run:
/read ~/.claude/skills/awesome-claude-code-security/SKILL.md
```

### Manual Installation

```bash
# Clone the repository
git clone https://github.com/sparkfinderoven/r01-hesreallyhim-awesome-claude-code-security.git

# Navigate to project directory
cd r01-hesreallyhim-awesome-claude-code-security

# Read the skill documentation
cat SKILL.md
```

### Verification

Verify installation by checking available commands:

```bash
# List all security commands
ls -la ~/.claude/skills/awesome-claude-code-security/

# Expected output:
# - SKILL.md (this file)
# - README.md (documentation)
# - commands/ (individual command definitions)
# - workflows/ (multi-step workflow definitions)
```

## Core Commands

### 1. OWASP Top-10 Security Scan

Scans code for OWASP Top-10 vulnerabilities with CVSS scores and remediation guidance.

```bash
/owasp-scan <target_directory>

# Options
/owasp-scan src/ --format json
/owasp-scan . --severity critical,high
/owasp-scan api/ --output report.md
```

**Example Output Structure:**

```
╔══════════════════════════════════════════════════╗
β•‘  OWASP Security Scan β€” ./src/api                 β•‘
╠══════════════════════════════════════════════════╣
β•‘  Files scanned       βœ“   47                      β•‘
β•‘  OWASP checks        βœ“   14                      β•‘
β•‘  Findings            βœ—   8 issues                β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

FINDINGS (severity: desc)
β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Sev  β”‚ Vulnerability                β”‚ CVSS     β”‚ File         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ”΄  β”‚ SQL Injection                β”‚  9.8     β”‚ users.js:42  β”‚
β”‚  πŸ”΄  β”‚ JWT None Algorithm           β”‚  9.1     β”‚ auth.js:18   β”‚
β”‚  🟠  β”‚ CORS Misconfiguration        β”‚  6.5     β”‚ server.js:12 β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

REMEDIATION
β€’ SQL Injection: Use parameterized queries or ORM
β€’ JWT None: Validate algorithm in token verification
β€’ CORS: Restrict origins to known domains
```

### 2. Dependency CVE Scanner

Scans project dependencies for known CVEs with exploitability scores.

```bash
/dep-cve

# Options
/dep-cve --scope production
/dep-cve --output json > cve-report.json
/dep-cve --min-cvss 7.0
/dep-cve --show-paths
```

**Example for Node.js project:**

```bash
# Scans package.json and package-lock.json
/dep-cve --scope full

# Output includes:
# - CVE IDs with CVSS scores
# - Affected package versions
# - Upgrade paths
# - Exploitability assessment
```

**Expected Output:**

```
╔══════════════════════════════════════════════════╗
β•‘  CVE Dependency Scan                             β•‘
╠══════════════════════════════════════════════════╣
β•‘  Dependencies checked    βœ“   234                 β•‘
β•‘  CVEs found              βœ—   12                  β•‘
β•‘  Critical                βœ—   3                   β•‘
β•‘  High                    ⚠   5                   β•‘
β•‘  Medium                  ⚠   4                   β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Package     β”‚ CVE      β”‚ CVSS        β”‚ Installed    β”‚ Fixed In    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ lodash      β”‚ CVE-2021 β”‚ 9.8 πŸ”΄      β”‚ 4.17.15      β”‚ 4.17.21     β”‚
β”‚ axios       β”‚ CVE-2022 β”‚ 8.1 πŸ”΄      β”‚ 0.21.0       β”‚ 0.21.4      β”‚
β”‚ express     β”‚ CVE-2022 β”‚ 7.5 🟠      β”‚ 4.17.1       β”‚ 4.18.2      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

UPGRADE COMMANDS
npm install lodash@4.17.21
npm install axios@0.21.4
npm install express@4.18.2
```

### 3. GDPR Compliance Audit

Maps data flows, identifies consent gaps, and generates DPA checklist.

```bash
/gdpr-audit <application_path>

# Options
/gdpr-audit . --data-map
/gdpr-audit src/ --consent-analysis
/gdpr-audit . --full-report --output gdpr-audit.pdf
```

**Example Analysis:**

```
╔══════════════════════════════════════════════════╗
β•‘  GDPR Compliance Audit                           β•‘
╠══════════════════════════════════════════════════╣
β•‘  Data flows mapped       βœ“   24                  β•‘
β•‘  Personal data types     βœ“   8                   β•‘
β•‘  Consent gaps            βœ—   5                   β•‘
β•‘  DPA requirements        ⚠   12/15 met           β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

DATA FLOW MAP
User Registration β†’ Database (PII: email, name, phone)
  ↳ Consent: βœ— Missing explicit opt-in
  ↳ Retention: ⚠ No deletion policy defined
  ↳ Encryption: βœ“ AES-256 at rest

Analytics Pipeline β†’ Third-party (IP address, user agent)
  ↳ Consent: βœ— No cookie banner
  ✳ DPA: ⚠ No Data Processing Agreement on file

COMPLIANCE GAPS
πŸ”΄ Critical:
  β€’ No cookie consent mechanism implemented
  β€’ Missing data retention policies in privacy policy
  β€’ No user data deletion endpoint

🟠 High:
  β€’ DPA missing for analytics provider
  β€’ DSAR (data subject access request) workflow undefined
```

### 4. SOC2 Readiness Assessment

Performs gap analysis across all 5 Trust Service Criteria.

```bash
/soc2-readiness

# Options
/soc2-readiness --criteria security,availability
/soc2-readiness --type type2
/soc2-readiness --output xlsx
```

**Example Output:**

```
╔══════════════════════════════════════════════════╗
β•‘  SOC 2 Type II Readiness Assessment              β•‘
╠══════════════════════════════════════════════════╣
β•‘  Security                ⚠   65% ready           β•‘
β•‘  Availability            βœ“   90% ready           β•‘
β•‘  Confidentiality         βœ—   45% ready           β•‘
β•‘  Processing Integrity    ⚠   70% ready           β•‘
β•‘  Privacy                 βœ—   50% ready           β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

SECURITY GAPS
βœ— CC6.1: No background checks policy
βœ— CC6.6: Missing logical access reviews (quarterly)
⚠ CC7.2: Incomplete system monitoring

AVAILABILITY GAPS
⚠ A1.2: RTO/RPO not documented in DR plan

REMEDIATION TIMELINE
Quick Wins (1-2 weeks):
  β€’ Document RTO/RPO targets
  β€’ Implement access review schedule

Medium-term (1-3 months):
  β€’ Establish background check policy
  β€’ Deploy SIEM for continuous monitoring

Strategic (3-6 months):
  β€’ Conduct third-party penetration test
  β€’ Implement data classification framework
```

### 5. Threat Modeling (STRIDE)

Generates STRIDE threat model for architecture diagrams.

```bash
/threat-model <architecture_file>

# Options
/threat-model architecture.png --framework stride
/threat-model system-design.md --risk-matrix
/threat-model . --auto-discover
```

**Example for Web Application:**

```
╔══════════════════════════════════════════════════╗
β•‘  STRIDE Threat Model                             β•‘
╠══════════════════════════════════════════════════╣
β•‘  Components analyzed     βœ“   8                   β•‘
β•‘  Data flows              βœ“   12                  β•‘
β•‘  Threats identified      βœ—   18                  β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

ARCHITECTURE COMPONENTS
β€’ Web Application (React SPA)
β€’ API Gateway (nginx)
β€’ Backend API (Node.js/Express)
β€’ Database (PostgreSQL)
β€’ Auth Service (OAuth2)
β€’ External Payment Gateway

THREAT ANALYSIS (STRIDE)

[S]poofing
  πŸ”΄ API Gateway: No mutual TLS for backend communication
     Impact: High | Likelihood: Medium
     Mitigation: Implement mTLS between gateway and API

[T]ampering
  🟠 Database: SQL injection possible via user input
     Impact: Critical | Likelihood: Low
     Mitigation: Use parameterized queries

[R]epudiation
  🟑 API: Insufficient audit logging for sensitive operations
     Impact: Medium | Likelihood: Medium
     Mitigation: Implement comprehensive audit trail

[I]nformation Disclosure
  πŸ”΄ Payment Flow: PCI data logged in application logs
     Impact: Critical | Likelihood: Medium
     Mitigation: Implement PCI-compliant logging filters

[D]enial of Service
  🟠 API: No rate limiting on public endpoints
     Impact: High | Likelihood: High
     Mitigation: Implement rate limiting middleware

[E]levation of Privilege
  πŸ”΄ Auth: JWT lacks role claims validation
     Impact: Critical | Likelihood: Medium
     Mitigation: Add RBAC middleware with role enforcement

RISK MATRIX
        Impact β†’
Likelihood  β”‚  Low    Medium   High    Critical
───────────┼───────────────────────────────────
High        β”‚                   DoS
Medium      β”‚          Repud.   Spoof   InfoDisc, EoP
Low         β”‚                   Tamper
```

### 6. Penetration Test Report Generator

Structures penetration test findings with executive summary and remediation.

```bash
/pentest-report <findings_file>

# Options
/pentest-report findings.json --template executive
/pentest-report scan-results/ --format pdf
/pentest-report . --cvss-threshold 7.0
```

**Example Report Structure:**

```
╔══════════════════════════════════════════════════╗
β•‘  Penetration Test Report                         β•‘
β•‘  Target: api.example.com                         β•‘
β•‘  Date: 2024-01-15                                β•‘
╠══════════════════════════════════════════════════╣
β•‘  Critical findings       βœ—   4                   β•‘
β•‘  High findings           βœ—   7                   β•‘
β•‘  Medium findings         ⚠   12                  β•‘
β•‘  Low/Info                βœ“   8                   β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

EXECUTIVE SUMMARY
The penetration test identified 31 findings across the web application
and API infrastructure. 4 critical vulnerabilities require immediate
remediation, including SQL injection and authentication bypass issues.

CRITICAL FINDINGS

1. SQL Injection in User Search (CVSS 9.8)
   Location: /api/v1/users/search?q=
   
   Description:
   User-supplied input in the 'q' parameter is directly concatenated
   into SQL query without sanitization.
   
   Proof of Concept:
   GET /api/v1/users/search?q=' OR '1'='1
   
   Remediation:
   β€’ Implement parameterized queries
   β€’ Add input validation and sanitization
   β€’ Deploy WAF rules to detect SQL injection patterns
   
   Timeline: Immediate (< 48 hours)

2. Authentication Bypass via JWT None Algorithm (CVSS 9.1)
   Location: /api/v1/auth/verify
   
   Description:
   JWT library accepts 'none' algorithm, allowing unsigned tokens.
   
   Proof of Concept:
   eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJ1c2VyIjoiYWRtaW4ifQ.
   
   Remediation:
   β€’ Explicitly reject 'none' algorithm in JWT verification
   β€’ Implement algorithm whitelist
   β€’ Add token signature validation tests
   
   Timeline: Immediate (< 48 hours)

REMEDIATION ROADMAP

Immediate (< 48 hours):
  βœ— Fix SQL injection vulnerabilities
  βœ— Patch JWT authentication bypass
  βœ— Disable debug endpoints in production

Short-term (1-2 weeks):
  ⚠ Implement rate limiting
  ⚠ Add CSRF protection
  ⚠ Deploy Web Application Firewall

Medium-term (1 month):
  ⚠ Conduct security code review
  ⚠ Implement security headers (CSP, HSTS)
  ⚠ Add automated security scanning to CI/CD
```

### 7. Secret Detection (Pre-commit Hook)

Configures pre-commit hooks for secret and credential detection.

```bash
/secret-detect init

# Options
/secret-detect scan <directory>
/secret-detect --entropy-threshold 4.5
/secret-detect --add-patterns custom-patterns.json
```

**Example Configuration:**

```bash
# Initialize secret detection
/secret-detect init

# Creates .pre-commit-config.yaml
```

**Generated `.pre-commit-config.yaml`:**

```yaml
repos:
  - repo: https://github.com/Yelp/detect-secrets
    rev: v1.4.0
    hooks:
      - id: detect-secrets
        args:
          - '--baseline'
          - '.secrets.baseline'
          - '--exclude-files'
          - 'package-lock.json|.*\.min\.js'
        
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.18.0
    hooks:
      - id: gitleaks
        args:
          - '--verbose'
          - '--redact'

# Custom entropy scanning
  - repo: local
    hooks:
      - id: high-entropy-strings
        name: Detect high-entropy strings
        entry: python scripts/entropy-scan.py
        language: python
        args: ['--threshold', '4.5']
```

**Scan Example:**

```bash
/secret-detect scan src/

# Output:
╔══════════════════════════════════════════════════╗
β•‘  Secret Detection Scan                           β•‘
╠══════════════════════════════════════════════════╣
β•‘  Files scanned           βœ“   156                 β•‘
β•‘  Secrets detected        βœ—   8                   β•‘
β•‘  High entropy strings    ⚠   3                   β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

DETECTED SECRETS
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Type                β”‚ File             β”‚ Line            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ AWS Access Key      β”‚ config.js        β”‚ 12              β”‚
β”‚ Private Key         β”‚ certs/dev.key    β”‚ 1               β”‚
β”‚ API Key (Generic)   β”‚ api-client.js    β”‚ 45              β”‚
β”‚ High Entropy String β”‚ utils.js         β”‚ 89              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

REMEDIATION
β€’ Move secrets to environment variables
β€’ Add affected files to .gitignore
β€’ Rotate exposed credentials immediately
β€’ Review git history with: git log -p <file>
```

### 8. IAM Least Privilege Audit

Audits IAM roles for over-permissions, stale access, and MFA gaps.

```bash
/iam-audit

# Options
/iam-audit --provider aws
/iam-audit --check-mfa
/iam-audit --stale-days 90
/iam-audit --output csv
```

**Example AWS IAM Audit:**

```
╔══════════════════════════════════════════════════╗
β•‘  IAM Least Privilege Audit (AWS)                 β•‘
╠══════════════════════════════════════════════════╣
β•‘  Users analyzed          βœ“   24                  β•‘
β•‘  Roles analyzed          βœ“   18                  β•‘
β•‘  Over-permissioned       βœ—   7                   β•‘
β•‘  Stale access (90d)      βœ—   5                   β•‘
β•‘  Missing MFA             βœ—   3                   β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

OVER-PERMISSIONED ROLES
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Role/User        β”‚ Issue           β”‚ Last Used        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ DevOps-Role      β”‚ Admin policy    β”‚ 2 days ago       β”‚
β”‚ DataScience-Role β”‚ S3 Full Access  β”‚ 15 days ago      β”‚
β”‚ CI-Pipeline      β”‚ IAM permissions β”‚ 1 day ago        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

RECOMMENDATIONS

DevOps-Role:
  Current: AdministratorAccess
  Recommended: Custom policy with specific permissions
  Unused services: RDS, Lambda, DynamoDB
  
  Suggested Policy:
  {
    "Version": "2012-10-17",
    "Statement": [
      {
        "Effect": "Allow",
        "Action": [
          "ec2:*",
          "s3:GetObject",
          "s3:PutObject",
          "cloudwatch:PutMetricData"
        ],
        "Resource": "*"
      }
    ]
  }

STALE ACCESS (>90 days)
β€’ jenkins-user (145 days) - Consider deactivating
β€’ legacy-integration (234 days) - Remove
β€’ contractor-temp (98 days) - Review and remove

MISSING MFA
πŸ”΄ admin-user (console access)
πŸ”΄ ops-team-lead (console access)
⚠ backup-operator (API only)

ACTION PLAN
Immediate:
  βœ— Enable MFA for admin-user and ops-team-lead
  βœ— Deactivate access for legacy-integration

Short-term:
  ⚠ Replace AdministratorAccess with scoped policies
  ⚠ Implement 90-day access review process
  ⚠ Add MFA enforcement policy
```

### 9. Security Incident Playbook

Generates security incident response playbook following NIST framework.

```bash
/incident-playbook <incident_type>

# Options
/incident-playbook data-breach
/incident-playbook ransomware
/incident-playbook ddos-attack
/incident-playbook --format pdf
```

**Example Playbook:**

```
╔══════════════════════════════════════════════════╗
β•‘  Security Incident Playbook: Data Breach         β•‘
╠══════════════════════════════════════════════════╣
β•‘  Framework: NIST SP 800-61                       β•‘
β•‘  Phases: 5                                       β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

PHASE 1: DETECTION & TRIAGE (0-1 hour)

Immediate Actions:
  ☐ Confirm incident severity and scope
  ☐ Notify Security Team Lead
  ☐ Activate incident response team
  ☐ Begin incident log (time, actions, findings)
  
Detection Checklist:
  ☐ Review SIEM alerts and logs
  ☐ Check data exfiltration indicators
  ☐ Identify compromised systems/accounts
  ☐ Determine data types affected

Key Questions:
  β€’ What data was accessed/exfiltrated?
  β€’ How many records affected?
  β€’ When did the breach occur?
  β€’ Is the breach ongoing?

PHASE 2: CONTAINMENT (1-4 hours)

Short-term Containment:
  ☐ Isolate affected systems from network
  ☐ Disable compromised user accounts
  ☐ Block malicious IP addresses at firewall
  ☐ Reset credentials for affected systems
  ☐ Enable enhanced monitoring

Long-term Containment:
  ☐ Apply security patches
  ☐ Implement additional access controls
  ☐ Deploy IDS/IPS rules
  ☐ Segment network if not already done

Evidence Preservation:
  ☐ Take disk/memory snapshots
  ☐ Preserve logs (application, system, network)
  ☐ Document all containment actions
  ☐ Chain of custody for forensic evidence

PHASE 3: ERADICATION (4-24 hours)

  ☐ Remove malware/backdoors from affected systems
  ☐ Close vulnerability that enabled breach
  ☐ Verify no persistence mechanisms remain
  ☐ Conduct full system security scan
  ☐ Review and update security configurations

Root Cause Analysis:
  β€’ Entry point identification
  β€’ Attack vector analysis
  β€’ Timeline reconstruction
  β€’ Identify control failures

PHASE 4: RECOVERY (1-7 days)

  ☐ Restore systems from clean backups
  ☐ Verify system integrity before reconnection
  ☐ Gradually restore services (least critical first)
  ☐ Enhanced monitoring for 30 days
  ☐ User access verification

Validation:
  ☐ Penetration testing of restored systems
  ☐ Vulnerability scanning
  ☐ Security control verification

PHASE 5: POST-INCIDENT (7-30 days)

Lessons Learned Meeting (within 48 hours):
  β€’ What happened?
  β€’ What was done well?
  β€’ What could be improved?
  β€’ What will we do differently?

Deliverables:
  ☐ Incident report (technical)
  ☐ Executive summary
  ☐ Timeline of events
  ☐ Financial impact assessment
  ☐ Regulatory notification (if required)

Regulatory Obligations:
  β€’ GDPR: 72-hour notification to supervisory authority
  β€’ CCPA: Notification without unreasonable delay
  β€’ HIPAA: 60-day notification to affected individuals
  β€’ State breach notification laws (check jurisdictions)

Security Improvements:
  ☐ Update incident response plan
  ☐ Implement identified security controls
  ☐ Conduct security awareness training
  ☐ Schedule follow-up security assessment

CONTACTS

Security Team:
  β€’ Security Lead: ENV:SECURITY_LEAD_CONTACT
  β€’ On-Call SIEM: ENV:SIEM_ONCALL
  β€’ Forensics Team: ENV:FORENSICS_CONTACT

External:
  β€’ Legal Counsel: ENV:LEGAL_CONTACT
  β€’ PR/Communications: ENV:PR_CONTACT
  β€’ Cyber Insurance: ENV:INSURANCE_CONTACT
  β€’ Law Enforcement (FBI IC3): https://www.ic3.gov

Regulatory:
  β€’ GDPR DPA: ENV:DPA_CONTACT
  β€’ State Attorney General: ENV:STATE_AG_CONTACT
```

### 10. Privacy Policy Generator

Generates GDPR/CCPA-compliant privacy policy from data inventory.

```bash
/privacy-policy <data_inventory_file>

# Options
/privacy-policy inventory.json --jurisdiction eu,us,uk
/privacy-policy . --auto-discover
/privacy-policy data-map.yaml --format html
```

**Example Data Inventory:**

```json
{
  "personal_data": [
    {
      "type": "contact",
      "fields": ["email", "name", "phone"],
      "purpose": "user_account",
      "retention": "account_lifetime",
      "third_parties": []
    },
    {
      "type": "analytics",
      "fields": ["ip_address", "user_agent", "session_id"],
      "purpose": "service_improvement",
      "retention": "90_days",
      "third_parties": ["Google Analytics"]
    }
  ]
}
```

**Generated Policy Excerpt:**

```markdown
# Privacy Policy

Last Updated: 2024-01-15

## 1. Information We Collect

### Contact Information
We collect your email address, name, and phone number when you:
- Create an account
- Contact customer support
- Subscribe to our newsletter

**Legal Basis (GDPR):** Contract performance, legitimate interest
**Retention:** Duration of account plus 30 days

### Analytics Data
We automatically collect:
- IP address
- Browser type and version
- Device information
- Pages visited and time spent

**Legal Basis (GDPR):** Legitimate interest (service improvement)
**Retention:** 90 days

## 2. How We Use Your Information

We use your information to:
- Provide and maintain our services
- Send account-related notifications
- Improve our products and services
- Comply with legal obligations

## 3. Third-Party Service Providers

We share your information with:

**Google Analytics**
- Purpose: Website analytics and usage patterns
- Data shared: IP address, user agent, page views
- Location: United States
- Privacy Policy: https://policies.google.com/privacy
- Data Processing Agreement: In place

## 4. Your Rights (GDPR)

You have the right to:
- **Access:** Request a copy of your personal data
- **Rectification:** Correct inaccurate data
- **Erasure:** Request deletion of your data
- **Restriction:** Limit processing of your data
- **Portability:** Receive your data in machine-readable format
- **Objection:** Object to processing based on legitimate interest
- **Withdraw Consent:** Where processing is based on consent

To exercise these rights, contact: ENV:PRIVACY_CONTACT_EMAIL

## 5. Your Rights (CCPA)

California residents have the right to:
- Know what personal information is collected
- Know whether personal information is sold or disclosed
- Say no to the sale of personal information
- Access your personal information
- Request deletion of personal information
- Equal service and price, even if you exercise your privacy rights

## 6. Data Security

We implement appropriate technical and organizational measures:
- Encryption in transit (TLS 1.3)
- Encryption at rest (AES-256)
- Access controls and authentication
- Regular security assessments
- Employee security training

## 7. International Data Transfers

Your data may be transferred to and processed in:
- United States (Standard Contractual Clauses)
- European Union (GDPR compliant)

We ensure appropriate safeguards are in place for all transfers.

## 8. Children's Privacy

Our services are not directed to individuals under 16. We do not
knowingly collect personal information from children.

## 9. Contact Information

Data Controller: [Company Name]
Email: ENV:PRIVACY_CONTACT_EMAIL
Address: [Company Address]

EU Representative: ENV:EU_REP_CONTACT
UK Representative: ENV:UK_REP_CONTACT

Supervisory Authority: [Relevant DPA]
```

## Multi-Step Workflows

### Workflow 1: Secure SDLC (Shift-Left Security)

End-to-end secure development lifecycle implementation.

```bash
/workflow:secure-sdlc <project_path>

# Options
/workflow:secure-sdlc . --phase all
/workflow:secure-sdlc src/ --skip-dast
```

**Workflow Steps:**

```
╔══════════════════════════════════════════════════╗
β•‘  Secure SDLC Workflow                            β•‘
╠══════════════════════════════════════════════════╣
β•‘  1. Threat Model        ⟳   In Progress          β•‘
β•‘  2. SAST Scan           β–‘   Pending              β•‘
β•‘  3. Dependency Check    β–‘   Pending              β•‘
β•‘  4. DAST Scan           β–‘   Pending              β•‘
β•‘  5. Penetration Test    β–‘   Pending              β•‘
β•‘  6. Security Sign-off   β–‘   Pending              β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

PHASE 1: THREAT MODELING
  Running: /threat-model architecture.md
  [Output from threat model command...]

PHASE 2: STATIC ANALYSIS
  Running: /owasp-scan src/
  [Output from OWASP scan...]

PHASE 3: DEPENDENCY CHECK
  Running: /dep-cve --scope full
  [Output from CVE scan...]

PHASE 4: DYNAMIC TESTING
  Running DAST against staging environment...
  [DAST results...]

PHASE 5: PENETRATION TEST
  Generating penetration test checklist...
  [Pentest scope and requirements...]

PHASE 6: SECURITY SIGN-OFF
  Generating security release checklist...
  
  RELEASE CRITERIA
  ☐ All critical vulnerabilities resolved

Source

Creator's repository Β· aradotso/security-skills

View on GitHub β†—

Security

Security checks in progress
Results will appear here once audits complete
What this skill can do
Reads your filesConnects to the internetRuns code on your machine
Checked by 3 independent security firms
Does it try to trick the AI?Not yet checkedPending Β· Gen Agent Trust Hub
Does it sneak in hidden code?Not yet checkedPending Β· Socket
Does it have known bugs?Not yet checkedPending Β· Snyk