security-hardening
Skill216 starsChanged 6 months agoMITView on GitHub
Applies OWASP Top 10, secrets management, and least-privilege principles before any code ships. Security is a build step, not an afterthought.
We split this skill into the rules it gives an agent
9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 20 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Before any code involving user input
- Distinctive: line 16
Before any code touching authentication, authorization, or sessions
- Distinctive: line 17
Before any API endpoint is created or modified
- Distinctive: line 18
Before any code that handles secrets, credentials, or PII
- Distinctive: line 19
Before any code that makes outbound network requests
- Distinctive: line 25
Ask: *Who are the attackers?
- Distinctive: line 64
Every piece of external input is validated:
- Distinctive: line 71
Verify: All external input has explicit validation with reject-by-default behavior.
- Distinctive: line 78
Default deny — access must be explicitly granted, not implicitly inherited.
“Common” is measured: kept by at least 6 in 10 of the 20 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
Overview
Security vulnerabilities are almost always cheaper to prevent than to remediate. This skill embeds security review as a required gate in the development workflow — not a separate audit that happens later (and often never).
When to Use
- Before any code involving user input
- Before any code touching authentication, authorization, or sessions
- Before any API endpoint is created or modified
- Before any code that handles secrets, credentials, or PII
- Before any code that makes outbound network requests
Process
Step 1: Threat Model the Change
- Ask: Who are the attackers? What are they trying to achieve?
- Identify all trust boundaries in the code:
- Where does user-controlled data enter the system?
- Where does that data flow?
- Where is it stored or transmitted?
- For each trust boundary, name the top 3 attack vectors.
Verify: You can name at least one realistic attack scenario for this code.
Step 2: Apply OWASP Top 10 Checklist
- For each applicable item, confirm it is addressed:
| OWASP Item | Check |
| A01 Broken Access Control | Authorization checked at every endpoint? Principle of least privilege applied? |
| A02 Cryptographic Failures | No plaintext PII/secrets? Using modern algorithms (AES-256, SHA-256+)? TLS everywhere? |
| A03 Injection | All user input parameterized/sanitized? No raw SQL/shell construction? |
| A04 Insecure Design | Threat model done? Secure defaults? Fail closed (not open)? |
| A05 Security Misconfiguration | No default credentials? Unnecessary features disabled? Error messages don't leak internals? |
| A06 Vulnerable Components | Dependencies up to date? Known CVEs checked? |
| A07 Auth Failures | Brute-force protection? Session management correct? MFA available? |
| A08 Software Integrity | Dependencies verified? Supply chain integrity? |
| A09 Logging Failures | Security events logged? No secrets in logs? Logs protected from tampering? |
| A10 SSRF | Outbound requests validated? Internal IPs blocked from user-controlled URLs? |
Verify: Each applicable item is either addressed or explicitly accepted as a known risk.
Step 3: Secrets Management
- No hardcoded secrets — ever. Not even in dev/test code.
- Secrets are stored in: environment variables, secrets manager (Vault, AWS Secrets Manager, etc.), or encrypted config.
- Secrets are never logged, printed, or included in error messages.
- Secrets are never committed to git (check
.gitignoreand use pre-commit hooks).
Verify: git grep -i 'password\|secret\|key\|token' returns no hardcoded values in code.
Step 4: Input Validation
- Every piece of external input is validated:
- Type check
- Length/size limits
- Allowlist of expected values (not blocklist)
- Reject and log unexpected input — never silently ignore
- User-controlled data is never concatenated into SQL, shell commands, HTML, or file paths without proper escaping/parameterization.
Verify: All external input has explicit validation with reject-by-default behavior.
Step 5: Least Privilege
- Database connections use the minimum required permissions.
- API tokens have the minimum required scopes.
- Service accounts cannot access resources they don't need.
- Default deny — access must be explicitly granted, not implicitly inherited.
Verify: List every permission granted by this code. Is each one required?
Common Rationalizations (and Rebuttals)
| Excuse | Rebuttal |
| "It's internal only" | Internal services get breached too. Zero-trust applies internally. |
| "We'll add auth later" | Auth bolted on later is always broken. Design it in from the start. |
| "The input is from our own frontend" | Attackers don't use your frontend. Validate on the server, always. |
| "It's a dev environment" | Dev environments get credentials from prod. Treat them accordingly. |
| "The secret is in a config file, not code" | Is the config file in git? Is it world-readable? Config files are not safe. |
Red Flags
- User input directly interpolated into queries or commands
- Authentication middleware that can be bypassed
- Error messages that include stack traces or SQL queries
- API keys or passwords in source code or comments
- Missing authorization check on any endpoint
- HTTP used instead of HTTPS for any sensitive data
Verification
- OWASP Top 10 checklist reviewed for applicable items
- No hardcoded secrets (
git grepclean) - All external input validated (type, length, allowlist)
- No raw SQL/shell from user input
- Least privilege applied to all credentials
- Security events are logged (but secrets are not)
- Dependency vulnerabilities checked
References
- OWASP Top 10
- prompt-injection-defense skill
- references/security-checklist.md
Other versions23 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 23
- duyet/clickhouse-monitoring★ 303same name
- swyxio/skills★ 189same name
- mn-youssef/security-skills★ 47same name
- wulaosiji/skills★ 28same name
- khuynh22/agent-dev-team★ 9same name
- alexderz/agentic-toolbox★ 5same name
- juanitourquiza/shipframe★ 4same name
- jx1100370217/my-openclaw-skills★ 4same name
- thejordanleopold/claude-code-skills-distilled★ 4same name
- Kin9Zeus/senior-engineer-skills★ 3same name
13 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 coordinate, incident-response and 3 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.
swyxioSkillcoordinate
Coordinate focused Luna helpers for bounded work and Astra advisers for difficult design questions while doing the main work yourself.
Also in 3 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 4 projects that use this
shanggqmSkilldata-analysis
数据分析技能,提供结构化的数据查询、统计分析和报告生成工作流。当用户需要查询数据库、进行数据统计分析、生成分析报告时使用。按规范输出原始数据、计算结果、Markdown报告和HTML可视化报告。
Also in 3 projects that use this
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 5 projects that use this
GoogleSkilldomain-modeling
Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
Also in 3 projects that use this
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-qa-run-reviewSkill
- ai-output-validationSkill
- api-designSkill
- ci-cd-pipelinesSkill
- citruscoastaiSkill
- code-explanationSkill
- code-reviewSkill
- context-loadingSkill
- debugging-methodologySkill
- documentationSkill
- error-handlingSkill
- frontend-engineeringSkill
- git-workflowSkill
- goal-driven-executionSkill
- hallucination-preventionSkill
- idea-to-specSkill
- incremental-codingSkill
- integration-testingSkill
- meeting-notes-to-tasksSkill
- multi-agent-orchestrationSkill
- observabilitySkill
- performance-optimizationSkill
- production-deploymentSkill
- prompt-injection-defenseSkill
- rag-and-memorySkill
- refactoringSkill
- research-and-summarizeSkill
- simplicity-firstSkill
- surgical-changesSkill
- task-decompositionSkill
- test-driven-developmentSkill
- think-before-codingSkill
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.

