/appsec:hardenfrom appsec
Proactively identifies security hardening opportunities: missing headers, weak input validation, absent rate limiting, and defense-in-depth gaps. Supports configurable depth levels and generates hardening scorecards.
Ships in appsec. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Proactive security improvement suggestions. Unlike vulnerability scanners that find what is broken, this skill identifies what could be better -- defense-in-depth measures, missing security headers, insufficient input validation, absent rate limiting, and other hardening opportunities that reduce the blast radius of future vulnerabilities.
Read ../../shared/schemas/flags.md for the full flag specification.
| Flag | Hardening Behavior |
|---|---|
--scope | Default changed. Use full for comprehensive hardening review. |
--depth quick | Check for missing security headers and obvious hardening gaps only. |
--depth standard | Full hardening review: headers, validation, logging, error handling, configuration. |
--depth deep | Standard + analyze middleware chains, review all trust boundaries, check defense layering. |
--depth expert | Deep + compare against security benchmarks (CIS, OWASP ASVS), generate hardening scorecard. |
--severity | Filter suggestions by impact level. |
--format | Default text. Use md for a hardening checklist document. |
Scan the codebase to determine:
Verify the application sets these HTTP response headers (or that a reverse proxy / CDN handles them):
| Header | Recommended Value | Impact |
|---|---|---|
Content-Security-Policy | Strict policy, no unsafe-inline / unsafe-eval | Mitigates XSS |
Strict-Transport-Security | max-age=31536000; includeSubDomains; preload | Enforces HTTPS |
X-Content-Type-Options | nosniff | Prevents MIME sniffing |
X-Frame-Options | DENY or SAMEORIGIN | Prevents clickjacking |
Referrer-Policy | strict-origin-when-cross-origin or stricter | Limits referrer leakage |
Permissions-Policy | Disable unused browser features | Reduces attack surface |
Cross-Origin-Opener-Policy | same-origin | Prevents cross-origin attacks |
Cross-Origin-Resource-Policy | same-origin | Controls resource sharing |
Cache-Control | no-store for sensitive responses | Prevents cache leaks |
Note: If a reverse proxy config (nginx.conf, etc.) is present and sets these headers, do not flag them as missing from application code.
Check for overly permissive CORS settings:
Access-Control-Allow-Origin: * on authenticated endpoints.Origin header without validation.Access-Control-Allow-Credentials: true with wildcard origins.Vary: Origin when origin is dynamic.For each entry point discovered (or in scope):
Identify endpoints that should have rate limiting:
Check if rate limiting is implemented and whether limits are reasonable.
Check that these security-relevant events are logged:
Verify logs do NOT contain: passwords, tokens, credit card numbers, SSNs, or other sensitive data.
npm audit / pip audit / equivalent run in CI?Output hardening suggestions grouped by category.
Hardening suggestions are advisory and use a lighter format than vulnerability findings.
## Security Hardening Report
### Summary
- Hardening suggestions: N
- By priority: N HIGH, N MEDIUM, N LOW
- Categories covered: headers, cors, validation, rate-limiting, logging, error-handling, config
### HIGH Priority
#### [H-001] Missing Content-Security-Policy header
**Category**: Headers | **Effort**: Low
**Location**: src/middleware/security.ts
**Current**: No CSP header set
**Recommended**: Add strict CSP via helmet
```js
app.use(helmet.contentSecurityPolicy({
directives: {
defaultSrc: ["'self'"],
scriptSrc: ["'self'"],
styleSrc: ["'self'", "'unsafe-inline'"],
imgSrc: ["'self'", "data:"],
}
}));
...
...
When hardening gaps represent actual vulnerabilities (e.g., CORS misconfiguration allowing credential theft), emit a formal finding using `../../shared/schemas/findings.md`.
Finding ID prefix: **HARD** (e.g., `HARD-001`).
- `metadata.tool`: `"harden"`
- `references.cwe`: Varies by suggestion (e.g., `CWE-693` Protection Mechanism Failure, `CWE-16` Configuration)
## Pragmatism Notes
- Hardening is contextual. An internal admin tool has different requirements than a public API.
- Do not recommend CSP for a CLI tool or rate limiting for a batch job.
- If a CDN or reverse proxy handles headers, note that rather than flagging missing headers in app code.
- Prioritize suggestions that are easy to implement with high security impact.
- Acknowledge when existing security measures are already good. Not every review needs findings.
- Some frameworks (Next.js, Rails) include secure defaults. Credit what is already done well.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub florianbuetow/claude-code --plugin appsec62 skills in this plugin
/access-controlThis skill should be used when the user asks to "check for access control issues", "analyze authorization", "find IDOR vulnerabilities", "audit CORS configuration", "check for privilege escalation", or mentions "access control", "authorization", "IDOR", "CORS", "JWT tampering", or "directory traversal" in a security context. Maps to OWASP Top 10 2021 A01: Broken Access Control.
/apiThis skill should be used when the user asks to "check API security", "audit REST API", "find BOLA vulnerabilities", "check for mass assignment", "analyze API rate limiting", "detect excessive data exposure", or mentions "API security", "BOLA", "IDOR", "mass assignment", "rate limiting", "broken function-level authorization", "excessive data exposure", or "OWASP API Top 10" in a security context.
/attack-surfaceThis skill should be used when the user asks to "map attack surface", "list entry points", "inventory API endpoints", "find all inputs", "enumerate routes", "discover exposed endpoints", or "map external interfaces". Also triggers when the user asks about exposed APIs, form handlers, file upload endpoints, WebSocket handlers, CLI argument parsers, or wants to understand where external data enters the system.
/authThis skill should be used when the user asks to "check for authentication issues", "analyze auth", "find credential vulnerabilities", "review login security", "check session management", or mentions "authentication", "passwords", "MFA", "sessions", or "brute force" in a security context. Maps to OWASP Top 10 2021 A07: Identification and Authentication Failures.
/business-logicThis skill should be used when the user asks to "check business logic security", "find logic flaws", "audit workflow security", "check for coupon abuse", "detect negative amount exploits", "analyze state machine security", or mentions "business logic", "workflow bypass", "negative amount", "coupon abuse", "self-referral", "state manipulation", or "time-based exploit" in a security context.
/configThis skill should be used when the user asks to "configure security", "appsec settings", "security preferences", or invokes /appsec:config. Manages security tool preferences and thresholds.
Other plugins' skills for the same job