security
Skill36 starsChanged 6 days agoMITView on GitHub
Application security principles and OWASP Top 10. Use to review code for vulnerabilities, implement authentication or authorization, handle secrets, configure security headers, prevent injection (SQL, XSS, CSRF), or prepare for an audit.
We split this skill into the rules it gives an agent
20 rules. 0 are common, 18 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 100 edited versions we read keep these.
18
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use the OWASP Top 10 as a starting checklist, not a full list.
- Distinctive: line 47
Never concatenate user input into SQL, LDAP, or OS commands.
- Distinctive: line 55
Use bcrypt, scrypt, or Argon2id.
- Distinctive: line 57
Never store plain-text passwords, never use reversible encryption for passwords
- Distinctive: line 79
Keep tokens short-lived (minutes, not hours)
- Distinctive: line 80
Use refresh tokens for long-lived sessions.
- Distinctive: line 81
Never store sensitive data in JWT payloads.
- Distinctive: line 87
Do not use the Implicit flow.
- Distinctive: line 96
Default to deny: grant access explicitly rather than revoking it
- Distinctive: line 102
Keep roles coarse-grained.
- Distinctive: line 103
Check permissions, not role names, in application code.
- Distinctive: line 123
Use AES-256 or equivalent for symmetric encryption
- Distinctive: line 129
Use TLS 1.2+ for all network communication
- Distinctive: line 144
Make sure database deletions actually remove data (not just soft-delete for sensitive records)
- Distinctive: line 145
Consider backup retention: deleted data may persist in backups
- Distinctive: line 151
No API keys, passwords, or tokens in source code, config files, or environment-specific files committed to version control
- Very specific: line 152
Use .gitignore for local config files, but do not rely on it as your only protection
- Distinctive: line 164
Use dedicated secret managers (HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, GCP Secret Manager)
- Very specific: line 190
Do not use Access-Control-Allow-Origin: * for authenticated endpoints
- Distinctive: line 200
Homegrown cryptography: never implement your own encryption, hashing, or random number generation.
“Common” is measured: kept by at least 6 in 10 of the 100 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security
Security is a property of every feature: design every endpoint, form, data flow, and integration point with it from the start. Stack-agnostic guidance follows.
OWASP Top 10
Use the OWASP Top 10 as a starting checklist, not a full list. The table follows the 2025 edition (OWASP Top 10:2025). Mapping from the 2021 edition and per-category prevention steps are in the reference.
| # | Vulnerability | What it is | Primary defense | Reference |
| A01 | Broken Access Control | Users act outside intended permissions (includes SSRF) | Deny by default, enforce server-side, allowlist outbound destinations | reference |
| A02 | Security Misconfiguration | Insecure default configs, incomplete setup | Hardened defaults, automated config validation | reference |
| A03 | Software Supply Chain Failures | Compromise of dependencies, build systems, or distribution | Inventory and pin dependencies, verify integrity, secure the pipeline | reference |
| A04 | Cryptographic Failures | Sensitive data exposed due to weak/missing crypto | Use strong algorithms, encrypt in transit and at rest | reference |
| A05 | Injection | Untrusted data sent to interpreter as part of a command/query | Parameterized queries, input validation, output encoding | reference |
| A06 | Insecure Design | Missing or ineffective security controls by design | Threat modeling, secure design patterns | reference |
| A07 | Authentication Failures | Broken authentication/identification | MFA, rate limiting, secure password storage | reference |
| A08 | Software or Data Integrity Failures | Code/data integrity not verified | Signed updates, no unsafe deserialization | reference |
| A09 | Security Logging and Alerting Failures | Attacks go unnoticed for lack of logs and alerts | Log security events, alert on suspicious patterns | reference |
| A10 | Mishandling of Exceptional Conditions | Errors and edge cases handled badly or fail open | Fail closed, roll back partial work, handle every error path | reference |
Related: LLM and agent security. Systems that embed an LLM or run autonomous agents have their own risk lists: the OWASP Top 10 for LLM Applications 2025 and the OWASP Top 10 for Agentic Applications 2026.
Input validation
Input validation is the first line of defense. Validate at every system boundary, not just at the UI.
- Validate on the server: client-side validation is a UX convenience, not a security control
- Allowlist over denylist: define what is acceptable rather than trying to block what is dangerous
- Validate type, length, format, and range: a "name" field should not accept 10MB of data or contain control characters
- Reject unexpected input: fail closed, do not try to "clean" malicious input and proceed
- Canonicalize before validation: normalize Unicode, decode URL encoding, and resolve path traversals before checking
Type coercion:
Loose type comparisons can bypass security checks. A string "0" might equal integer 0 or boolean false depending on the language. Use strict comparison operators and explicit type casting.
Parameterized queries:
Never concatenate user input into SQL, LDAP, or OS commands. Use parameterized queries or prepared statements. This applies to ORMs too, because raw query methods bypass ORM protections. See secure coding reference for details.
Authentication patterns
Authentication verifies identity: "who are you?" See auth patterns reference for detailed guidance.
Password hashing:
- Use bcrypt, scrypt, or Argon2id. Never use MD5, SHA-1, or SHA-256 alone for passwords
- Salts must be unique per password and generated by the hashing library
- Never store plain-text passwords, never use reversible encryption for passwords
- Enforce a minimum length and check against breached-password lists. Avoid composition rules and forced periodic changes (NIST SP 800-63B-4 prohibits both)
Multi-factor authentication (MFA):
- TOTP (time-based one-time passwords) is the baseline
- WebAuthn/passkeys provide the strongest phishing resistance
- SMS-based MFA is better than nothing but vulnerable to SIM swapping
- Provide recovery codes
Session management:
- Generate cryptographically random session IDs with sufficient entropy (128+ bits)
- Set secure cookie attributes:
HttpOnly,Secure,SameSite=Lax(orStrict) - Regenerate session ID after login to prevent session fixation
- Implement absolute and idle timeouts
- Invalidate sessions server-side on logout
Token-based auth (JWT caveats):
- JWTs are not sessions, and they cannot be revoked without extra infrastructure
- Validate the signature algorithm server-side; reject
alg: none - Keep tokens short-lived (minutes, not hours)
- Use refresh tokens for long-lived sessions; store them securely
- Never store sensitive data in JWT payloads. They are base64-encoded, not encrypted
OAuth2 flows:
- Authorization Code with PKCE: standard for web and mobile apps
- Client Credentials: for machine-to-machine communication
- Do not use the Implicit flow. The OAuth 2.0 Security BCP (RFC 9700) says clients should not use it
Authorization patterns
Authorization determines permissions: "what are you allowed to do?" It is not the same as authentication. See auth patterns reference for details.
Principle of least privilege:
- Grant the minimum permissions needed for a task
- Default to deny: grant access explicitly rather than revoking it
- Time-bound elevated privileges when possible
Role-Based Access Control (RBAC):
- Assign permissions to roles, assign roles to users
- Keep roles coarse-grained; avoid role explosion
- Check permissions, not role names, in application code. This decouples authorization logic from role definitions
Attribute-Based Access Control (ABAC):
- Decisions based on attributes of user, resource, action, and environment
- More flexible than RBAC for complex policies (e.g., "managers can approve expenses under $10,000 during business hours")
- More complex, so use it when RBAC is insufficient
Common authorization mistakes:
- Checking authorization only in the UI. Always enforce it server-side
- Relying on obscurity (unguessable URLs) instead of access controls
- Failing to check authorization on every request (including API calls, file downloads, and indirect references)
- IDOR (Insecure Direct Object Reference): always verify the user has access to the specific resource they are requesting
Data protection
Encryption at rest:
- Encrypt sensitive data stored in databases, files, and backups (backups included)
- Use AES-256 or equivalent for symmetric encryption
- Manage encryption keys separately from encrypted data
- Rotate encryption keys on a schedule and when compromise is suspected
Encryption in transit:
- Use TLS 1.2+ for all network communication
- Disable older protocols (SSL, TLS 1.0, TLS 1.1)
- Validate certificates; do not disable certificate verification
PII handling:
- Identify and classify all personally identifiable information
- Minimize collection: do not collect data you do not need
- Implement data retention policies and delete data when it is no longer needed
- Provide data export and deletion capabilities for compliance (GDPR, CCPA)
- Mask PII in logs. Never log passwords, tokens, credit card numbers, or full SSNs
Secure deletion:
- Overwrite sensitive data before freeing memory (when the language allows)
- Make sure database deletions actually remove data (not just soft-delete for sensitive records)
- Consider backup retention: deleted data may persist in backups
Secrets management
Never in code or config files:
- No API keys, passwords, or tokens in source code, config files, or environment-specific files committed to version control
- Use
.gitignorefor local config files, but do not rely on it as your only protection - Scan repositories for accidentally committed secrets (use tools like git-secrets, truffleHog, or Gitleaks)
Environment variables:
- Acceptable for simple deployments but have limitations
- They are visible to all processes in the same environment
- They appear in process listings and crash dumps
- Better than hardcoding, but not the strongest option
Secret managers:
- Use dedicated secret managers (HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, GCP Secret Manager)
- Access secrets at runtime, not build time
- Audit access to secrets
Rotation strategy:
- Rotate secrets on a regular schedule
- Rotate immediately if compromise is suspected
- Design systems to support rotation without downtime (support two active versions during transition)
- Automate rotation where possible
Security headers
Set 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):
- Do not use
Access-Control-Allow-Origin: *for authenticated endpoints - Allowlist specific origins
- Be restrictive with
Access-Control-Allow-MethodsandAccess-Control-Allow-Headers - Remember that browsers enforce CORS. It does not protect server-to-server calls
Common antipatterns
These mistakes show up often and create vulnerabilities:
- Security through obscurity: hiding URLs, using unpredictable IDs, or obfuscating code is not a security control. It supplements real controls and never replaces them.
- Homegrown cryptography: never implement your own encryption, hashing, or random number generation. Use well-tested libraries.
- Storing secrets in repositories: even in "private" repos, secrets in code spread through forks, CI systems, and developer machines.
- Disabling security features for convenience: turning off CSRF protection, SSL verification, or authentication in a "development" mode that leaks to production.
- Trusting internal networks: zero-trust means verifying identity and authorization even for internal service-to-service calls.
- Ignoring dependency vulnerabilities: known vulnerabilities in dependencies are among the easiest attack vectors. Scan and update regularly.
- Catching and silencing exceptions: swallowing errors hides security failures. Log them (without sensitive details) and fail safely.
Other controls
Items to check in review that are not covered above:
- Output is encoded or escaped for its context (HTML, URL, JavaScript, SQL)
- File uploads validate type, size, and content, and are stored outside the web root
- Rate limiting on login endpoints, plus account lockout or progressive delays after failed attempts
- Admin functions are protected and not reachable by URL guessing
- Debug mode is disabled in production, and error messages do not leak internal details to clients
- Security events are logged (login failures, authorization denials, input validation failures), alerts exist for suspicious patterns, logs are protected from tampering
- An incident response plan is documented
Other versions122 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 122
- BuilderIO/agent-native★ 7.4ksame name
- parcadei/Continuous-Claude★ 3.9ksame name
- parcadei/Continuous-Claude-v2★ 3.9ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- gridaco/grida★ 2.7ksame name
- static-web-server/static-web-server★ 2.4ksame name
- BankrBot/skills★ 1.2ksame name
- BankrBot/openclaw-skills★ 1.2ksame name
- alinaqi/maggy★ 711same name
- alinaqi/claude-bootstrap★ 708same name
112 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use cost-reducer, albert-dm and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
huyvpSkillcost-reducer
Reduce cloud, infrastructure, and operational costs while maintaining performance. Use when writing database queries, configuring cloud resources, optimizing bundles, setting up caching, choosing between services, sizing instances, configuring CDN, managing storage, or reviewing code for cost inefficiencies. Covers AWS/GCP/Vercel pricing, database optimization, serverless tuning, image pipelines, observability costs, and FinOps practices.
Also in 12 projects that use this
vikneshwaran16032005-altSkillalbert-dm
Reply to DMs and messages the way Albert would. Use when the user asks "how would Albert reply to this", pastes a conversation and wants an Albert-style response, or asks you to draft/write a DM in Albert's voice. Albert sells AI voice agents / automations to local service businesses (Go High Level, lead follow-up, bookings).
Also in 6 projects that use this
vikneshwaran16032005-altSkillnew-client-system
Scaffold a new client's full stack — Next.js 16 frontend dashboard + Trigger.dev backend worker — from the Shiney automations template. Use when the user says "new client", "onboard a client", "scaffold a client system", "set up <client-name>", or wants to start a fresh frontend+backend project styled and structured like the Shiney automations dashboard. Produces structure only; no automations are scaffolded — those are added later.
Also in 6 projects that use this
ffsshhttiikkSkillscalability
Core foundational concepts and principles for Scalability
Also in 11 projects that use this
xfstudioSkilltrigger-dev
Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.
Also in 11 projects that use this
xfstudioSkillcustomer-support
Elite AI-powered customer support specialist mastering
Also in 12 projects that use this
- +4 more from vikneshwaran16032005-alt
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llm-evalsSkill
- llm-observabilitySkill
- accessibilitySkill
- context-engineeringSkill
- debuggingSkill
- docs-lookupSkill
- performanceSkill
- verification-before-completionSkill
- finishing-branchSkill
- game-feature-loopSkill
- handoffSkill
- hooks-and-guardrailsSkill
- pr-feedbackSkill
- security-researchSkill
- spec-driven-developmentSkill
- tddSkill
- agent-creatorSkill
- agentic-rules-writerSkill
- audit-dependenciesSkill
- brainstormingSkill
- communication-styleSkill
- find-test-gapsSkill
- plan-migrationSkill
- plugin-creatorSkill
- pr-message-writerSkill
- report-writerSkill
- researchSkill
- review-pr-coldSkill
- review-prSkill
- scan-refactorsSkill
- skill-creatorSkill
- skill-measureSkill
- stakeholder-update-writerSkill
- ticket-writerSkill
- ui-reviewSkill
- verify-acceptanceSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

