一键导入
security-hardening
Applies OWASP Top 10, secrets management, and least-privilege principles before any code ships. Security is a build step, not an afterthought.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Applies OWASP Top 10, secrets management, and least-privilege principles before any code ships. Security is a build step, not an afterthought.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Automated quality gates from commit to production. Every merge to main is potentially shippable. No manual steps in the deployment path.
Document decisions, not just implementations. ADRs for architectural choices, inline docs for non-obvious code, and runbooks for operational knowledge.
Graceful degradation and meaningful error messages. Errors are first-class citizens, not afterthoughts. Every error path is designed, not discovered.
Test real system boundaries, not mocks of mocks. Integration tests verify that components work together, not that they work in isolation.
Converts unstructured meeting notes into structured, assigned, time-bounded action items. Never leave a meeting without knowing who does what by when.
Safe, behavior-preserving code transformation backed by tests. Refactor with evidence, not instinct.
| name | security-hardening |
| description | Applies OWASP Top 10, secrets management, and least-privilege principles before any code ships. Security is a build step, not an afterthought. |
| category | harden |
| applies-to | ["claude","gemini","cursor","copilot","any"] |
| version | 1.0.0 |
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).
Verify: You can name at least one realistic attack scenario for this code.
| 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.
.gitignore and use pre-commit hooks).Verify: git grep -i 'password\|secret\|key\|token' returns no hardcoded values in code.
Verify: All external input has explicit validation with reject-by-default behavior.
Verify: List every permission granted by this code. Is each one required?
| 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. |
git grep clean)