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 report4---56# Security Fix78Remediate one finding from `.security/triaged.json` or `.security/report.md`.910## Step 1: Load Finding1112Read `.security/triaged.json`. If it does not exist, tell the user to run `/security:scan` first.1314Resolve `$ARGUMENTS` as:1516- exact finding ID, e.g. `finding-003`17- CWE plus file/line, e.g. `CWE-89 src/db.py:42`18- if omitted, ask the user to select from CRITICAL/HIGH `TRUE_POSITIVE` findings.1920If the finding verdict is `FALSE_POSITIVE`, stop and suggest suppressing it with `/security:scan --suppress <id>`.2122## Step 2: Load Remediation Skill2324Route by CWE/category:2526| CWE/category | Skill |27|--------------|-------|28| CWE-78, CWE-79, CWE-89, injection, XSS | `remediation-injection` |29| CWE-798, CWE-287, CWE-502, auth, authorization, deserialization | `remediation-auth` |30| CWE-327, CWE-330, TLS, crypto, randomness | `remediation-crypto` |31| CWE-22, CWE-489, headers, deployment, config | `remediation-config` |32| Other | `remediation-library` |3334Use the selected remediation skill for the fix pattern.3536## Step 3: Inspect Minimal Context3738Read the affected file around the finding and only nearby helper code needed to make a safe edit. Do not broaden into unrelated security work.3940## Step 4: Fix or Dry Run4142If `--dry-run` is present, report the proposed change without editing.4344Otherwise:45461. Apply the minimal secure change.472. Preserve existing behavior.483. Add or adjust focused tests only when the project already has a clear test pattern.494. Run the narrowest relevant verification command available.5051## Step 5: Update User5253Report:5455- Finding fixed.56- File changed.57- Verification run.58- Recommended follow-up: `/security:scan --diff`.