secure-coding-patterns
Secure coding patterns and DevSecOps best practices. Use for threat modeling, secret management, secure authentication, OWASP Top 10 prevention, and security…
by Andersonlimahw★ 19 GitHub stars
Install secure-coding-patterns in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Secure Coding Patterns & DevSecOps
1. Authentication & Authorization
- MFA / 2FA: Always support multi-factor authentication.
- Tokens: Use short-lived JWTs and secure HttpOnly, SameSite cookies for session management.
- RBAC / ABAC: Implement Role-Based or Attribute-Based Access Control enforcing the Principle of Least Privilege.
2. Input Validation & Sanitization
- Trust No Input: Validate all input on the server-side against a strict schema (e.g., Zod, Joi).
- Sanitization: Encode output to prevent XSS (Cross-Site Scripting).
- SQL Injection Prevention: Always use parameterized queries or ORMs. Never concatenate strings to build SQL queries.
3. Data Protection
- Encryption at Rest: Encrypt sensitive data in the database (e.g., AES-256).
- Encryption in Transit: Enforce TLS 1.2+ for all communications.
- Hashing: Use strong, salted hashing algorithms (Argon2, bcrypt) for passwords.
4. Secret Management
- Never hardcode secrets in source code.
- Use environment variables or dedicated secret vaults (HashiCorp Vault, AWS Secrets Manager).
- Scan repositories for leaked secrets (e.g., GitGuardian, detect-secrets).
5. DevSecOps & CI/CD Integration
- SAST (Static Application Security Testing): Analyze source code for vulnerabilities during the build.
- DAST (Dynamic Application Security Testing): Test the running application for vulnerabilities.
- SCA (Software Composition Analysis): Scan open-source dependencies for known CVEs.
6. Threat Modeling
- Use frameworks like STRIDE (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege) during the design phase.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the secure-coding-patterns skill do?
Secure coding patterns and DevSecOps best practices. Use for threat modeling, secret management, secure authentication, OWASP Top 10 prevention, and security compliance.
How do I install the secure-coding-patterns skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the secure-coding-patterns skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…