Jeffallan/claude-skills / skills/security-reviewer
security-reviewer
FlaggedIdentifies security vulnerabilities, generates structured audit reports with severity ratings, and provides actionable remediation guidance. Use when conducting security audits, reviewing code for vulnerabilities, or analyzing infrastructure security. Invoke for SAST scans, penetration testing, DevSecOps practices, cloud security reviews, dependency audits, secrets scanning, or compliance checks. Produces vulnerability reports, prioritized recommendations, and compliance checklists.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.9 KB |
| references/infrastructure-security.md | markdown | 5.8 KB |
| references/penetration-testing.md | markdown | 5.8 KB |
| references/report-template.md | markdown | 3.7 KB |
| references/sast-tools.md | markdown | 2.4 KB |
| references/secret-scanning.md | markdown | 2.9 KB |
| references/vulnerability-patterns.md | markdown | 3.8 KB |
references/infrastructure-security.md
View on GitHub# Infrastructure Security
## DevSecOps Integration
### CI/CD Security Pipeline
```yaml
# GitHub Actions - Security scanning
name: Security Pipeline
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: returntocorp/semgrep-action@v1
- uses: gitleaks/gitleaks-action@v2
- uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
severity: 'CRITICAL,HIGH'
```
### Infrastructure as Code Security
```bash
# Terraform/CloudFormation scanning
checkov -d terraform/ --framework terraform
tfsec terraform/
terrascan scan -d terraform/
# Kubernetes manifest scanning
kubesec scan deployment.yaml
```
## Cloud Security Controls
### AWS Security Hardening
```bash
# Enable security services
aws guardduty create-detector --enable
aws securityhub enable-security-hub
aws cloudtrail create-trail --name security-trail --s3-bucket-name logs
# Check S3 bucket security
aws s3api list-buckets --query "Buckets[].Name" | \
xargs -I {} aws s3api get-bucket-acl --bucket {}
# IAM password policy
aws iam update-account-password-policy \
--minimum-password-length 14 \
--require-symbols --require-numbers \
--require-uppercase-characters --require-lowercase-characters
```
### Azure Security
```bash
# Enable Security Center
az security auto-provisioning-setting update --name default --auto-provision on
# Enable disk encryption
az vm encryption enable --resource-group myRG --name myVM --disk-encryption-keyvault myKV
```
### GCP Security
```bash
# Enable Security Command Center
gcloud services enable securitycenter.googleapis.com
# Enable VPC Flow Logs
gcloud compute networks subnets update SUBNET --enable-flow-logs
```
## Container Security
### Secure Dockerfile
```dockerfile
FROM node:18-alpine
RUN addgroup -g 1001 -S nodejs && adduser -S nodejs -u 1001
WORKDIR /app
COPY --chown=nodejs:nodejs package*.json ./
RUN npm ci --only=production
USER nodejs
EXPOSE 3000
HEALTHCHECK --interval=30s CMD node healthcheck.js
CMD ["node", "server.js"]
```
### Kubernetes Security
```yaml
# Pod Security Standards
apiVersion: v1
kind: Pod
metadata:
name: secure-pod
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 2000
seccompProfile:
type: RuntimeDefault
containers:
- name: app
image: myapp:1.0
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: [ALL]
resources:
limits:
memory: "128Mi"
cpu: "500m"
---
# Network Policy - Default deny
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
```
## Compliance Automation
### CIS Benchmark Scanning
```bash
# Docker CIS benchmark
docker run --net host --pid host --cap-add audit_control \
-v /var/lib:/var/lib -v /var/run/docker.sock:/var/run/docker.sock \
docker/docker-bench-security
# Kubernetes CIS benchmark
kube-bench run --targets master,node
# Linux system hardening
lynis audit system --quick
```
### Compliance as Code (InSpec)
```ruby
# controls/baseline.rb
control 'ssh-hardening' do
impact 1.0
title 'SSH Security Configuration'
describe sshd_config do
its('Protocol') { should eq '2' }
its('PermitRootLogin') { should eq 'no' }
its('PasswordAuthentication') { should eq 'no' }
end
end
control 'encryption-at-rest' do
impact 1.0
title 'S3 Encryption Enabled'
describe aws_s3_bucket('my-bucket') do
it { should have_default_encryption_enabled }
end
end
```
## Secrets Management
### HashiCorp Vault
```bash
# Initialize and configure
vault operator init
vault secrets enable -path=secret kv-v2
# Store secrets
vault kv put secret/app/config api_key="<api-key>"
# Dynamic database credentials
vault secrets enable database
vault write database/config/postgresql \
plugin_name=postgresql-database-plugin \
allowed_roles="app" \
connection_url="postgresql://{{username}}:{{password}}@localhost:5432/" \
username="vault" password="<db-password>"
vault write database/roles/app \
db_name=postgresql \
creation_statements="CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}';" \
default_ttl="1h" max_ttl="24h"
```
### Kubernetes Secrets with External Secrets Operator
```yaml
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: vault-backend
spec:
provider:
vault:
server: "https://vault.example.com"
path: "secret"
auth:
kubernetes:
role: "app-role"
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: app-secrets
spec:
refreshInterval: 1h
secretStoreRef:
name: vault-backend
target:
name: app-secrets
data:
- secretKey: api_key
remoteRef:
key: secret/app/config
property: api_key
```
## Security Monitoring
### SIEM Log Shipping (Filebeat)
```yaml
filebeat.inputs:
- type: log
paths:
- /var/log/auth.log
- /var/log/nginx/*.log
fields:
environment: production
output.elasticsearch:
hosts: ["elasticsearch:9200"]
index: "security-logs-%{+yyyy.MM.dd}"
```
## Quick Reference
| Area | Tool | Purpose |
|------|------|---------|
| Cloud Security | Prowler, ScoutSuite | AWS/Azure/GCP audit |
| Container | Trivy, Clair | Image scanning |
| IaC | Checkov, tfsec | Terraform/CloudFormation |
| Secrets | Vault, Sealed Secrets | Secret management |
| Compliance | InSpec, OpenSCAP | CIS benchmarks |
| Monitoring | ELK, Splunk | SIEM |
| Framework | Focus | Key Controls |
|-----------|-------|--------------|
| SOC 2 | Security controls | Access, encryption, monitoring |
| ISO 27001 | ISMS | Policy, risk, audit |
| PCI DSS | Payment security | Network segmentation, encryption |
| HIPAA | Healthcare | Encryption, access logs |
| GDPR | Data privacy | Consent, retention, DLP |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |