dev-security/SKILL.md
Authoritative security guidance for backend, frontend touchpoints, agentic AI, and production hardening. Read for auth, validation, secrets, reviews, and pre-deploy verification.
npx skillsauth add lidge-jun/cli-jaw-skills dev-securityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Treat security as a build constraint, not a cleanup step.
This skill is the authoritative source for authentication, authorization, input validation, secrets, headers, rate limiting, supply-chain checks, PII handling, and agentic AI safety.
dev-backend delegates here for policy and verification depth.
dev-frontend remains responsible for UI implementation, but frontend security touchpoints such as CSP compliance, CORS behavior, XSS prevention, and dependency auditing are defined here.
Activate this skill when you are:
Use this skill together with the domain skill, not instead of it:
dev-backend/SKILL.md §4.dev-frontend/SKILL.md §§3-7.dev-testing.dev-code-reviewer/SKILL.md §§1-2.dev-data/SKILL.md §§2-4.Answer these three questions before implementation:
Security-sensitive changes must name the trust boundary before coding:
If the change touches auth, payment, file upload, logging, or PII, write the must-pass checks before coding. This skill owns security policy. Domain skills own architecture and implementation details.
| File | When to Read | What It Covers |
| --- | --- | --- |
| references/owasp-top10.md | Any security-sensitive code | OWASP Top 10:2025 with unsafe/safe code pairs and checklists |
| references/language-quirks.md | When coding in JS/TS, Python, SQL, or Go | Per-language pitfalls that scanners and reviewers commonly miss |
| references/static-analysis.md | Before claiming code is secure | Semgrep, CodeQL, ESLint security, npm audit, pip-audit, Bandit, gitleaks, CI, pre-commit |
| references/asvs-checklist.md | Before deploy or release | ASVS 5.0 Level 1 and Level 2 pre-deploy checklist for V1-V9 |
| references/agentic-ai-security.md | When building tool-using agents or prompt-driven flows | OWASP ASI01-ASI10 mapped to agent rules and safe operating patterns |
Read only the references relevant to the current task. A small CSS change needs no OWASP reference. Auth, data access, secrets, file uploads, webhooks, or incident response changes do.
Input validation is the first line of defense. Validate at the first trusted boundary, reject unknown fields, enforce limits, and escape or sanitize on output for the target context. Client-side validation improves UX only — it is never a security boundary.
Required rules
Validate all input at trust boundaries with schema validation (Zod strict, Pydantic extra="forbid", or equivalent). Reject unknown fields. For injection cases, rich text, and output encoding, read references/owasp-top10.md A05 and references/language-quirks.md.
Use this checklist for login, session, token, password reset, magic link, OAuth, and admin access:
argon2id or bcrypt; use MD5, SHA1, or raw SHA256 only for non-security hashing.httpOnly, secure, sameSite cookies; keep session tokens out of localStorage.See references/owasp-top10.md A07 for implementation patterns.
See references/asvs-checklist.md V2 and V3 before deploy.
Authentication says who the caller is. Authorization says what the caller may do. Security failures happen when a route checks only the first.
Required rules
See references/owasp-top10.md A01 for code pairs.
See dev-backend/SKILL.md §4 for middleware execution order.
Secrets are values that grant access, identity, or decryption capability. Treat API keys, database credentials, signing keys, OAuth client secrets, webhook secrets, certificates, and recovery codes as secrets.
| Rule | Required Practice |
| --- | --- |
| Source control | Commit .env.example, never commit .env, real keys, tokens, or private certs |
| Local development | Load secrets from environment variables or a local secret store |
| Production | Use Vault, cloud secret manager, or KMS-backed delivery |
| Rotation | Document owner, rotation cadence, and emergency revocation path |
| Logging | Redact secrets before logs, traces, analytics, error reports, and screenshots |
| Testing | Use dedicated non-production keys with least privilege |
If a repository change touches secrets, run gitleaks before claiming done.
If a feature adds webhook verification or JWT signing, treat key rollover as part of the feature.
For scanning recipes, read references/static-analysis.md.
For agent workflows and exfiltration risk, read references/agentic-ai-security.md.
This skill owns header policy values.
dev-backend owns middleware ordering and integration points.
Minimum production header baseline
Strict-Transport-Security: max-age=31536000; includeSubDomainsContent-Security-Policy with explicit default-src, script-src, style-src, img-src, connect-src, frame-ancestors, and base-uriX-Content-Type-Options: nosniffReferrer-Policy: strict-origin-when-cross-originPermissions-Policy with unused capabilities disabledX-Frame-Options: DENY when CSP frame-ancestors is not sufficient for legacy supportCross-Origin-Opener-Policy and Cross-Origin-Resource-Policy where required by the appApply these via the framework's standard header middleware (Helmet for Express, equivalents elsewhere). Exact directive values are environment-specific — CSP especially must be designed around the app's real script/style/asset/connect origins, not copied from a template.
Frontend touchpoints that must stay aligned
dangerouslySetInnerHTML unless sanitized with a maintained sanitizer and defended by CSP.See references/owasp-top10.md A02 and A05.
See dev-frontend/SKILL.md §§5-7 for performance and accessibility guardrails that still apply after security changes.
Apply rate limiting per IP and, where available, per user, tenant, and credential target.
Return 429 Too Many Requests with Retry-After.
Log repeated abuse without logging secrets or raw PII.
Treat the limits below as risk-based starting defaults, not fixed gates — tune them to real traffic, abuse risk, and threat model.
| Surface | Default starting limit | | --- | --- | | Login | ~5 requests per minute per IP and account identifier | | Password reset request | ~3 requests per hour per account identifier | | Registration | ~10 requests per hour per IP | | MFA verification | ~10 requests per 10 minutes per session | | Public API | ~100 requests per minute per user or API key | | File upload start | ~20 requests per hour per user | | Webhook verification failures | Alert after burst anomalies and repeated signature failures |
Rate limiting is not only for brute force. Use it for enumeration, abuse, accidental loops, webhook replay storms, and AI-triggered runaway automation.
Security claims are incomplete without automated checks.
At minimum, run the project-native SAST, dependency-audit, and secret-scan tools (e.g. npm audit/pip-audit, semgrep, gitleaks) in local development and CI. Use whatever the repo already standardizes on; exact commands belong in repo docs.
For CI templates, pre-commit hooks, and tool-specific guidance, read references/static-analysis.md.
For review gating, combine this with dev-code-reviewer/SKILL.md §§1-2.
Agent-authored configuration files create a trust surface distinct from application code.
| File | Check For |
| --- | --- |
| CLAUDE.md / AGENTS.md | Hardcoded secrets, auto-run instructions, prompt injection patterns |
| settings.json | Overly permissive allow lists (Bash(*)), missing deny lists, dangerous bypass flags |
| mcp.json | Risky MCP servers, hardcoded env secrets, npx -y supply chain risks |
| hooks/ | Command injection via ${file} interpolation, data exfiltration, silent error suppression |
| Agent definitions | Unrestricted tool access, prompt injection surface, missing model constraints |
Before enabling any MCP server:
npx -y auto-install.${ENV_VAR} references for all credentials.Reduce the impact of any single compromise:
A security-sensitive change is complete only when every applicable item passes.
Logging and PII
File Uploads
Payments
If any item remains unknown, stop, investigate, and resolve the gap before proceeding.
This matrix clarifies who defines, implements, and verifies each security control across the skill bundle:
| Control | Policy Owner | Implementation Owner | Verification Owner |
|---------|-------------|---------------------|--------------------|
| Input validation schema | dev-security §1 | Domain skill (backend/frontend/data) | dev-testing §2 |
| Auth flow (login, session, token) | dev-security §2 | dev-backend §4 middleware | dev-testing §1.3 risk priorities |
| Authorization (RBAC/ABAC) | dev-security §3 | dev-backend service layer | dev-testing §2 + dev-code-reviewer |
| Security headers (CSP, CORS, HSTS) | dev-security §5 | dev-backend middleware + dev-frontend compliance | dev-testing + static analysis |
| Rate limiting | dev-security §6 | dev-backend §4 middleware | Load testing + monitoring |
| PII/data classification | dev-security + dev-data §7 | dev-data pipeline + dev-backend API | dev-testing + audit logs |
| Secrets management | dev-security §4 | All skills (runtime env) | gitleaks + dev-code-reviewer |
| Dependency security | dev-security §7 | CI pipeline owner | npm audit / pip-audit in CI |
| Agentic AI safety | dev-security refs/agentic-ai | Agent builder | Scenario testing (dev-testing) |
Reference this matrix from dev-backend and dev-frontend when ownership is unclear.
development
Goal execution guidelines with PABCD integration, verification tiers, documentation workflow, and AI-driven planning
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
development
Use this skill any time a spreadsheet file is the primary input or output (.xlsx, .xlsm, .csv, .tsv). This includes: creating, reading, editing, analyzing, or formatting spreadsheets; cleaning messy tabular data; converting between formats; and data visualization with charts. Also use for pandas-based data analysis when the deliverable is a spreadsheet. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration.
tools
Use this skill when the user wants to build a financial model, 3-statement model, DCF valuation, cap table, scenario analysis, or financial projections in Excel. Trigger on: 'financial model', '3-statement model', 'DCF', 'cap table', 'pro forma', 'projections', 'sensitivity analysis', 'waterfall', 'debt schedule', 'break-even', 'discounted cash flow', 'capitalization table', 'fundraising model', 'WACC calculation', 'scenario analysis model'. Input is a text prompt with assumptions. Output is a single .xlsx file with formula-driven, interconnected statement sheets.