skills/knowledge/security/SKILL.md
Application security principles and OWASP Top 10 for building secure web applications. Use when the user asks to review code for security vulnerabilities, implement authentication or authorization, handle secrets or API keys, configure security headers, prevent injection attacks (SQL, XSS, CSRF), prepare for a security audit, or respond to a vulnerability report. Covers input validation, data protection, secrets management, session handling, and common security antipatterns.
npx skillsauth add krzysztofsurdy/code-virtuoso 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.
Security is not a feature — it is a property of every feature. Every endpoint, every form, every data flow, every integration point must be designed with security in mind from the start. Bolting security on after the fact is expensive, error-prone, and often incomplete.
This skill provides stack-agnostic guidance for building secure applications. It covers the OWASP Top 10, input validation, authentication and authorization patterns, data protection, secrets management, security headers, and common antipatterns.
Consult this skill when:
The OWASP Top 10 (2021 edition) represents the most critical security risks to web applications. Use this as a starting checklist — not an exhaustive list.
| # | Vulnerability | What It Is | Primary Defense | |---|---|---|---| | A01 | Broken Access Control | Users act outside intended permissions | Deny by default, enforce server-side | reference | | A02 | Cryptographic Failures | Sensitive data exposed due to weak/missing crypto | Use strong algorithms, encrypt in transit and at rest | reference | | A03 | Injection | Untrusted data sent to interpreter as part of a command/query | Parameterized queries, input validation | reference | | A04 | Insecure Design | Missing or ineffective security controls by design | Threat modeling, secure design patterns | reference | | A05 | Security Misconfiguration | Insecure default configs, incomplete setup | Hardened defaults, automated config validation | reference | | A06 | Vulnerable Components | Using components with known vulnerabilities | Dependency scanning, timely updates | reference | | A07 | Auth Failures | Broken authentication/identification | MFA, rate limiting, secure password storage | reference | | A08 | Integrity Failures | Code/data integrity not verified | Signed updates, CI/CD integrity checks | reference | | A09 | Logging Failures | Insufficient logging and monitoring | Log security events, set up alerting | reference | | A10 | SSRF | Server tricked into making unintended requests | Allowlist destinations, sanitize URLs | reference |
Input validation is the first line of defense. Validate at every system boundary — not just at the UI.
Core principles:
Type coercion dangers:
Loose type comparisons can bypass security checks. A string "0" might equal integer 0 or boolean false depending on the language. Always use strict comparison operators and explicit type casting.
Parameterized queries:
Never concatenate user input into SQL, LDAP, or OS commands. Always use parameterized queries or prepared statements. This applies to ORMs too — raw query methods bypass ORM protections. See secure coding reference for details.
Authentication verifies identity — "who are you?" See auth patterns reference for detailed guidance.
Password hashing:
Multi-factor authentication (MFA):
Session management:
HttpOnly, Secure, SameSite=Lax (or Strict)Token-based auth (JWT caveats):
alg: noneOAuth2 flows:
Authorization determines permissions — "what are you allowed to do?" Authorization is not authentication. See auth patterns reference for details.
Principle of least privilege:
Role-Based Access Control (RBAC):
Attribute-Based Access Control (ABAC):
Common authorization mistakes:
Encryption at rest:
Encryption in transit:
PII handling:
Secure deletion:
Never in code or config files:
.gitignore for local config files, but do not rely on it as your only protectionEnvironment variables:
Secret managers:
Rotation strategy:
Configure these HTTP response headers on every response. Each addresses a specific class of attack.
| Header | Purpose | Recommended Value |
|---|---|---|
| Content-Security-Policy (CSP) | Prevents XSS by controlling which sources can load content | Start with a restrictive policy; avoid unsafe-inline and unsafe-eval |
| Strict-Transport-Security (HSTS) | Forces HTTPS for all future requests | max-age=63072000; includeSubDomains; preload |
| X-Content-Type-Options | Prevents MIME-type sniffing | nosniff |
| X-Frame-Options | Prevents clickjacking by controlling iframe embedding | DENY or SAMEORIGIN |
| Referrer-Policy | Controls how much referrer info is sent | strict-origin-when-cross-origin |
| Permissions-Policy | Controls browser features (camera, mic, geolocation) | Disable features you do not use |
CORS (Cross-Origin Resource Sharing):
Access-Control-Allow-Origin: * for authenticated endpointsAccess-Control-Allow-Methods and Access-Control-Allow-HeadersThese are frequently encountered mistakes that create vulnerabilities:
Access-Control-Allow-Origin: * combined with credentials is a vulnerability. Be specific about allowed origins.Use this checklist when reviewing code, designing features, or preparing for release:
Input/Output:
Authentication:
Authorization:
Data:
Configuration:
Monitoring:
development
Spawn and coordinate a pre-composed agent team from a team definition file. Reads team files from teams/, resolves agents and skills, picks the best spawning mode (peer or sequential), and runs the workflow. Use when the user asks to run a team, dispatch a development team, start a feature delivery, or coordinate multiple agents for a multi-phase task.
development
Pre-composed agent team library. Use when the user asks which teams are available, what a team does, when to pick one team over another, or to browse multi-agent compositions. Catalogs ready-to-run teams (development team, review squad, war room) with their purpose, agent roster, workflow type, and when to use each. The actual dispatching is handled by the dispatching-agent-teams skill.
tools
Ecosystem discovery advisor. Use when the user asks 'what skill should I use', 'what agent should I delegate to', 'which team fits this task', or when onboarding to available skills, agents, and teams. Scans ALL installed skills at runtime -- not limited to any single plugin or vendor. Triggers: 'which skill', 'which agent', 'what do I use for', 'orient me', 'what tools do I have'.
tools
Interactive tool to scaffold a complete Claude Code plugin -- plugin.json manifest, skills, agents, hooks, MCP servers, LSP servers, and an optional marketplace.json catalog entry. Use when the user asks to create a plugin, build a Claude Code plugin, scaffold a plugin marketplace, convert an existing .claude/ configuration into a plugin, or package skills and agents for distribution. Runs a guided questionnaire, writes all required files to disk, and prints test instructions.