๐ Security & Compliance Skills Suite
Skill by ara.so โ Security Skills collection.
A comprehensive skill suite for security audits, vulnerability management, compliance frameworks (GDPR, SOC2, ISO27001), and incident response. Derived from hesreallyhim/awesome-claude-code with specialized commands and workflows for security professionals.
What This Project Does
This skill suite provides AI coding agents with 10 specialized security commands and 5 multi-step workflows to:
- Perform OWASP Top-10 vulnerability scans
- Audit dependencies for known CVEs
- Generate GDPR/SOC2/ISO27001 compliance reports
- Create STRIDE threat models
- Detect secrets and credentials in code
- Audit IAM permissions for least-privilege violations
- Orchestrate security incident response
- Design zero-trust architectures
All commands use structured output with progress tracking, severity-sorted findings, and actionable remediation steps.
Installation
Method 1: Direct Clone
# Clone to Claude Code skills directory
mkdir -p ~/.claude/skills
git clone https://github.com/sparkfinderoven/r01-hesreallyhim-awesome-claude-code-security.git \
~/.claude/skills/security-compliance-suite
# Register in Claude Code session
/read ~/.claude/skills/security-compliance-suite/SKILL.md
Method 2: Manual Setup
# Create skill directory
mkdir -p ~/.claude/skills/security-compliance-suite
# Copy skill files
cp -r ./commands ~/.claude/skills/security-compliance-suite/
cp -r ./workflows ~/.claude/skills/security-compliance-suite/
cp ./SKILL.md ~/.claude/skills/security-compliance-suite/
Verification
In a Claude Code session:
/skills list
# Should show: security-compliance-suite
Core Commands
/owasp-scan - OWASP Top-10 Vulnerability Scan
Scans code for OWASP Top-10 vulnerabilities with CVSS scores and remediation guidance.
Usage:
/owasp-scan <target_path> [--format=json|md|html] [--severity=critical|high|medium|low]
Example:
# Scan web API directory
/owasp-scan ./src/api --format=md --severity=high
# Scan specific file
/owasp-scan ./auth/login.py
Output Structure:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ OWASP Top-10 Scan โ ./src/api โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ Files scanned: 47 โ
โ Vulnerabilities: 12 โ
โ Critical: 3 โ
โ High: 5 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
FINDINGS (sorted by CVSS score)
โโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ Sev โ Vulnerability โ CVSS โ Location โ CWE โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ ๐ด โ SQL Injection โ 9.8 โ api.py:45โ CWE-89 โ
โ ๐ด โ Path Traversal โ 9.1 โ file.py:12โ CWE-22 โ
โ ๐ด โ Command Injection โ 8.8 โ exec.py:89โ CWE-78 โ
โโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโ
REMEDIATION (Priority: Critical)
1. [SQL Injection] Use parameterized queries
Code: cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))
2. [Path Traversal] Validate and sanitize file paths
Code: safe_path = os.path.realpath(os.path.join(base_dir, user_input))
/dep-cve - Dependency CVE Scanner
Scans project dependencies for known CVEs with exploitability scores.
Usage:
/dep-cve [--scope=prod|dev|all] [--output=json|md] [--min-cvss=7.0]
Example:
# Scan production dependencies
/dep-cve --scope=prod --min-cvss=7.0
# Full dependency audit
/dep-cve --scope=all --output=json
Supported Ecosystems:
- Python:
requirements.txt,Pipfile,pyproject.toml - JavaScript:
package.json,package-lock.json,yarn.lock - Ruby:
Gemfile.lock - Java:
pom.xml,build.gradle - Go:
go.mod,go.sum - Rust:
Cargo.lock
Output Example:
CVE REPORT โ 234 dependencies scanned
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ Package โ Current โ CVSS โ CVE โ Fixed In โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโค
โ urllib3 โ 1.26.5 โ 9.8 โ CVE-2023-4567 โ 1.26.18 โ
โ django โ 3.2.0 โ 8.1 โ CVE-2023-1234 โ 3.2.19 โ
โ requests โ 2.25.0 โ 7.5 โ CVE-2023-7890 โ 2.31.0 โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโ
UPGRADE PATH
pip install urllib3==1.26.18 django==3.2.19 requests==2.31.0
EXPLOITABILITY
โข urllib3 CVE-2023-4567: Public exploit available, CVSS:3.1/AV:N/AC:L
โข django CVE-2023-1234: PoC available, requires authentication
/gdpr-audit - GDPR Compliance Audit
Maps data flows, identifies consent gaps, and generates DPA checklist.
Usage:
/gdpr-audit <codebase_path> [--output=report|checklist|map]
Example:
# Full GDPR audit with data flow map
/gdpr-audit ./src --output=report
# Generate Article 30 checklist
/gdpr-audit ./src --output=checklist
Analysis Coverage:
- Personal data collection points
- Lawful basis for processing (Article 6)
- Consent mechanisms (Article 7)
- Data subject rights implementation (Articles 15-22)
- Data retention policies (Article 5)
- Third-party data processors (Article 28)
- Data breach notification (Articles 33-34)
Output Example:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GDPR Compliance Audit โ ./src โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ Personal data fields: 23 โ
โ Processing activities: 8 โ
โ Consent mechanisms: 3 โ
โ Compliance gaps: 5 ๐ด โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
DATA FLOW MAP
User Registration โ [email, name, dob] โ PostgreSQL
โโ Lawful basis: Consent (Art. 6.1.a)
โโ Retention: 2 years after last login
โโ โ ๏ธ Missing: explicit consent checkbox
Email Marketing โ [email, preferences] โ Mailchimp (processor)
โโ Lawful basis: Legitimate interest (Art. 6.1.f)
โโ DPA status: โ Agreement signed
โโ ๐ด Missing: opt-out mechanism
COMPLIANCE GAPS
1. ๐ด No data breach notification procedure (Art. 33)
2. ๐ด Data portability not implemented (Art. 20)
3. ๐ Privacy policy outdated (last updated 2021)
4. ๐ก Cookie consent banner missing GDPR language
5. ๐ก Data retention policy not documented
RECOMMENDED ACTIONS
โก Implement breach detection and 72h notification workflow
โก Add /api/data-export endpoint for data portability
โก Update privacy policy with current processing activities
โก Review and update cookie consent implementation
/soc2-readiness - SOC 2 Type II Readiness Assessment
Gap analysis across all 5 Trust Service Criteria.
Usage:
/soc2-readiness [--criteria=CC|A|C|P|PI] [--type=1|2]
Example:
# Full SOC 2 Type II assessment
/soc2-readiness --type=2
# Focus on specific criteria
/soc2-readiness --criteria=CC,A --type=2
Trust Service Criteria:
- CC: Common Criteria (governance, risk assessment, monitoring)
- A: Availability (uptime, incident management)
- C: Confidentiality (data protection, encryption)
- P: Processing Integrity (data accuracy, completeness)
- PI: Privacy (notice, choice, access)
Output Example:
SOC 2 TYPE II READINESS โ 64 controls assessed
โโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโ
โ Criteria โ Total โ Pass โ Fail โ Score โ
โโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโค
โ CC โ 17 โ 12 โ 5 โ 71% โ
โ A โ 9 โ 8 โ 1 โ 89% โ
โ C โ 14 โ 9 โ 5 โ 64% โ
โ P โ 12 โ 11 โ 1 โ 92% โ
โ PI โ 12 โ 7 โ 5 โ 58% โ
โโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโ
CRITICAL GAPS (Type II POC blockers)
๐ด CC6.1: No formal risk assessment process documented
๐ด C1.2: Encryption at rest not enabled for all databases
๐ด PI1.2: Privacy notice not provided at data collection
EVIDENCE REQUIREMENTS
CC2.1: Organizational chart โ โ Available
CC3.1: Security policies โ โ ๏ธ Outdated (2022)
A1.2: Incident response plan โ โ Available
C1.1: Data classification policy โ ๐ด Missing
/threat-model - STRIDE Threat Modeling
Generates STRIDE threat models from architecture diagrams with risk matrices.
Usage:
/threat-model <architecture_file> [--framework=STRIDE|PASTA|OCTAVE] [--output=md|drawio]
Example:
# Generate STRIDE threat model from diagram
/threat-model ./docs/architecture.png --framework=STRIDE
# From text description
/threat-model ./docs/system-design.md
STRIDE Categories:
- Spoofing: Authentication threats
- Tampering: Integrity threats
- Repudiation: Non-repudiation threats
- Information Disclosure: Confidentiality threats
- Denial of Service: Availability threats
- Elevation of Privilege: Authorization threats
Output Example:
THREAT MODEL โ E-Commerce Platform
Architecture: Web App โ API Gateway โ Microservices โ Database
TRUST BOUNDARIES IDENTIFIED
1. Internet โ API Gateway (TLS termination)
2. API Gateway โ Internal Services (VPC)
3. Services โ Database (Encryption in transit)
THREATS (sorted by risk score)
โโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโ
โ Cat โ Threat โ Asset โ Impact โ Risk โ
โโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโผโโโโโโโค
โ S โ JWT signature not validated โ API โ High โ 9.0 โ
โ E โ IDOR in /api/orders/:id โ Orders โ High โ 8.5 โ
โ I โ PII in server logs โ Database โ Medium โ 7.0 โ
โ T โ No integrity checks on S3 โ Files โ Medium โ 6.5 โ
โ D โ No rate limiting on /login โ Auth โ Low โ 5.0 โ
โโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโดโโโโโโโ
MITIGATIONS
1. [S] Validate JWT signature with public key in middleware
2. [E] Implement authorization check: user owns order
3. [I] Sanitize PII from logs or use structured logging
4. [T] Enable S3 object versioning and integrity checks
5. [D] Add rate limiting: 5 attempts per 15 minutes
/secret-detect - Secret Detection
Pre-commit hook configuration with entropy scanning.
Usage:
/secret-detect [--setup] [--scan-history] [--config]
Example:
# Setup pre-commit hook
/secret-detect --setup
# Scan Git history
/secret-detect --scan-history
# Generate configuration
/secret-detect --config
Detection Patterns:
- AWS keys (AKIA, ASIA)
- API keys (high-entropy strings)
- Private keys (BEGIN PRIVATE KEY)
- OAuth tokens
- Database credentials
- JWT secrets
- Slack/Discord webhooks
Setup Output:
# Creates .pre-commit-config.yaml
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.0
hooks:
- id: gitleaks
# Creates .gitleaks.toml
[extend]
useDefault = true
[[rules]]
id = "generic-api-key"
description = "Generic API Key"
regex = '''(?i)(api[_-]?key|apikey)['\"]?\s*[:=]\s*['\"]?([a-z0-9]{32,})'''
entropy = 3.5
# Install hook
pre-commit install
History Scan Example:
SCANNING GIT HISTORY โ 1,247 commits
โฃพ Analyzing commit 892/1247 (71%)
SECRETS FOUND
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโ
โ Type โ File โ Commit โ Branch โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโค
โ AWS Key โ config.py โ a4f3c21 (2023) โ main โ
โ Private Key โ deploy_key.pem โ 7b8e912 (2022) โ prod โ
โ API Token โ .env.example โ c2d4f98 (2024) โ develop โ
โโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโ
REMEDIATION
1. Rotate compromised credentials immediately
2. Remove secrets from history:
git filter-repo --path config.py --invert-paths
3. Add to .gitignore: .env, *.pem, secrets/
/iam-audit - IAM Least-Privilege Audit
Audits IAM roles for over-permissioned access, stale credentials, and MFA gaps.
Usage:
/iam-audit [--provider=aws|azure|gcp] [--scope=users|roles|policies]
Example:
# Full AWS IAM audit
/iam-audit --provider=aws
# Audit specific scope
/iam-audit --provider=aws --scope=roles
Configuration:
# AWS credentials (use environment variables)
export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}"
export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}"
export AWS_REGION="us-east-1"
Output Example:
IAM AUDIT โ AWS Account (123456789012)
Users: 47 | Roles: 23 | Policies: 156
OVER-PERMISSIONED ROLES
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ Role โ Risk Score โ Excessive Permission โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ DevOps-Engineer โ 8.5 ๐ด โ iam:* (admin) โ
โ Lambda-Execution โ 7.2 ๐ โ s3:* (all buckets) โ
โ Analytics-Reader โ 6.1 ๐ โ dynamodb:DeleteTable โ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโ
STALE ACCESS
โข User: john.doe@company.com โ Last activity: 347 days ago
โข Access key AKIA...XYZ โ Created: 2021-03-15 (unused)
MFA GAPS
โข 12 users without MFA (26% of workforce)
โข Root account MFA: โ Enabled
RECOMMENDATIONS
1. Replace DevOps-Engineer wildcard with specific actions
2. Scope Lambda-Execution to specific S3 buckets
3. Deactivate stale access keys older than 90 days
4. Enforce MFA policy with conditional IAM deny
/incident-playbook - Security Incident Response
Orchestrates incident response: triage โ contain โ eradicate โ recover โ lessons.
Usage:
/incident-playbook [--type=breach|ransomware|ddos|insider] [--severity=p0|p1|p2]
Example:
# Start data breach playbook
/incident-playbook --type=breach --severity=p0
# DDoS incident response
/incident-playbook --type=ddos --severity=p1
Incident Types:
- breach: Data breach / unauthorized access
- ransomware: Ransomware infection
- ddos: Distributed denial of service
- insider: Insider threat / privilege abuse
Playbook Flow:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ INCIDENT RESPONSE โ Data Breach (P0) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ Phase: CONTAINMENT โ
โ Elapsed: 00:37:12 โ
โ Next deadline: GDPR notification (71h 22m) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
PHASE 1: TRIAGE โ Complete (00:15:00)
โ Incident confirmed: Unauthorized database access
โ Severity: P0 (>10,000 PII records exposed)
โ Incident commander: Alice Chen
โ War room: Slack #incident-2024-05-11
PHASE 2: CONTAINMENT (In Progress)
โณ [00:37] Isolating affected database server
โ [00:20] Disabled compromised credentials
โ [00:10] Enabled detailed audit logging
โก Pending: Block external database access
โก Pending: Snapshot affected systems
NEXT ACTIONS
1. Execute: aws ec2 create-snapshot --volume-id vol-abc123
2. Execute: aws rds modify-db-instance --publicly-accessible false
3. Notify: Legal team (GDPR 72h clock started)
4. Document: Initial breach assessment in incident tracker
STAKEHOLDERS NOTIFIED
โ Security team
โ Engineering lead
โ CTO
โ ๏ธ Legal team (notification pending)
โก Data Protection Officer
/privacy-policy - Privacy Policy Generator
Generates GDPR/CCPA-compliant privacy policies from data inventory.
Usage:
/privacy-policy [--framework=gdpr|ccpa|pipeda] [--language=en|de|fr]
Example:
# Generate GDPR-compliant policy
/privacy-policy --framework=gdpr --language=en
# Multi-jurisdiction policy
/privacy-policy --framework=gdpr,ccpa
Input (Data Inventory):
# data-inventory.yaml
company:
name: "Acme Corp"
dpo_email: "dpo@acme.com"
personal_data:
- type: "email"
purpose: "Account authentication"
lawful_basis: "Contract (Art. 6.1.b)"
retention: "Account lifetime + 30 days"
- type: "name, address"
purpose: "Order fulfillment"
lawful_basis: "Contract (Art. 6.1.b)"
retention: "7 years (tax law)"
processors:
- name: "AWS"
service: "Database hosting"
dpa_status: "Signed"
Generated Policy Sections:
# Privacy Policy
**Effective Date:** May 11, 2024
**Data Protection Officer:** dpo@acme.com
## 1. Data Controller
Acme Corp is the data controller for personal data processed through this service.
## 2. Personal Data We Collect
### Account Authentication
- **Data:** Email address
- **Legal Basis:** Performance of contract (GDPR Art. 6.1.b)
- **Retention:** Account lifetime + 30 days after deletion
- **Your Rights:** Access, rectification, deletion, portability
### Order Fulfillment
- **Data:** Name, postal address
- **Legal Basis:** Performance of contract (GDPR Art. 6.1.b)
- **Retention:** 7 years (legal obligation - tax records)
- **Your Rights:** Access, rectification (deletion limited by law)
## 3. Data Processors
We use third-party processors who have access to your data:
- **AWS** โ Database hosting (Data Processing Agreement signed)
## 4. Your Rights (GDPR)
You have the right to:
- Access your personal data (Art. 15)
- Rectify inaccurate data (Art. 16)
- Request deletion (Art. 17)
- Restrict processing (Art. 18)
- Data portability (Art. 20)
- Object to processing (Art. 21)
- Lodge a complaint with supervisory authority
## 5. Data Breach Notification
We will notify you within 72 hours of discovering a breach that affects your rights.
## 6. Contact
For privacy inquiries: dpo@acme.com
Multi-Step Workflows
secure-sdlc - Secure Software Development Lifecycle
Shift-left security workflow: threat model โ SAST โ DAST โ pen test โ sign-off.
Usage:
/workflows:secure-sdlc <project_path> [--stage=all|threat|sast|dast|pentest]
Workflow Stages:
1. THREAT MODELING
โโ /threat-model ./docs/architecture.md
โโ Output: Risk matrix with mitigations
2. STATIC ANALYSIS (SAST)
โโ /owasp-scan ./src
โโ /secret-detect --scan-history
โโ Output: Vulnerability report
3. DEPENDENCY AUDIT
โโ /dep-cve --scope=all
โโ Output: CVE report with upgrade path
4. DYNAMIC ANALYSIS (DAST)
โโ Run web app security scanner
โโ Output: Runtime vulnerability findings
5. PENETRATION TEST
โโ /pentest-report ./results
โโ Output: Executive summary + findings
6. SECURITY SIGN-OFF
โโ Risk acceptance form
breach-response - Data Breach Response
Orchestrates breach response: detect โ assess โ notify โ remediate โ post-mortem.
Usage:
/workflows:breach-response [--type=confirmed|suspected]
Workflow:
PHASE 1: DETECTION (0-1 hour)
โก Confirm breach indicator
โก Assign incident commander
โก Start incident log
PHASE 2: ASSESSMENT (1-4 hours)
โก Identify affected systems
โก Estimate data exposure scope
โก Classify data sensitivity
PHASE 3: NOTIFICATION (Within 72h for GDPR)
โก Notify Data Protection Officer
โก Notify supervisory authority (if Art. 33 threshold met)
โก Notify affected individuals (if Art. 34 threshold met)
โก Document notification timeline
PHASE 4: REMEDIATION
โก Close security gap
โก Revoke compromised credentials
โก Deploy security patches
PHASE 5: POST-MORTEM
โก Root cause analysis
โก Timeline reconstruction
โก Preventive measures
compliance-audit - Full Compliance Audit
End-to-end audit: scope โ gap analysis โ evidence collection โ remediation plan.
Usage:
/workflows:compliance-audit [--framework=soc2|iso27001|gdpr]
zero-trust-design - Zero Trust Architecture
Design workflow: identity โ network โ workload โ data layer security.
Usage:
/workflows:zero-trust-design <architecture_file>
Design Layers:
1. IDENTITY LAYER
โโ Multi-factor authentication
โโ Identity federation (SSO)
โโ /iam-audit for least privilege
2. NETWORK LAYER
โโ Micro-segmentation
โโ Software-defined perimeter
โโ Zero-trust network access (ZTNA)
3. WORKLOAD LAYER
โโ Container security
โโ Runtime protection
โโ /owasp-scan for vulnerabilities
4. DATA LAYER
โโ Encryption at rest and in transit
โโ Data classification
โโ /gdpr-audit for data governance
vendor-security - Third-Party Vendor Assessment
Vendor risk assessment: questionnaire โ risk scoring โ decision framework.
Usage:
/workflows:vendor-security <vendor_name>
Assessment Domains:
- Security certifications (SOC 2, ISO 27001)
- Data processing agreements
- Incident response capabilities
- Business continuity plans
- Subprocessor disclosure
Configuration
Global Settings
Create ~/.security-skills/config.yaml:
# Output preferences
output:
format: "markdown" # markdown | json | html
severity_colors: true
progress_bars: true
# CVSS scoring
cvss:
min_reportable: 4.0
critical_threshold: 9.0
high_threshold: 7.0
# Compliance frameworks
compliance:
primary: "gdpr" # gdpr | soc2 | iso27001
data_residency: "eu"
# Notifications
notifications:
slack_webhook: "${SLACK_WEBHOOK_URL}"
email: "security@company.com"
# Cloud providers
cloud:
aws:
profile: "default"
regions: ["us-east-1", "eu-west-1"]
azure:
subscription_id: "${AZURE_SUBSCRIPTION_ID}"
gcp:
project_id: "${GCP_PROJECT_ID}"
Environment Variables
# Cloud provider credentials
export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}"
export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}"
export AZURE_SUBSCRIPTION_ID="${AZURE_SUBSCRIPTION_ID}"
export GCP_PROJECT_ID="${GCP_PROJECT_ID}"
# Notifications
export SLACK_WEBHOOK_URL="${SLACK_WEBHOOK_URL}"
# CVE databases
export NVD_API_KEY="${NVD_API_KEY}" # Optional: faster CVE lookups
# Scanning tools
export GITLEAKS_CONFIG="~/.security-skills/gitleaks.toml"
Common Patterns
Pattern 1: Pre-Deployment Security Gate
# Run before each deployment
/owasp-scan ./src --severity=high
/dep-cve --scope=prod --min-cvss=7.0
/secret-detect
# If any critical findings, block deployment
if [ $? -ne 0 ]; then
echo "โ Security gate failed - deployment blocked"
exit 1
fi
Pattern 2: Continuous Compliance Monitoring
# Weekly compliance check
/gdpr-audit ./src --output=report
/soc2-readiness --type=2
/iam-audit --provider=aws
# Generate compliance dashboard
# Send to stakeholders
Pattern 3: Incident Response Automation
# Triggered by security alert
/incident-playbook --type=breach --severity=p0
# Automatic containment actions
aws ec2 modify-instance-attribute \
--instance-id i-1234567890abcdef0 \
--no-source-dest-check
# Notify stakeholders
curl -X POST "${SLACK_WEBHOOK_URL}" \
-H "Content-Type: application/json" \
-d '{"text": "๐จ P0 Security Incident - War room #incident-active"}'
Pattern 4: Shift-Left Security in CI/CD
# .github/workflows/security.yml
name: Security Checks
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: OWASP Scan
run: /owasp-scan ./src --format=json --output=owasp.json
- name: Dependency CVE Check
run: /dep-cve --scope=all --output=json --output=cve.json
- name: Secret Detection
run: /secret-detect
