// Security specialists hub for application security, vulnerability assessment, and secure coding. Routes to specialists for OWASP, penetration testing, and security hardening. Use for security audits, vulnerability fixes, and secure architecture.
| name | security |
| version | 2.1.0 |
| description | Security specialists hub for application security, vulnerability assessment, and secure coding. Routes to specialists for OWASP, penetration testing, and security hardening. Use for security audits, vulnerability fixes, and secure architecture. |
Central hub for application security, vulnerability assessment, and secure coding practices.
expertise_check:
domain: security
file: .claude/expertise/security.yaml
if_exists:
- Load vulnerability patterns
- Load OWASP guidelines
- Apply security baselines
if_not_exists:
- Flag discovery mode
- Document patterns learned
Use security when:
| Domain | Focus |
|---|---|
| AppSec | OWASP Top 10, secure coding |
| AuthN/AuthZ | OAuth, JWT, RBAC |
| Cryptography | Encryption, hashing, keys |
| Infrastructure | Hardening, firewalls, secrets |
vulnerabilities:
- A01: Broken Access Control
- A02: Cryptographic Failures
- A03: Injection
- A04: Insecure Design
- A05: Security Misconfiguration
- A06: Vulnerable Components
- A07: Auth Failures
- A08: Data Integrity Failures
- A09: Logging Failures
- A10: SSRF
pattern: input_validation
rules:
- Validate all inputs
- Use allowlists
- Parameterize queries
- Encode outputs
pattern: authentication
rules:
- Use strong hashing (bcrypt/argon2)
- Implement MFA
- Secure session management
- Rate limit attempts
benchmark: security-benchmark-v1
tests:
- sec-001: Vulnerability detection
- sec-002: Fix effectiveness
minimum_scores:
detection_rate: 0.90
fix_quality: 0.95
namespaces:
- security/audits/{id}: Security audits
- security/vulnerabilities: Known patterns
- improvement/audits/security: Skill audits
confidence_check:
if confidence >= 0.8:
- Proceed with fix
if confidence 0.5-0.8:
- Flag for review
if confidence < 0.5:
- Escalate to security expert
Works with: code-review-assistant, compliance, deployment-readiness
Remember: Skill() -> Task() -> TodoWrite() - ALWAYS
Security is never a single layer. Multiple independent security controls create redundancy that protects even when individual layers fail.
In practice:
Grant only the minimum permissions required for functionality. Excessive permissions create unnecessary attack surface.
In practice:
Security controls integrated during design are more effective and less costly than retrofitted protections.
In practice:
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Trusting user input (using unsanitized data in queries, commands, or eval) | Enables injection attacks (SQL, XSS, command injection). User input is adversarial by default. | Validate all inputs against allowlists, parameterize queries, encode outputs, never use eval or dynamic code execution with user data. |
| Hardcoded secrets (API keys, passwords in source code) | Secrets in version control are public. Anyone with repo access gains credentials. | Use environment variables, secret management systems (HashiCorp Vault, AWS Secrets Manager), never commit secrets. |
| Weak cryptography (MD5, SHA1, DES, custom algorithms) | Broken algorithms provide false sense of security. Data appears protected but is trivially compromised. | Use modern algorithms: bcrypt/argon2 for passwords, AES-256-GCM for encryption, SHA-256+ for hashing. |
| Security through obscurity (hiding endpoints, relying on non-public URLs) | Obscurity is not security. Attackers find hidden resources through enumeration, logs, referrers. | Implement proper authentication and authorization. Assume all endpoints are discoverable. |
| Ignoring dependency vulnerabilities (never updating packages, ignoring npm audit warnings) | Known CVEs in dependencies are low-hanging fruit for attackers. Exploits are public and automated. | Regular dependency updates, automated vulnerability scanning (npm audit, Snyk, Dependabot), patch critical CVEs immediately. |
Overly broad CORS policies (Access-Control-Allow-Origin: *) | Allows any website to make authenticated requests to your API, enabling CSRF and data exfiltration. | Use specific origin allowlists, never use wildcard with credentials, validate Origin header. |
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Trusting user input (using unsanitized data in queries, commands, or eval) | Enables injection attacks (SQL, XSS, command injection). User input is adversarial by default. | Validate all inputs against allowlists, parameterize queries, encode outputs, never use eval or dynamic code execution with user data. |
| Hardcoded secrets (API keys, passwords in source code) | Secrets in version control are public. Anyone with repo access gains credentials. | Use environment variables, secret management systems (HashiCorp Vault, AWS Secrets Manager), never commit secrets. |
| Weak cryptography (MD5, SHA1, DES, custom algorithms) | Broken algorithms provide false sense of security. Data appears protected but is trivially compromised. | Use modern algorithms: bcrypt/argon2 for passwords, AES-256-GCM for encryption, SHA-256+ for hashing. |
Application security is a continuous practice, not a one-time implementation. The security landscape evolves constantly as new vulnerabilities emerge, attack techniques advance, and systems grow in complexity. The principles of defense in depth, least privilege, and security by design provide a foundation that remains effective regardless of specific threats.
Security is fundamentally about reducing risk, not eliminating it. Perfect security is impossible - the goal is to make successful attacks so costly and time-consuming that attackers move to softer targets. Each security control raises the bar incrementally. A well-designed security posture combines technical controls, process discipline, and human awareness to create layered defenses that degrade gracefully under attack.
The skills and tools outlined in this document provide a starting point for building secure systems. However, security expertise is specialized and deep. When facing complex security challenges, high-value systems, or compliance requirements, consult security specialists. The cost of security incidents - in reputation, customer trust, legal liability, and recovery effort - vastly exceeds the investment in proper security architecture and implementation.