/appsec:fixfrom appsec
Generates production-ready code fixes for security vulnerabilities from findings, user-specified file:line, or descriptions. Supports flags for scope, depth, severity, and format.
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.
Generate concrete, production-ready code fixes for security findings. This is not an advisory skill -- it produces actual code changes that resolve vulnerabilities and offers to apply them via the Edit tool.
Read ../../shared/schemas/flags.md for the full flag specification.
| Flag | Fix Behavior |
|---|---|
--scope | Identifies which findings to fix. file:<path> fixes findings in that file. Default: all unfixed findings in --scope changed. |
--depth quick | Generate minimal fix (single-line change, no refactoring). |
--depth standard | Fix with surrounding improvements (add validation, improve error handling). |
--depth deep | Standard + refactor surrounding code to prevent similar issues, add defensive checks. |
--depth expert | Deep + generate regression test, add security comments, update related code paths. |
--severity | Only fix findings at or above this severity. |
--format | Default text. Use json to output fix objects matching findings schema. |
Resolve what to fix from user input. Accept any of these forms:
INJ-001. Read from .appsec/findings.json to load the finding.src/db/queries.ts:45. Scan findings for a match, or analyze the location directly.If no findings exist in .appsec/findings.json, analyze the target location directly to identify the vulnerability before generating a fix.
For each finding to fix:
Choose the most appropriate fix strategy based on the vulnerability type:
| Vulnerability | Preferred Fix Strategy |
|---|---|
| SQL Injection (CWE-89) | Parameterized queries / prepared statements |
| XSS (CWE-79) | Context-aware output encoding, CSP headers |
| Command Injection (CWE-78) | Allowlist validation, avoid shell execution, use library APIs |
| Path Traversal (CWE-22) | Canonicalize + validate against base directory |
| SSRF (CWE-918) | URL allowlist, disable redirects, validate scheme/host |
| Insecure Deserialization (CWE-502) | Type-safe deserialization, allowlisted classes |
| Hardcoded Secrets (CWE-798) | Environment variables or secret manager references |
| Missing Auth (CWE-306) | Add authentication middleware/decorator |
| Broken Access Control (CWE-862) | Add authorization check before resource access |
| Weak Crypto (CWE-327) | Replace with current recommended algorithm |
| Open Redirect (CWE-601) | Validate redirect target against allowlist |
| Race Condition (CWE-362) | Add locking, use atomic operations |
Produce a concrete code change:
--depth deep or expert).Before presenting:
Present the fix to the user:
## Fix: <Finding ID> - <Title>
**Severity**: <severity> | **CWE**: <CWE-ID> | **File**: <path>
### Root Cause
<1-2 sentence explanation>
### Fix
<description of what the fix does>
```diff
- <old code>
+ <new code>
<import statement><package> (run <install command>)
Then ask: "Apply this fix?" If the user confirms (or `--fix` flag was passed from a parent skill), use the Edit tool to apply the change.
### Step 7: Update Finding Record
After applying a fix:
1. Update the finding in `.appsec/findings.json` with status `fix-applied`.
2. Add `fix.applied_at` timestamp and `fix.diff` with the actual change made.
3. Inform the user to run `/appsec:verify` to confirm the fix resolves the issue.
## Output Format
Findings follow `../../shared/schemas/findings.md`. When outputting fixes:
- `fix.summary`: One-line description of the fix.
- `fix.diff`: Unified diff of the change.
- `metadata.tool`: `"fix"`
Finding ID prefix: **FIX** (e.g., `FIX-001`) for new findings discovered during fix analysis. Fixes to existing findings retain the original finding ID.
## Pragmatism Notes
- Prefer the simplest correct fix. A one-line parameterized query beats a custom sanitization function.
- If a framework provides a built-in security mechanism, use it rather than hand-rolling.
- When multiple fix strategies exist, prefer the one already used elsewhere in the codebase for consistency.
- If the fix requires an architectural change beyond a single file, describe the full change but only apply the immediate file-level fix. Note the broader change needed.
- Never generate fixes that simply suppress warnings or disable security features.
- If unsure about a fix's correctness, present it with caveats rather than applying silently.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
security-fix, vulnerability-remediation, code-fix, appsec, finding-fix
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.
/Other plugins' skills for the same job