Security Fix
Remediate one finding from .security/triaged.json or .security/report.md.
Step 1: Load Finding
Read .security/triaged.json. If it does not exist, tell the user to run /security:scan first.
Resolve $ARGUMENTS as:
- exact finding ID, e.g.
finding-003
- CWE plus file/line, e.g.
CWE-89 src/db.py:42
- if omitted, ask the user to select from CRITICAL/HIGH
TRUE_POSITIVE findings.
If the finding verdict is FALSE_POSITIVE, stop and suggest suppressing it with /security:scan --suppress <id>.
Step 2: Load Remediation Skill
Route by CWE/category:
| CWE/category |
Skill |
| CWE-78, CWE-79, CWE-89, injection, XSS |
remediation-injection |
| CWE-798, CWE-287, CWE-502, auth, authorization, deserialization |
remediation-auth |
| CWE-327, CWE-330, TLS, crypto, randomness |
remediation-crypto |
| CWE-22, CWE-489, headers, deployment, config |
remediation-config |
| Other |
remediation-library |
Use the selected remediation skill for the fix pattern.
Step 3: Inspect Minimal Context
Read the affected file around the finding and only nearby helper code needed to make a safe edit. Do not broaden into unrelated security work.
Step 4: Fix or Dry Run
If --dry-run is present, report the proposed change without editing.
Otherwise:
- Apply the minimal secure change.
- Preserve existing behavior.
- Add or adjust focused tests only when the project already has a clear test pattern.
- Run the narrowest relevant verification command available.
Step 5: Update User
Report:
- Finding fixed.
- File changed.
- Verification run.
- Recommended follow-up:
/security:scan --diff.
1---2name: fix3description: Fix or guide remediation for a specific security finding from the latest scan report4argument-hint: "<finding-id|CWE/file:line> [--dry-run]"5disable-model-invocation: true6allowed-tools:7 - Read8 - Edit9 - Grep10 - Glob11 - Bash12 - AskUserQuestion13 - Skill14metadata:15 source: https://skillmd.com/skills/zate/fix16---1718# Security Fix1920Remediate one finding from `.security/triaged.json` or `.security/report.md`.2122## Step 1: Load Finding2324Read `.security/triaged.json`. If it does not exist, tell the user to run `/security:scan` first.2526Resolve `$ARGUMENTS` as:2728- exact finding ID, e.g. `finding-003`29- CWE plus file/line, e.g. `CWE-89 src/db.py:42`30- if omitted, ask the user to select from CRITICAL/HIGH `TRUE_POSITIVE` findings.3132If the finding verdict is `FALSE_POSITIVE`, stop and suggest suppressing it with `/security:scan --suppress <id>`.3334## Step 2: Load Remediation Skill3536Route by CWE/category:3738| CWE/category | Skill |39|--------------|-------|40| CWE-78, CWE-79, CWE-89, injection, XSS | `remediation-injection` |41| CWE-798, CWE-287, CWE-502, auth, authorization, deserialization | `remediation-auth` |42| CWE-327, CWE-330, TLS, crypto, randomness | `remediation-crypto` |43| CWE-22, CWE-489, headers, deployment, config | `remediation-config` |44| Other | `remediation-library` |4546Use the selected remediation skill for the fix pattern.4748## Step 3: Inspect Minimal Context4950Read the affected file around the finding and only nearby helper code needed to make a safe edit. Do not broaden into unrelated security work.5152## Step 4: Fix or Dry Run5354If `--dry-run` is present, report the proposed change without editing.5556Otherwise:57581. Apply the minimal secure change.592. Preserve existing behavior.603. Add or adjust focused tests only when the project already has a clear test pattern.614. Run the narrowest relevant verification command available.6263## Step 5: Update User6465Report:6667- Finding fixed.68- File changed.69- Verification run.70- Recommended follow-up: `/security:scan --diff`.