Security fix finding

From Clear-Capabilities/agentic-security · View interactive version

Security fix finding is an AI agent skill from the GitHub repository Clear-Capabilities/agentic-security. Apply a remediation patch via the deterministic MCP toolchain. Activate when user asks to fix a scanner finding.

How to use this skill

Skill file

Skill — fix a specific finding

Activates when the user is pointing at a specific finding from a prior

scan and wants to remediate it. The deterministic toolchain

(synthesize_fix → verify_fix → apply_fix) is the only correct path —

do NOT use Edit directly.

When to fire

or a stableId (abc12345) and asks for action.

What to do

  1. Confirm the finding still exists. Read

.agentic-security/last-scan.json and look up the finding by id /

stableId / file+line. If it's gone, tell the user and stop — don't

patch a finding that's already been resolved.

  1. Decide appropriateness. Read the file around finding.line ± 30

via the Read tool. Is the canonical fix actually right here? If

the surrounding code already validates upstream, or there's a custom

sanitizer, or the file is a test fixture — STOP and report

refused: <reason>. Don't proceed.

  1. Route via MCP, not Edit. The deterministic path is:

```

MCP synthesize_fix → MCP verify_fix → MCP apply_fix

```

text. You do NOT modify it. You do NOT retype it.

in memory and runs the project linter. Read the structured

introduced[] array on failure (template-incomplete vs codebase-

prior vs lint-failed — see agents/security-fixer.md for the

decision tree).

fix-history.js with HMAC verification + reserved-path refusal +

attempt-budget enforcement.

  1. Batch mode. If the user wants to fix more than one finding, hand

off to the security-fixer subagent with a list (≤ 10 findings per

invocation per _CONFINEMENT.md). The subagent writes a PLAN.md

to the scratchpad.

  1. Run the project tests after apply. If the project has

npm test, pytest, cargo test, or similar — invoke it via

Bash. Surface pass/fail in the final report.

Don't

toolchain is the only path with HMAC + audit + budget + backup.

batches, write progress to AGENTS.md.

Canonical commands

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.