π Security & Compliance Skills Suite
Skill by
ara.so β Security Skills collection.
This skill suite provides AI coding agents with specialized commands and workflows for security auditing, vulnerability management, compliance (GDPR/SOC2/ISO27001), and incident response. Derived from hesreallyhim/awesome-claude-code, it offers 10 specialized commands and 5 multi-step workflows with structured output.
What This Project Does
The Security & Compliance Skills Suite equips AI agents with:
- OWASP Top-10 vulnerability scanning with CVSS scores
- Dependency CVE detection with upgrade paths
- Compliance auditing (GDPR, SOC2, ISO27001)
- Threat modeling using STRIDE methodology
- IAM security audits for least-privilege assessment
- Secret detection for pre-commit hooks
- Incident response playbooks with structured workflows
- Penetration test reporting with executive summaries
All commands follow a consistent 5-step interaction pattern with visual progress tracking and prioritized action plans.
Installation
Method 1: Clone to Claude Skills Directory
bash
# Clone the repository
git clone https://github.com/sparkfinderoven/r01-hesreallyhim-awesome-claude-code-security.git
# Copy to Claude skills directory
mkdir -p ~/.claude/skills
cp -r r01-hesreallyhim-awesome-claude-code-security ~/.claude/skills/security-compliance-suite/
Method 2: Manual Setup
bash
# Create skill directory
mkdir -p ~/.claude/skills/security-compliance-suite
# Download and extract
cd ~/.claude/skills/security-compliance-suite
# Add skill files manually
Activate in Claude Code
In a Claude Code session:
bash
/read ~/.claude/skills/security-compliance-suite/SKILL.md
Or reference in your project's .claude/config.json:
json
{
"skills": [
"~/.claude/skills/security-compliance-suite"
]
}
Core Commands
/owasp-scan - OWASP Top-10 Vulnerability Scan
Scans code for OWASP Top-10 vulnerabilities with exploit descriptions, CVSS scores, and remediation steps.
Usage:
bash
/owasp-scan <target_path>
/owasp-scan src/api --verbose
/owasp-scan . --format json
Example Output Structure:
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OWASP Scan β src/api/ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββ£
β Injection checks β 23 files β
β Auth checks β 12 files β
β XSS checks β 45 files β
β CSRF checks β 8 files β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
FINDINGS (sort: severity desc)
ββββββββ¬βββββββββββββββββββββββββββββββββββββ¬βββββββ¬βββββββββββ
β Sev β Finding β CVSS β File β
ββββββββΌβββββββββββββββββββββββββββββββββββββΌβββββββΌβββββββββββ€
β π΄ β SQL injection via string concat β 9.8 β db.js:45 β
β π΄ β JWT algorithm confusion β 9.1 β auth.js β
β π β Missing CSRF token validation β 6.5 β form.js β
ββββββββ΄βββββββββββββββββββββββββββββββββββββ΄βββββββ΄βββββββββββ
Code Pattern for SQL Injection Detection:
javascript
// VULNERABLE - String concatenation
const query = "SELECT * FROM users WHERE id = " + userId;
// SECURE - Parameterized query
const query = "SELECT * FROM users WHERE id = ?";
db.execute(query, [userId]);
/dep-cve - Dependency CVE Report
Scans project dependencies for known CVEs with exploitability scores and upgrade paths.
Usage:
bash
/dep-cve
/dep-cve --scope full --output md
/dep-cve --severity high,critical
Example Implementation Pattern:
javascript
// package.json analysis
const auditDependencies = async (packageJsonPath) => {
const pkg = require(packageJsonPath);
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
const vulnerabilities = [];
for (const [name, version] of Object.entries(deps)) {
const cves = await queryNVD(name, version);
vulnerabilities.push(...cves);
}
return vulnerabilities.sort((a, b) => b.cvss - a.cvss);
};
Expected Output:
CVE REPORT β 234 dependencies scanned
βββββββββββββββ¬ββββββββββ¬βββββββ¬βββββββββββββββββββββββββ
β Package β CVE β CVSS β Fix β
βββββββββββββββΌββββββββββΌβββββββΌβββββββββββββββββββββββββ€
β express β CVE-... β 9.8 β Upgrade to 4.18.2+ β
β lodash β CVE-... β 7.4 β Upgrade to 4.17.21 β
β axios β CVE-... β 6.5 β Upgrade to 1.6.0 β
βββββββββββββββ΄ββββββββββ΄βββββββ΄βββββββββββββββββββββββββ
ACTION PLAN:
β‘ Critical: Upgrade express (15 min)
β‘ High: Upgrade lodash (10 min)
β‘ Medium: Review axios usage (30 min)
/gdpr-audit - GDPR Compliance Audit
Maps data flows, identifies consent gaps, and generates DPA checklists.
Usage:
bash
/gdpr-audit
/gdpr-audit --scope full
/gdpr-audit --output report.md
Code Example - Data Flow Detection:
python
# Detect personal data processing
import ast
class GDPRAnalyzer(ast.NodeVisitor):
PII_FIELDS = ['email', 'phone', 'address', 'ssn', 'name']
def __init__(self):
self.data_flows = []
def visit_Assign(self, node):
# Check for PII in assignments
if isinstance(node.value, ast.Call):
if any(pii in ast.dump(node) for pii in self.PII_FIELDS):
self.data_flows.append({
'line': node.lineno,
'type': 'data_collection',
'lawful_basis': 'NEEDS_REVIEW'
})
self.generic_visit(node)
# Usage
with open('user_service.py') as f:
tree = ast.parse(f.read())
analyzer = GDPRAnalyzer()
analyzer.visit(tree)
Audit Checklist Output:
GDPR DATA FLOW MAP
ββββββββββββββββββββ¬βββββββββββββββββ¬βββββββββββββββββββ
β Data Type β Lawful Basis β Retention β
ββββββββββββββββββββΌβββββββββββββββββΌβββββββββββββββββββ€
β Email β β Consent β β 2 years β
β Phone β β NEEDS REVIEW β β Indefinite β
β IP Address β β Legitimate β β 90 days β
ββββββββββββββββββββ΄βββββββββββββββββ΄βββββββββββββββββββ
GAPS FOUND:
β‘ Phone number: No consent mechanism
β‘ IP logging: Review retention policy
β‘ Cookie banner: Missing granular controls
/soc2-readiness - SOC2 Compliance Assessment
Performs gap analysis across all 5 SOC2 Trust Service Criteria.
Usage:
bash
/soc2-readiness
/soc2-readiness --criteria availability,confidentiality
Assessment Framework:
yaml
# SOC2 Control Matrix
trust_service_criteria:
- id: CC6.1
criterion: Security
control: Logical access controls
evidence_required:
- IAM policies
- MFA enforcement
- Access logs
- id: CC7.2
criterion: Availability
control: System monitoring
evidence_required:
- Uptime metrics
- Incident response logs
- Backup verification
Output Format:
SOC2 TYPE II READINESS β 5 criteria assessed
SECURITY (Common Criteria)
CC6.1 Logical Access β MFA not enforced (gap: 23%)
CC6.6 Encryption β TLS 1.3, AES-256
CC6.7 Key Management β Manual key rotation
AVAILABILITY
A1.1 System Monitoring β 24/7 alerting
A1.2 Backup & Recovery β RPO exceeds policy
READINESS SCORE: 67% (needs 85%+ for audit)
PRIORITY ACTIONS:
1. Enforce MFA org-wide (2 weeks)
2. Automate key rotation (1 week)
3. Improve backup RPO (3 days)
/threat-model - STRIDE Threat Modeling
Generates STRIDE threat models for architecture diagrams with risk matrices.
Usage:
bash
/threat-model architecture.png
/threat-model --format mermaid --output threats.md
STRIDE Analysis Pattern:
python
# STRIDE threat categories
STRIDE = {
'Spoofing': ['authentication', 'identity'],
'Tampering': ['data_integrity', 'code_integrity'],
'Repudiation': ['logging', 'audit_trail'],
'Information_Disclosure': ['encryption', 'access_control'],
'Denial_of_Service': ['rate_limiting', 'resource_exhaustion'],
'Elevation_of_Privilege': ['authorization', 'input_validation']
}
def analyze_component(component, data_flows):
threats = []
for category, indicators in STRIDE.items():
if not has_controls(component, indicators):
threats.append({
'category': category,
'severity': calculate_severity(component, data_flows),
'mitigation': suggest_controls(category)
})
return threats
Example Output:
THREAT MODEL β Web API Architecture
COMPONENTS:
[Client] β [API Gateway] β [Auth Service] β [Database]
STRIDE THREATS:
βββββββββββββββββββββββ¬βββββββββββ¬βββββββββββββββββββββββββββ
β Threat β Risk β Mitigation β
βββββββββββββββββββββββΌβββββββββββΌβββββββββββββββββββββββββββ€
β Spoofing: API keys β π΄ High β Implement JWT + refresh β
β Tampering: API req β π Med β Add HMAC signatures β
β Info Disclosure β π΄ High β Encrypt data at rest β
β DoS: Rate limiting β π‘ Low β Add WAF rules β
βββββββββββββββββββββββ΄βββββββββββ΄βββββββββββββββββββββββββββ
RISK MATRIX:
Impact β
Low Med High
L ββββββββ¬βββββββ¬βββββββ
i β π’ β π‘ β π β
k ββββββββΌβββββββΌβββββββ€
e β π‘ β π β π΄ β β API Spoofing
l ββββββββΌβββββββΌβββββββ€
i β π β π΄ β π΄ β
h ββββββββ΄βββββββ΄βββββββ
o
o
d
/secret-detect - Pre-commit Secret Detection
Configures pre-commit hooks to detect secrets with entropy scanning.
Usage:
bash
/secret-detect --install
/secret-detect --scan .
/secret-detect --config .secrets.yaml
Hook Configuration:
yaml
# .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: detect-secrets
name: Detect secrets
entry: detect-secrets-hook
language: system
files: .*
exclude: |
(?x)^(
package-lock.json|
\.secrets\.baseline
)$
# .secrets.yaml
plugins:
- name: ArtifactoryDetector
- name: AWSKeyDetector
- name: Base64HighEntropyString
limit: 4.5
- name: PrivateKeyDetector
filters:
- path: tests/fixtures/
- path: docs/examples/
Entropy Detection Implementation:
python
import math
from collections import Counter
def calculate_entropy(string):
"""Calculate Shannon entropy to detect high-entropy secrets"""
if not string:
return 0
entropy = 0
for count in Counter(string).values():
probability = count / len(string)
entropy -= probability * math.log2(probability)
return entropy
def scan_for_secrets(content, entropy_threshold=4.5):
"""Scan content for potential secrets"""
findings = []
# Regex patterns for known secret types
patterns = {
'AWS_KEY': r'AKIA[0-9A-Z]{16}',
'PRIVATE_KEY': r'-----BEGIN (RSA|EC|OPENSSH) PRIVATE KEY-----',
'JWT': r'eyJ[A-Za-z0-9-_=]+\.eyJ[A-Za-z0-9-_=]+\.[A-Za-z0-9-_.+/=]*',
'GITHUB_TOKEN': r'gh[ps]_[A-Za-z0-9]{36}'
}
for secret_type, pattern in patterns.items():
matches = re.finditer(pattern, content)
for match in matches:
findings.append({
'type': secret_type,
'value': match.group()[:8] + '...',
'line': content[:match.start()].count('\n') + 1
})
# High-entropy string detection
for word in content.split():
if len(word) > 20 and calculate_entropy(word) > entropy_threshold:
findings.append({
'type': 'HIGH_ENTROPY',
'entropy': calculate_entropy(word),
'line': 'N/A'
})
return findings
Example Scan Output:
SECRET DETECTION β Pre-commit hook scan