From shipyard
Audits code for OWASP Top 10 vulnerabilities, detects secrets like API keys and DB credentials, scans dependencies for CVEs, reviews IaC and Docker for security risks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/shipyard:security-auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- TOKEN BUDGET: 110 lines / ~330 tokens -->
Core principle: Assume every change introduces risk until proven otherwise.
For every code change, verify:
dangerouslySetInnerHTML without sanitizationFlag these patterns in ANY file (code, config, IaC, docs, tests):
| Pattern | What It Is |
|---|---|
AKIA[0-9A-Z]{16} | AWS Access Key |
ghp_[0-9a-zA-Z]{36} | GitHub Token |
sk-[0-9a-zA-Z]{48} | OpenAI/Stripe Secret Key |
(postgres|mysql|mongodb)://[^:]+:[^@]+@ | DB credentials in URI |
-----BEGIN.*PRIVATE KEY----- | Private key |
(password|secret|token|api_key)\s*[:=]\s*['"][^'"]{8,} | Generic secret |
Where secrets hide: .env files in git, Docker build args, Terraform tfvars, CI configs, test fixtures, comments.
Prevention: Environment variables or secret managers. Add .env, *.tfvars, *.pem to .gitignore.
npm audit / pip-audit / cargo audit / govulncheck| Area | Check |
|---|---|
| Terraform | No hardcoded secrets in .tf, remote state with encryption, IAM least privilege, no * in security groups, encryption on storage |
| Ansible | Vault for secrets, SSH key auth, become only where needed |
| Docker | Pinned base image (not latest), non-root USER, no secrets in ENV/ARG, .dockerignore configured, health check present, multi-stage build |
| Severity | Definition | Action |
|---|---|---|
| Security-Critical | Exploitable vulnerability or data exposure | Must fix before merge |
| Security-Important | Increases attack surface | Should fix |
| Security-Advisory | Best practice not followed | Note for improvement |
**[C1] SQL Injection in user search endpoint**
- **Location:** src/routes/users.py:42
- **Description:** User-supplied `q` parameter is interpolated directly into a SQL query
via f-string: `cursor.execute(f"SELECT * FROM users WHERE name = '{request.args['q']}'")`
- **Impact:** Attacker can execute arbitrary SQL via the `q` query parameter, potentially
exfiltrating the entire user database or escalating privileges.
- **Remediation:** Use parameterized query:
`cursor.execute("SELECT * FROM users WHERE name = %s", (request.args['q'],))`
- **Evidence:** `cursor.execute(f"SELECT * FROM users WHERE name = '{request.args['q']}'")`
- Missing rate limiting on `/api/login` (src/routes/auth.py:15) — add express-rate-limit middleware
- Debug logging enabled in production config (config/prod.yml:8) — set `debug: false`
Two API endpoints accept user input directly in SQL queries, creating injection
vulnerabilities that could expose the entire user database. An API key committed
to test fixtures should be rotated immediately. The remaining findings are
low-risk code quality improvements. Fix the SQL injection first — it's the most
dangerous and affects the most-used endpoints.
**Security Issue: Possible injection**
The code might have injection vulnerabilities. Consider reviewing input handling.
Referenced by: shipyard:auditor agent (comprehensive scans), shipyard:builder (awareness during implementation)
Pairs with: shipyard:infrastructure-validation (IaC tool workflows), shipyard:shipyard-verification (security claims need evidence)
npx claudepluginhub lgbarn/shipyard --plugin shipyardPerforms full security audits scanning for hardcoded secrets, vulnerable dependencies, IAM misconfigs, auth flaws, SQL injection, XSS, HTTPS issues, rate limiting, public storage exposures.
This skill should be used when the user says "security audit", "check for vulnerabilities", "security review", "harden project", "dependency audit", "credential scan", "check for secrets", "scan for secrets", "OWASP review", "security checklist", "audit dependencies", "find vulnerabilities", or wants to review their project for security issues, exposed credentials, or vulnerable dependencies.
Full security audit — secrets, dependencies, IAM, auth, injection, XSS, HTTPS, rate limiting, public storage. Use when asked for "security audit", "check for vulnerabilities", "security review", or "are we secure".