Command Palette

Search for a command to run...

Назад к скиллам
скилл № 08154

security-patterns

Universal security patterns based on OWASP Top 10 and security best practices. Framework-agnostic security guidance.

БесплатноБез исполняемых скриптов
CarlosDanielDevот CarlosDanielDev★ 31 звезда на GitHub

Установить security-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Security Patterns

Universal security patterns and OWASP Top 10 compliance. Framework-agnostic security guidance.

Skill Usage

Aspect Details
Consumer subagent-security-analyst (and all architects)
Purpose Security vulnerability detection and remediation patterns
Invocation Subagents read this skill; NOT directly invocable by users
Applicability All frameworks and languages

OWASP Top 10 (2021) - Quick Reference

# Vulnerability Description Prevention
A01 Broken Access Control Missing or improper authorization Implement proper access controls, deny by default
A02 Cryptographic Failures Weak encryption, exposed secrets Use strong encryption, protect data at rest/transit
A03 Injection SQL, NoSQL, Command injection Use parameterized queries, ORM, input validation
A04 Insecure Design Missing security requirements Apply threat modeling, secure design patterns
A05 Security Misconfiguration Default configs, verbose errors Harden configs, disable debug in production
A06 Vulnerable Components Outdated dependencies Keep dependencies updated, scan for CVEs
A07 Auth/Session Issues Weak authentication Use MFA, secure session management, strong passwords
A08 Data Integrity Failures Unsigned/unverified data Implement digital signatures, integrity checks
A09 Logging Failures Insufficient logging Log security events, monitor anomalies
A10 SSRF Server-side request forgery Validate URLs, use allowlists, network segmentation

Common Security Patterns

Input Validation

ALWAYS validate and sanitize user input:
1. Validate type, length, format, range
2. Use allowlist (not denylist) when possible
3. Sanitize before processing or storing
4. Encode before rendering (prevent XSS)

Authentication

Best practices:
1. Never store passwords in plaintext
2. Use bcrypt, scrypt, or Argon2 for hashing
3. Implement account lockout after failed attempts
4. Use MFA where possible
5. Secure password reset flows

Authorization

Implement principle of least privilege:
1. Check permissions on EVERY request
2. Use role-based access control (RBAC)
3. Deny by default
4. Validate on server-side (never trust client)

SQL Injection Prevention

1. Use parameterized queries/prepared statements
2. Use ORMs with proper escaping
3. Never concatenate user input into queries
4. Apply principle of least privilege to DB users

XSS Prevention

1. Escape output based on context (HTML, JS, CSS, URL)
2. Use Content Security Policy (CSP) headers
3. Sanitize HTML if allowing user HTML
4. Use frameworks that auto-escape by default

CSRF Prevention

1. Use anti-CSRF tokens
2. Validate token on state-changing requests
3. Use SameSite cookie attribute
4. Verify Origin/Referer headers

Detailed Guides

For complete implementation details, read:


Security Checklist

Authentication & Authorization

  • Passwords hashed with strong algorithm (bcrypt, Argon2)
  • MFA implemented for sensitive operations
  • Session tokens are cryptographically random
  • Session timeout implemented
  • Authorization checked on every request
  • Principle of least privilege applied

Input Validation

  • All user input validated server-side
  • Allowlist validation used where possible
  • File uploads restricted by type and size
  • SQL injection prevented (parameterized queries)
  • XSS prevented (output encoding)
  • Command injection prevented

Data Protection

  • Sensitive data encrypted at rest
  • TLS/HTTPS enforced for data in transit
  • Secrets not hardcoded in code
  • Environment variables used for secrets
  • Database credentials properly secured

API Security

  • Rate limiting implemented
  • CORS configured properly
  • API keys secured and rotated
  • Input validation on all endpoints
  • Error messages don't expose internal details

Headers & Configuration

  • Security headers configured (CSP, X-Frame-Options, etc.)
  • Debug mode disabled in production
  • Unnecessary services/ports disabled
  • Default passwords changed
  • Error pages don't expose stack traces

Logging & Monitoring

  • Authentication events logged
  • Authorization failures logged
  • Security events monitored
  • Logs don't contain sensitive data
  • Log integrity protected

Security Headers (Universal)

Content-Security-Policy: default-src 'self'
X-Fra
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Read
  2. 02Grep
  3. 03Glob
  4. 04WebSearch

FAQ

Что делает скилл security-patterns?

Universal security patterns based on OWASP Top 10 and security best practices. Framework-agnostic security guidance.

Как установить скилл security-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл security-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить security-patterns с