security-patterns
Security patterns and OWASP guidelines. Triggers on: security review, OWASP, XSS, SQL injection, CSRF, authentication, authorization, secrets management, input validation, secure coding.
Install / Use
npx skills add aiskillstore/marketplace --skill security-patternsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of security-patterns
security-patterns scores 87/100 on our quality scale, 696th of 1,097 Security skills we index.
Its SKILL.md is 4.8 KB long, well organised into 27 sections with 9 code examples: a solid amount of guidance for an agent.
It has 428 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so security-patterns is actively maintained.
- Our last check on 2026-11-02 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-07. Automated pattern scan on 2026-10-07. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
security-patterns compared with similar skills
All 4 of these similar skills score higher than security-patterns; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| security-patterns (this skill)by aiskillstore | 87 | 428 | 55d ago | SKILL.md |
| claude-memby thedotmack | 100 | 118.2k | today | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 57d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 57d ago | SKILL.md |
| prospectingby coreyhaines31 | 100 | 60.1k | 7d ago | SKILL.md |
Frequently asked questions
- How do I install security-patterns?
- Run
npx skills add aiskillstore/marketplace --skill security-patterns. The install tabs above show the steps for each supported agent. - Which AI agents does security-patterns work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is security-patterns safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is security-patterns still maintained?
- The repository was last updated about 2 months ago, so security-patterns is actively maintained.
Skill content
View source on GitHubname: security-patterns description: "Security patterns and OWASP guidelines. Triggers on: security review, OWASP, XSS, SQL injection, CSRF, authentication, authorization, secrets management, input validation, secure coding." compatibility: "Language-agnostic patterns with framework-specific examples in references." allowed-tools: "Read Write Bash Grep"
Security Patterns
Essential security patterns for web applications.
OWASP Top 10 Quick Reference
| Rank | Vulnerability | Prevention | |------|--------------|------------| | A01 | Broken Access Control | Check permissions server-side, deny by default | | A02 | Cryptographic Failures | Use TLS, hash passwords, encrypt sensitive data | | A03 | Injection | Parameterized queries, validate input | | A04 | Insecure Design | Threat modeling, secure defaults | | A05 | Security Misconfiguration | Harden configs, disable unused features | | A06 | Vulnerable Components | Update dependencies, audit regularly | | A07 | Auth Failures | MFA, rate limiting, secure session management | | A08 | Data Integrity Failures | Verify signatures, use trusted sources | | A09 | Logging Failures | Log security events, protect logs | | A10 | SSRF | Validate URLs, allowlist destinations |
Input Validation
# WRONG - Trust user input
def search(query):
return db.execute(f"SELECT * FROM users WHERE name = '{query}'")
# CORRECT - Parameterized query
def search(query):
return db.execute("SELECT * FROM users WHERE name = ?", [query])
Validation Rules
Always validate:
- Type (string, int, email format)
- Length (min/max bounds)
- Range (numeric bounds)
- Format (regex for patterns)
- Allowlist (known good values)
Never trust:
- URL parameters
- Form data
- HTTP headers
- Cookies
- File uploads
Output Encoding
// WRONG - Direct HTML insertion
element.innerHTML = userInput;
// CORRECT - Text content (auto-escapes)
element.textContent = userInput;
// CORRECT - Template with escaping
render(`<div>${escapeHtml(userInput)}</div>`);
Encoding by Context
| Context | Encoding | |---------|----------| | HTML body | HTML entity encode | | HTML attribute | Attribute encode + quote | | JavaScript | JS encode | | URL parameter | URL encode | | CSS | CSS encode |
Authentication
# Password hashing (use bcrypt, argon2, or scrypt)
import bcrypt
def hash_password(password: str) -> bytes:
return bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12))
def verify_password(password: str, hashed: bytes) -> bool:
return bcrypt.checkpw(password.encode(), hashed)
Auth Checklist
- [ ] Hash passwords with bcrypt/argon2 (cost factor 12+)
- [ ] Implement rate limiting on login
- [ ] Use secure session tokens (random, long)
- [ ] Set secure cookie flags (HttpOnly, Secure, SameSite)
- [ ] Implement account lockout after failed attempts
- [ ] Support MFA for sensitive operations
Authorization
# WRONG - Check only authentication
@login_required
def delete_post(post_id):
post = Post.get(post_id)
post.delete()
# CORRECT - Check authorization
@login_required
def delete_post(post_id):
post = Post.get(post_id)
if post.author_id != current_user.id and not current_user.is_admin:
raise Forbidden("Not authorized to delete this post")
post.delete()
Secrets Management
# WRONG - Hardcoded secrets
API_KEY = "sk-1…[redacted]"
# CORRECT - Environment variables
API_KEY = os.environ["API_KEY"]
# BETTER - Secrets manager
API_KEY = secr…[redacted]("api-key")
Secret Handling Rules
DO:
- Use environment variables or secrets manager
- Rotate secrets regularly
- Use different secrets per environment
- Audit secret access
DON'T:
- Commit secrets to git
- Log secrets
- Include secrets in error messages
- Share secrets in plain text
Security Headers
Content-Security-Policy: default-src 'self'; script-src 'self'
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Strict-Transport-Security: max-age=31536000; includeSubDomains
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: geolocation=(), camera=()
Quick Security Audit
# Find hardcoded secrets
rg -i "(password|secret|api_key|token)\s*=\s*['\"][^'\"]+['\"]" --type py
# Find SQL injection risks
rg "execute\(f['\"]|format\(" --type py
# Find eval/exec usage
rg "\b(eval|exec)\s*\(" --type py
# Check for TODO security items
rg -i "TODO.*security|FIXME.*security"
Additional Resources
./references/owasp-detailed.md- Full OWASP Top 10 details./references/auth-patterns.md- JWT, OAuth, session management./references/crypto-patterns.md- Encryption, hashing, signatures./references/secure-headers.md- HTTP security headers guide
Scripts
./scripts/security-scan.sh- Quick security grep patterns./scripts/dependency-audit.sh- Check for vulnerable dependencies
Related Skills
claude-mem
118.2kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
prospecting
60.1kWhen the user wants to find and qualify prospects for outbound, or asks who to target first, which signal to prioritize, or where to spot buyers with the problem: buying signals, enrichment, verification, account research.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
