/ship-safe-skills:api-security-guardfrom ship-safe-skills
Audit, harden and monitor an API against 12 rules - authenticate every call, check object access, rate limit, validate input, HTTPS only, short-lived tokens, least-privilege keys, no secrets in URLs, log auth failures, version the API, limit response data, inventory endpoints. Includes an endpoint inventory scanner and monitoring alerts. Use when asked to review API security, check for BOLA/IDOR, list all endpoints, or build API monitoring. Use proactively whenever you add or change an API route, authentication or a token.
Ships in ship-safe-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Checks an API against 12 rules (mapped to the OWASP API Security Top 10, 2023), builds the missing protections, and sets up monitoring so attacks and drift are noticed.
Runs on its own: when Claude adds or changes a route, auth or a token, it checks the change against the 12 rules, and edited files are scanned for hard-coded secrets, wildcard CORS, secrets in URLs and turned-off TLS checks.
| # | Rule | OWASP API 2023 | Core question |
|---|---|---|---|
| 1 | Authenticate every call | API2 | Is there any route a stranger can call that should not be public? |
| 2 | Check object access | API1, API5 | Can user A read or change user B's record by changing an ID? Can a normal user call an admin function? |
| 3 | Rate limit | API4, API6 | Are login, reset, search, and costly or business-critical flows throttled? |
| 4 | Validate input | API3, API7 | Is every field type-checked, size-limited, allow-listed at the boundary? Any server-side fetch of user URLs? |
| 5 | HTTPS only | API8 | Redirect or reject plain HTTP? HSTS? No plain-text tokens? |
| 6 | Short-lived tokens | API2 | Access tokens in minutes, refresh tokens rotated and revocable? |
| 7 | Least-privilege keys | API5, API8 | Keys and service accounts scoped to read-only or minimum permissions? |
| 8 | No secrets in URLs | API8 | Any ?token=, ?api_key= in routes, links or clients? |
| 9 | Log auth failures | API8 | 401/403/lockouts logged with IP, user, route, and alerted on spikes? |
| 10 | Version your API | API9 | Are old versions tracked, deprecated with dates, and retired? |
| 11 | Limit response data | API3 | Only needed fields returned? No hashes, internal IDs, or other users' data? Pagination caps? |
| 12 | Inventory endpoints | API9, API10 | Is there a current list of every endpoint, including old, internal, debug and third-party ones? |
Details, how to verify and fix each rule: references/rules.md. Alerts for each: references/monitoring.md.
python3 <skill-dir>/scripts/api_inventory.py <project-root> > /tmp/api-inventory.md
It lists routes with auth evidence, version, object-ID parameters, and spec/code drift, and flags tokens in URLs, plain http://, long-lived tokens and data-exposure leads. Read its limits: it is heuristic. "none seen" means no auth pattern matched near the route. Apps with custom auth wrappers will show false alarms, so check how auth is actually applied (middleware, router-level dependency, gateway) and tell the user.none seen, open it and decide: public by design, protected elsewhere (gateway, router-level), or a real gap. For every route with an object-ID parameter, find the line that proves the record belongs to the caller (a query filtered by the user or tenant, or a policy check). No such line means a probable BOLA/IDOR: rule 2 FAIL.references/rules.md; rate each PASS / WARN / FAIL / UNKNOWN with path:line evidence. Items needing infrastructure access (gateway config, TLS termination, key scopes in a cloud console) are UNKNOWN, listing exactly where to look.references/monitoring.md using the monitor-alerts-builder skill if installed. At minimum: auth-failure spike, 403/404 probing per user, rate-limit hits, traffic on deprecated versions, and requests to routes not in the inventory.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/app-readiness-auditAudit an application before launch for mobile support, secret keys, database safety, rate limiting, password reset, rollbacks, backups, usage limits, analytics, input sanitizing, error handling, log flow and monitoring/alerts. Use when asked to check if an app is production-ready, do a launch review, or find security and reliability gaps. Use proactively, without being asked, before you tell the user a feature or app is ready to ship./build-flow-mapMap how an application is built and connected - languages, frameworks, entry points, build/run/test/deploy commands, environment variables, databases and external services, API routes, and CI/CD - and write it to docs/BUILD_FLOW.md with a diagram so any developer can onboard fast. Use when asked to document the build flow, track the code workflow, explain what frameworks the project uses, or onboard a new developer. Use proactively after structural changes (new framework, service, environment variable, route group) and when docs/BUILD_FLOW.md is missing or stale./monitor-alerts-builderDesign and build monitoring and alerting for an application - health endpoint, uptime checks, error tracking, alert rules (errors, latency, auth abuse, rate limits, backups, spend, certificates), notification channels and runbooks. Use when asked to add monitoring, set up alerts, or fix the "monitor and alerts" gap from app-readiness-audit. Use proactively when an app is about to be deployed or launched with no alerting.npx claudepluginhub quiczz/ship-safe-skills --plugin ship-safe-skills