agentleFS
XavierErXavierEr/appsec-agent-skills/skills/remediation-validator/SKILL.md

remediation-validator

Skill4 starsChanged 7 months agoMITView on GitHub

Remediation validation skill that re-runs targeted scans after fixes to confirm vulnerabilities are resolved and detect regressions. Trigger when the user asks to: "verify a fix", "validate remediation", "confirm a vulnerability is resolved", "re-scan after fixing", "check if a patch works", "did my fix work", "validate the security fix", "re-test after remediation", or "check for regressions after the fix".

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

28 rules. About 0 are common, 18 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No specific input: If the user simply says "validate my fix" or "did my fix work" without details:

    line 39
  2. Very specific:

    Use the Bash tool to run git diff HEAD~1 (or against the relevant base) to detect recent changes

    line 40
  3. Distinctive:

    Use the Bash tool to run git log --oneline -5 to understand recent commit context

    line 41
  4. Distinctive:

    Use the AskUserQuestion tool to confirm before proceeding: "Based on recent changes to X and Y, I'll re-check findings A, B, and C.

    line 43
  5. Very specific:

    Use the Bash tool to run git diff <base>...<head> to identify changed files and line ranges

    line 50
  6. Distinctive:

    Use the Read tool to re-run SAST analysis on the specific changed file(s) only

    line 78
  7. Distinctive:

    Check both the fixed location AND similar patterns elsewhere in the same file

    line 80
  8. Very specific:

    Use the Read tool to load the relevant reference from ../llm-sast-scanner/references/ for the vulnerability class

    line 81
  9. Distinctive:

    If the server is running, re-run DAST checks on the specific endpoint(s) affected

    line 84
  10. Distinctive:

    Test with the same payloads that triggered the original finding

    line 85
  11. Distinctive:

    Check adjacent endpoints that share the same handler or middleware

    line 86
  12. Very specific:

    Use the Read tool to load the relevant reference from ../dast-scanner/references/

    line 87
  13. Distinctive:

    Check if the specific CVE is addressed by the new version

    line 91
  14. Very specific:

    Verify the lock file matches package.json

    line 92
  15. Distinctive:

    Check for new vulnerabilities introduced by the upgrade

    line 93
  16. Very specific:

    Use the Read tool to load references from ../dependency-audit/references/

    line 94
  17. Distinctive:

    Verify the setting change achieves the intended effect

    line 98
  18. Distinctive:

    Check for conflicting settings elsewhere

    line 99
  19. Distinctive:

    Verify the secret was rotated (check for new secret format/value)

    line 105
  20. Very specific:

    Use the Read tool to load references/validation_patterns.md to check for known incomplete fix patterns

    line 124
  21. Very specific:

    Use the Read tool to load references/regression_detection.md to check for known regression patterns

    line 128
  22. Distinctive:

    Scoped scanning: Only re-scan what was changed, not the entire project.

    line 187
  23. Distinctive:

    Git-aware: Use git diff to understand what changed.

    line 188
  24. Very specific:

    Pattern-aware: Check references/validation_patterns.md for common incomplete fix patterns.

    line 189
  25. Very specific:

    Regression-conscious: Always check for regressions.

    line 190
  26. Distinctive:

    Language-agnostic: Do not assume any specific language, framework, or toolchain.

    line 192
  27. Distinctive:

    Evidence-based: Every classification must include concrete evidence -- code snippets, scan output, or diff excerpts.

    line 193
  28. Distinctive:

    Conservative: When uncertain whether a fix is complete, classify as PARTIALLY FIXED rather than RESOLVED.

    line 194

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Remediation Validator

Purpose

Validate that security fixes actually resolve the reported vulnerabilities without introducing regressions. Performs targeted, scoped re-scanning of only the affected files and endpoints rather than full project scans. Language-agnostic -- works with any codebase, framework, or language.


Workflow

Step 1: Input Collection

Determine what is being validated. Accept one of the following inputs (ask if ambiguous):

  1. Previous audit report: A security audit report from /security-audit or individual scanner skills (SAST, DAST, dependency audit, config review, secrets scanner). Extract finding IDs, descriptions, affected files, and line numbers.
  2. Specific findings: A list of findings to re-check, identified by:
    • Finding ID (e.g., "SAST-003")
    • CWE number (e.g., "CWE-89")
    • Description (e.g., "SQL injection in login handler")
  3. File or commit reference: The user states what they fixed (e.g., "I fixed the SQL injection in auth.py"). Identify the relevant file(s) and infer which vulnerability class to re-scan for.
  4. No specific input: If the user simply says "validate my fix" or "did my fix work" without details:
    • Use the Bash tool to run git diff HEAD~1 (or against the relevant base) to detect recent changes
    • Use the Bash tool to run git log --oneline -5 to understand recent commit context
    • Infer which findings may be affected based on changed files and patterns
    • Use the AskUserQuestion tool to confirm before proceeding: "Based on recent changes to X and Y, I'll re-check findings A, B, and C. Proceed?"

Step 2: Change Analysis

Determine exactly what was modified and map changes to findings.

Parse the diff:

  • Use the Bash tool to run git diff <base>...<head> to identify changed files and line ranges
  • For each changed file, extract added/removed/modified lines
  • Identify the nature of the change (new code, refactored code, configuration change, dependency update)

Match changes to findings:

  • Cross-reference changed files against the file paths in original findings
  • Cross-reference changed line ranges against reported line numbers (with tolerance for line shifts)
  • Identify which vulnerability class the changes address by recognizing fix patterns:
    • Parameterized queries, prepared statements, ORM usage --> SQL injection fix
    • Output encoding, DOMPurify, template auto-escaping --> XSS fix
    • helmet(), security headers, CSP directives --> Security headers fix
    • bcrypt/argon2, JWT changes, session config --> Authentication fix
    • Ownership checks, role validation, middleware additions --> Access control fix
    • URL validation, allowlists, SSRF protections --> SSRF fix
    • crypto.randomBytes, key rotation, algorithm changes --> Cryptography fix
    • .gitignore additions, secret removal, env var migration --> Secrets fix
    • package.json / lock file changes, version bumps --> Dependency fix
    • Rate limiting, CORS config, cookie flags --> Configuration fix

Identify unaddressed findings:

  • List any original findings in changed files that the diff does NOT appear to address
  • Flag findings in files that were NOT changed at all

Step 3: Targeted Re-scan

For each finding being validated, run ONLY the relevant scan type. Do NOT run a full project scan.

Source code fix (injection, XSS, auth bypass, etc.):

  • Use the Read tool to re-run SAST analysis on the specific changed file(s) only
  • Focus on the specific vulnerability class identified in Step 2
  • Check both the fixed location AND similar patterns elsewhere in the same file
  • Use the Read tool to load the relevant reference from ../llm-sast-scanner/references/ for the vulnerability class

Endpoint fix (DAST-detected issues):

  • If the server is running, re-run DAST checks on the specific endpoint(s) affected
  • Test with the same payloads that triggered the original finding
  • Check adjacent endpoints that share the same handler or middleware
  • Use the Read tool to load the relevant reference from ../dast-scanner/references/

Dependency upgrade:

  • Re-run dependency audit on the updated package(s)
  • Check if the specific CVE is addressed by the new version
  • Verify the lock file matches package.json
  • Check for new vulnerabilities introduced by the upgrade
  • Use the Read tool to load references from ../dependency-audit/references/

Configuration change:

  • Re-run config review on the specific configuration file
  • Verify the setting change achieves the intended effect
  • Check for conflicting settings elsewhere
  • Use the Read tool to load references from ../security-config-review/references/

Secret removed:

  • Re-scan the specific file for remaining secrets
  • CRITICAL: Use the Bash tool to check git history -- git log -p --all -S '<pattern>' -- to verify the secret is not still in history
  • Verify the secret was rotated (check for new secret format/value)
  • Use the Read tool to load references from ../secrets-scanner/references/

Step 4: Comparison

Compare re-scan results against each original finding. Classify into exactly one of five categories:

RESOLVED: The finding no longer appears in re-scan results. The vulnerability is fixed.

  • Evidence: show the new code and explain why it addresses the vulnerability
  • Confidence: HIGH if the fix follows established best practices, MEDIUM if it uses a less common approach

PARTIALLY FIXED: The finding still appears but with reduced severity or scope.

  • Examples: parameterized one query but not another in the same file; fixed reflected XSS but stored XSS remains
  • Evidence: show what was fixed and what remains
  • Remaining work: describe exactly what else needs to change

NOT FIXED: The finding appears unchanged. The attempted fix did not address the vulnerability.

  • Evidence: show the current code and explain why the vulnerability persists
  • Common causes: fix was applied to wrong location, fix pattern doesn't address this variant, fix has a bypass
  • Use the Read tool to load references/validation_patterns.md to check for known incomplete fix patterns

REGRESSION: New findings appeared in the changed code that were not present before.

  • Evidence: show the new vulnerability with full details (file, line, severity, CWE)
  • Use the Read tool to load references/regression_detection.md to check for known regression patterns
  • Classify whether the regression is directly caused by the fix or coincidental

SHIFTED: The same vulnerability moved to a different location.

  • Examples: code refactored to another file but same vulnerable pattern kept; vulnerability moved from frontend to backend
  • Evidence: show the old location and new location
  • Note: this counts as NOT FIXED for remediation tracking purposes

Step 5: Validation Report

Produce a structured report in the following format:

# Remediation Validation Report

**Date**: [date]
**Scope**: [files/endpoints validated]
**Base**: [original report or findings being validated]
**Changes analyzed**: [git ref range or description]

## Summary

| Status | Count |
|--------|-------|
| Resolved | X |
| Partially Fixed | Y |
| Not Fixed | Z |
| Regression | W |
| Shifted | S |

**Remediation Progress**: [resolved / total original findings]%

## Detailed Results

### [Finding ID]: [Finding Title]
- **Original**: [brief description of original finding, file, line]
- **Fix Applied**: [what the developer changed]
- **Status**: [RESOLVED / PARTIALLY FIXED / NOT FIXED / REGRESSION / SHIFTED]
- **Evidence**: [code snippet or scan output showing result]
- **Notes**: [additional context, confidence level, or remaining work]

[Repeat for each finding]

## Regressions

[If any regressions were found, detail each one with the same format as
original scan findings: description, severity, CWE, affected file/line,
evidence, and remediation guidance]

## Remaining Items

[List any findings that are not yet resolved, grouped by priority]
[Include specific remediation guidance for each remaining item]

Key Principles

  • Scoped scanning: Only re-scan what was changed, not the entire project. This is faster and reduces noise.
  • Git-aware: Use git diff to understand what changed. Never guess -- always verify against the actual diff.
  • Pattern-aware: Check references/validation_patterns.md for common incomplete fix patterns. Many fixes look correct but miss edge cases.
  • Regression-conscious: Always check for regressions. Fixes frequently introduce new issues. See references/regression_detection.md.
  • Non-judgmental: Report facts, not blame. Say "finding persists" not "fix is wrong". Say "additional changes needed" not "incomplete work".
  • Language-agnostic: Do not assume any specific language, framework, or toolchain. Analyze the code as-is using the patterns and techniques applicable to whatever language is present.
  • Evidence-based: Every classification must include concrete evidence -- code snippets, scan output, or diff excerpts. Never classify a finding without showing why.
  • Conservative: When uncertain whether a fix is complete, classify as PARTIALLY FIXED rather than RESOLVED. False negatives (missing a still-present vulnerability) are worse than false positives.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.