Help us improve
Share bugs, ideas, or general feedback.
From hb
Applies proactive security hardening at trust boundaries: input validation, auth, sensitive data, external APIs, file uploads. Includes OWASP Top 10 quick reference and a three-tier boundary system.
npx claudepluginhub helderberto/agent-skills --plugin hbHow this skill is triggered — by the user, by Claude, or both
Slash command
/hb:hardenThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Security as a constraint on every line that touches user data, auth, or external systems. This skill is **proactive**: applied during implementation, not after. For reactive scans, use `safe-repo` (sensitive data) or `deps-audit` (CVEs).
Hardens code against vulnerabilities with OWASP Top 10 prevention patterns. Validates input, parameterizes queries, sets security headers, and enforces authentication best practices.
Enforces secure coding practices: trust boundaries, input validation, injection/SQL/command prevention, secrets management, output encoding, authorization, safe errors.
Use when writing code that processes user input, manages authentication or authorization, constructs database queries, handles file operations, interacts with external data, exposes API endpoints, or manages secrets - any code that crosses a trust boundary
Share bugs, ideas, or general feedback.
Security as a constraint on every line that touches user data, auth, or external systems. This skill is proactive: applied during implementation, not after. For reactive scans, use safe-repo (sensitive data) or deps-audit (CVEs).
httpOnly, secure, sameSiteeval() or innerHTML with user-provided data| Risk | Mitigation |
|---|---|
| Injection (SQL/NoSQL/OS) | Parameterized queries; ORM with bound params; never concat user input |
| Broken authentication | bcrypt/argon2 hashing; httpOnly+secure+sameSite cookies; rate-limit auth endpoints |
| XSS | Framework auto-escape; sanitize with DOMPurify if HTML is unavoidable |
| Broken access control | Check authorization on EVERY endpoint; verify ownership, not just authentication |
| Misconfiguration | helmet for headers; CORS restricted to known origins via env var |
| Sensitive data exposure | Strip sensitive fields before API response; env vars for secrets |
| Insufficient logging | Log auth failures, access denials, input rejections |
| SSRF | Allowlist outbound destinations; never fetch user-provided URLs without validation |
Always validate at the system boundary (route handler, message consumer), not in business logic:
mimetype)npm audit / CVE findingsCritical or High severity?
├── Vulnerable code reachable in your app?
│ ├── YES → Fix immediately
│ └── NO (dev-only, unused path) → Fix soon, not a blocker
└── Fix available?
├── YES → Update to patched version
└── NO → Workaround / replace dep / allowlist with review date
Defer with documented reason and review date. Never silent allowlist.
.env.example → committed (template, placeholder values)
.env → NOT committed (real secrets)
.env.local → NOT committed (local overrides)
*.pem, *.key → NOT committed
Pre-commit check: git diff --cached | grep -iE "password|secret|api_key|token". Better: safe-repo --diff as part of ship.
*) or no CORS configAfter implementing security-relevant code, confirm:
deps-audit shows no critical or high CVEs (or each is documented with review date)safe-repo --diff cleancurl -I)| Rationalization | Reality |
|---|---|
| "Internal tool, security doesn't matter" | Internal tools get compromised; attackers target the weakest link |
| "We'll add security later" | Retrofitting is 10x harder than building it in |
| "No one would exploit this" | Automated scanners will; security-by-obscurity is not security |
| "Framework handles security" | Frameworks provide tools, not guarantees |
| "It's a prototype" | Prototypes become production; habits compound |