security-hardening
Skill0 starsChanged 4 months agoMITView on GitHub
Apply security-first practices when building or reviewing code — input validation, secrets management, auth checks, OWASP Top 10 coverage. Triggered by "security review", "harden this", "is this secure", "security-hardening", "check for vulnerabilities", "audit my code", "run a security check", "is there anything unsafe here", "check for SQL injection", "check for XSS", "are there any security issues".
- Reads credentials
19 other projects use a version of this.
Adopted by
Most recently taken up by
- juanitourquiza/shipframetheir own version, first seen Oct 1, 2026
- wulaosiji/skillstheir own version, first seen Sep 9, 2026
- khuynh22/agent-dev-teamtheir own version, first seen Aug 31, 2026
- Kin9Zeus/senior-engineer-skillstheir own version, first seen Aug 24, 2026
- alyanhaider/system-architecturetheir own version, first seen Jun 19, 2026
- roanbrasil/engineer-grade-agent-skillstheir own version, first seen Jun 17, 2026
Used with
Projects with it also use websocket-realtime, rust-systems and 5 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.
rohitg00Skillwebsocket-realtime
Real-time communication patterns with WebSocket, Socket.io, Server-Sent Events, and scaling strategies
Also in 3 projects that use this
rohitg00Skillrust-systems
Rust systems programming patterns including ownership, traits, async runtime, error handling, and unsafe guidelines
Also in 3 projects that use this
dylantarreSkillperformance-optimization
Use when animation runs slow, janky, or causes frame drops
Also in 5 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 3 projects that use this
- +2 more from rohitg00
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- rohitg00/awesome-claude-code-toolkit★ 2.7ksame name
- swyxio/skills★ 171same name
- bolivian-peru/os-moda★ 118same name
- DevelopersGlobal/ai-agent-skills★ 69same name
- mn-youssef/security-skills★ 47same name
- wulaosiji/skills★ 28same name
- khuynh22/agent-dev-team★ 9same name
- roanbrasil/engineer-grade-agent-skills★ 8same name
- jx1100370217/my-openclaw-skills★ 4same name
- FutureJJ/claude-skills★ 3same name
9 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.
In this repository21 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- ci-cd-pipelineSkill
- requirements-synthesisSkill
- spec-driven-developmentSkill
- workflow-from-chatsSkill
- architecture-decision-recordsSkill
- commit-history-auditSkill
- commit-messageSkill
- deslopSkill
- document-thisSkill
- env-drift-checkSkill
- handoffSkill
- minimal-diff-reviewSkill
- onboardingSkill
- pre-commit-checkSkill
- pr-review-canvasSkill
- pr-summarySkill
- release-readinessSkill
- requirements-qaSkill
- sync-docs-after-editSkill
- write-changelogSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
7
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 52
Commit secrets, tokens, or credentials to version control — even in test files
- Very specific: line 56
Use eval(), exec(), or equivalents on user input
- Distinctive: line 65
Before reviewing or writing code, map:
- Distinctive: line 106
Run this before any production deployment:
- Distinctive: line 156
Never mark a HIGH finding as acceptable without explicit user confirmation.
- Distinctive: line 157
Never add a dependency to fix a security issue without verifying the dependency itself is not a bigger risk.
- Distinctive: line 158
If a security fix requires a design change (e.g.
- Distinctive: line 159
Do not remove or disable security linting rules to make CI pass.
- Very specific: line 162
If npm audit / pip-audit isn't installed or can't run (offline, no lockfile), report that check as SKIP with the reason — never silently …
“Common” is measured: kept by at least 6 in 10 of the 16 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
🛡️ Skill: security-hardening
Purpose
Security retrofitted after the fact costs 10× more than security built in. This skill applies a consistent security lens at write-time and review-time — not as an afterthought audit. It covers the OWASP Top 10 patterns that appear most frequently in real deliverables.
Trigger phrases
- "security review"
- "harden this"
- "is this secure"
- "security-hardening"
- "check for vulnerabilities"
- "review this for security issues"
Boundary system (apply at all times)
Always do — no exceptions
| Rule | Example |
| Validate all external input at the system boundary | zod.parse(req.body) before any business logic |
| Parameterize all DB queries — never concatenate user input into SQL | db.query('SELECT * FROM users WHERE id = $1', [id]) |
| Hash passwords with a slow algorithm | bcrypt, argon2 — never MD5, SHA-1, or plain SHA-256 |
| Use environment variables for all secrets | process.env.API_KEY — never hardcoded strings |
| Set security headers | Content-Security-Policy, X-Frame-Options, X-Content-Type-Options |
| Enforce HTTPS | Redirect HTTP → HTTPS; set Secure flag on cookies |
Ask first — requires human approval
- Any change to authentication or session management
- New endpoints that accept file uploads
- New third-party integrations that receive user data
- Any change to user roles or permission logic
- Storing a new category of sensitive data (PII, payment, health)
Never do
- Commit secrets, tokens, or credentials to version control — even in test files
- Log passwords, tokens, or PII to stdout/files
- Trust client-side validation as a security boundary
- Expose raw stack traces or internal error details to end users
- Use
eval(),exec(), or equivalents on user input - Disable security linting rules to make CI pass
Steps
1. Identify the attack surface
Before reviewing or writing code, map:
- What inputs does this code accept? (HTTP request, file upload, env var, DB read, IPC)
- What does it output? (HTTP response, DB write, file write, shell command)
- What trust boundaries does it cross?
2. Check OWASP Top 10 coverage
Work through the relevant categories for the code in scope:
| # | Category | What to check |
| A01 | Broken Access Control | Every endpoint checks auth AND authorisation (not just "is logged in") |
| A02 | Cryptographic Failures | No sensitive data transmitted unencrypted; no weak algorithms |
| A03 | Injection | All SQL/shell/LDAP inputs parameterised; no string concatenation with user input |
| A04 | Insecure Design | Business logic can't be bypassed by manipulating request params |
| A05 | Security Misconfiguration | No default credentials; debug mode off in production; minimal permissions |
| A06 | Vulnerable Components | npm audit / pip-audit run; high/critical findings resolved |
| A07 | Auth Failures | Sessions expire; tokens invalidated on logout; no weak password rules |
| A08 | Software/Data Integrity | Dependencies pinned; no unverified third-party scripts |
| A09 | Logging Failures | Security events logged (login, auth failure, permission denied) — without logging the secret itself |
| A10 | SSRF | Outbound HTTP calls validated against an allowlist; no user-controlled URLs fetched server-side without validation |
3. Flag findings with severity
For each issue found:
[HIGH] SQL injection risk — user input concatenated into query at api/users.ts:42
[MEDIUM] Missing authorisation check — any authenticated user can access /admin/export
[LOW] Security header X-Frame-Options not set in middleware
[INFO] bcrypt work factor is 10 — consider 12 for new deploymentsSeverity guide:
- HIGH — exploitable by an unauthenticated user or directly exposes data
- MEDIUM — exploitable by an authenticated user or requires specific conditions
- LOW — defence-in-depth gap, not directly exploitable
- INFO — best-practice recommendation, no immediate risk
4. Pre-deployment security checklist
Run this before any production deployment:
Authentication & Sessions
[ ] Passwords hashed with bcrypt/argon2 (work factor ≥ 12)
[ ] Session tokens expire and are invalidated on logout
[ ] MFA available for admin accounts
Authorisation
[ ] Every endpoint checks both authentication AND authorisation
[ ] No IDOR — IDs in requests are validated as belonging to the requesting user
Input Validation
[ ] All external input validated at the boundary (schema validation)
[ ] File uploads: type checked, size limited, stored outside web root
Data Protection
[ ] No secrets in code, config files, or logs
[ ] PII encrypted at rest if stored
[ ] HTTPS enforced; HSTS header set
Dependencies
[ ] npm audit / pip-audit run with zero high/critical findings
[ ] No packages with known critical CVEs
Infrastructure
[ ] Debug mode / verbose errors disabled in production
[ ] Minimal IAM permissions (least privilege)
[ ] No default credentials on any service5. Report
Security review: <filename or scope>
Findings:
[HIGH] <description> — <file>:<line>
[MEDIUM] <description> — <file>:<line>
[LOW] <description> — <file>:<line>
Pre-deployment checklist: ✓ / ✗ (list failed items)
Recommendation: <fix HIGH findings before merging / safe to merge with noted caveats>Guardrails
- Never mark a HIGH finding as acceptable without explicit user confirmation.
- Never add a dependency to fix a security issue without verifying the dependency itself is not a bigger risk.
- If a security fix requires a design change (e.g. the entire auth model is wrong), surface it as a separate task — do not silently work around it.
- Do not remove or disable security linting rules to make CI pass.
Gotchas
- If
npm audit/pip-auditisn't installed or can't run (offline, no lockfile), report that check as SKIP with the reason — never silently drop it from the report as if it passed. - Applying the OWASP checklist to test fixtures, seed data, or sample/demo code as if it were production surfaces false HIGH findings (hardcoded test credentials are often intentional) — confirm the scope is actually production-reachable code before flagging.
- A parameterized query still isn't safe if the table or column name itself is built from user input — parameter binding only protects values, not identifiers; check for string-built identifiers separately under A03.
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.

