From cyhber-deploy
Systematic 5-layer DevSecOps review for deploys, CI/CD, IaC, auth, and secrets. Enforces severity-tagged alerts and go/no-go decisions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cyhber-deploy:cyhber-deployThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Systematic DevSecOps review methodology enforcing 5-layer analysis with standardized severity-tagged alerts.
Systematic DevSecOps review methodology enforcing 5-layer analysis with standardized severity-tagged alerts.
Purpose: Ensure comprehensive, structured security review - not ad-hoc vulnerability detection.
Trigger on:
Also trigger when user mentions:
ALWAYS follow this order - don't skip layers based on request scope:
Ask if missing:
Every security issue MUST use this table:
| Campo | Valor |
|---|---|
| Severidad | 🔴 CRITICO | 🟠 ALTO | 🟡 MEDIO | 🟢 BAJO |
| ID | CD-SEC-XXX (sequential) |
| Componente | file.js:line or resource name |
| Descripción | What + why it's a risk |
| Evidencia | Code snippet or config excerpt |
| Remediación | Specific fix steps |
Severity levels:
Check ALL user-controlled inputs:
// ❌ SQL Injection
db.query(`SELECT * FROM users WHERE id = ${req.body.id}`)
// ❌ Command Injection
exec(`ping ${userInput}`)
// ❌ NoSQL Injection - body can inject operators, e.g. { "user": { "$ne": null } }
db.find({ user: req.body.user }) // bypasses auth if req.body.user is an object
// ✅ Coerce/validate type before querying
db.find({ user: String(req.body.user) })
// ✅ Parameterized SQL queries
db.query('SELECT * FROM users WHERE id = ?', [req.body.id])
Check:
Tools to recommend:
See @secret-patterns.md for full regex list.
Common patterns:
AKIA[0-9A-Z]{16}ghp_[a-zA-Z0-9]{36}-----BEGIN.*PRIVATE KEY-----api[_-]?key.*['"][a-zA-Z0-9]{20,}['"]🔴 CRITICO when:
Secure handling:
.env.example templates (no real values)Flag unprotected handling of:
Recommend:
# ✅ GitHub Actions best practices
permissions:
contents: read # Minimal permissions
pull-requests: write
jobs:
deploy-prod:
if: github.ref == 'refs/heads/main' # Branch restriction
environment:
name: production
url: https://app.example.com
needs: [test, security-scan] # Dependencies
Check for:
# ❌ Database publicly accessible
resource "aws_db_instance" "db" {
publicly_accessible = true
}
# ❌ Overly permissive security group
ingress {
cidr_blocks = ["0.0.0.0/0"]
from_port = 0
to_port = 65535
}
Review:
// ❌ Admin wildcard
{"Effect": "Allow", "Action": "*", "Resource": "*"}
// ✅ Specific permissions
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::bucket-name/*"
}
Apply least privilege principle.
Even if user only asks about X, review related files when available:
| User asks about... | Also check... |
|---|---|
| Auth endpoint | Session config, token generation, password reset |
| CI/CD workflow | Secrets management, branch protection, runner security |
| Database config | Connection strings, backup encryption, access logs |
| API route | Input validation, rate limiting, error responses |
| Container image | Base image CVEs, exposed ports, secret mounts |
Make scope expansion explicit:
"Beyond the auth endpoint, I reviewed related session configuration (found issue Y)."
These thoughts mean rationalization:
All of these = run full 5-layer review anyway.
| Mistake | Reality |
|---|---|
| "Internal API, no validation needed" | Internal = lateral movement target. Validate everything. |
| "Will fix secrets after deploy" | Never happens. Fix now or block deploy. |
| "One-off deploy, skip CI" | One-offs cause most incidents. Full checks always. |
| "Tests passed = secure" | Tests check functionality, not security. Separate concerns. |
| "Senior reviewed, I trust them" | Humans miss things under pressure. Systematic review always. |
| "Alert fatigue, ignoring MEDIUM" | MEDIUM today = CRITICAL tomorrow. Document all findings. |
After generating all alerts, provide:
┌─────────────────────────────────────────────┐
│ 🔒 ESTADO DE SEGURIDAD │
├─────────────────────────────────────────────┤
│ Nivel de riesgo: [🔴 CRITICO / 🟠 ALTO / │
│ 🟡 MEDIO / 🟢 BAJO] │
│ Alertas totales: X │
│ • Críticas: N │
│ • Altas: N │
│ • Medias: N │
│ • Bajas: N │
├─────────────────────────────────────────────┤
│ ⚠️ RECOMENDACIÓN: │
│ [BLOQUEAR / APROBAR CON MITIGACIONES] │
└─────────────────────────────────────────────┘
Optional terminal render: emit the findings as JSON (schema in
tools/findings.example.json) and pipe to python tools/cyhber_report.py to print
colored alert cards + this panel. Exit code 1 = block, 0 = approve (CI-friendly).
Block deployment when:
npx claudepluginhub devcop95/cyhber-deployGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.