agentleFS
imMamdouhaboammarimMamdouhaboammar/get-fable/skills/fable-heal/SKILL.md

fable-heal

Skill6 starsChanged 3 months agoMITView on GitHub

Automatically synthesize, apply, and verify security remediations for vulnerabilities identified by fable-redteam. Generates surgical AST and code patches, creates continuous TDD regression test guards, performs atomic workspace mutations with automated rollback circuit breakers, and seals cryptographic healing attestations.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 12 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before vulnerabilities have been identified or reproduced (use fable-redteam or fable-security).

    line 50
  2. Distinctive:

    Atomic Application & Guard: If applied, write patches with automated backup.

    line 78
  3. Distinctive:

    Closed-Loop Verification: If target is accessible, execute verification probes to confirm fix.

    line 79
  4. Distinctive:

    If syntax check or typecheck fails on a candidate patch, trigger rollback immediately via circuit breaker.

    line 83
  5. Distinctive:

    Always generate executable TDD regression test suite before sealing remediation.

    line 84
  6. Very specific:

    Never modify files in dryRun mode.

    line 85
  7. Distinctive:

    When target endpoint is live and verification is requested, probe target to prove vulnerability closure before completing.

    line 86
  8. Distinctive:

    Do not apply patches without automated rollback circuit breaker in place.

    line 90
  9. Distinctive:

    Do not bypass verification tests when closing active security work cards.

    line 91
  10. Very specific:

    Use native AST patching and regex transformers from src/core/redteam/heal.ts.

    line 95
  11. Very specific:

    Run Bun test runner (bun test) to execute generated regression test suites.

    line 96
  12. Distinctive:

    Use native SHA-256 crypto for cryptographic attestation generation.

    line 97
  13. Distinctive:

    If a candidate patch produces invalid syntax or type errors, immediately rollback changes via the circuit breaker.

    line 105
  14. Distinctive:

    If regression tests fail, revert applied patches and flag finding for manual developer review.

    line 106
  15. Distinctive:

    If target server is unavailable during closed-loop verification, mark verification as pending without blocking patch application.

    line 107
  16. Distinctive:

    All identified vulnerability findings mapped to remediation strategies.

    line 110

≈ “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

Fable Heal

Automatically synthesize, apply, and verify security fixes for vulnerabilities detected by fable-redteam.

Purpose

Bridge the gap between active vulnerability discovery and verified code remediation. fable-heal translates offensive security findings (SQL injection, BOLA/IDOR, CORS misconfigurations, missing security headers, sensitive file leaks, SSRF, JWT signature bypass, and LLM prompt injections) into concrete, tested, verified code patches with zero regressions.

When to Use

  • fable-redteam or security audits have identified vulnerabilities that need immediate code remediation.
  • Automatically generating TDD regression test suites to ensure security flaws stay closed in CI.
  • Applying surgical code patches in staging or local branches with atomic rollback protection.
  • Verifying whether candidate security patches successfully eliminate attack vectors.

When NOT to Use

  • Before vulnerabilities have been identified or reproduced (use fable-redteam or fable-security).
  • For general non-security application refactoring (use fable-simplify).
  • Direct production patching without human review or staging verification.

Inputs

  • redteam_findings: Array or file path of structured vulnerability findings from fable-redteam.
  • target: Target HTTP/HTTPS endpoint or repository workspace.
  • dryRun: When true, previews generated patches and unified diffs without modifying files.
  • autoApply: When true, writes patches directly to matching codebase source files.
  • verify: When true, re-runs attack vectors against the target to prove vulnerability resolution.

Expected Outputs

  • security_patches: Concrete code replacements with unified diffs.
  • test/security/redteam-healed.test.ts: Executable Bun test suite asserting vulnerability closure.
  • .fable/heal-attestation.json: Tamper-evident cryptographic SHA-256 attestation record.
  • .fable/LEDGER.md: Updated work cards marked as remediated.

Procedure

  1. Finding Ingestion: Load findings from fable-redteam, SARIF reports, or .fable/redteam-findings.json.
  2. Strategy Selection: Map each finding category and CWE to its surgical remediation pattern:
    • SQL Injection (CWE-89) -> Parameterized queries.
    • IDOR/BOLA (CWE-639) -> Resource ownership verification guard.
    • CORS Misconfiguration (CWE-942) -> Strict origin whitelist.
    • Missing Security Headers (CWE-1021) -> Content-Security-Policy, HSTS, XFO headers.
    • Sensitive Exposures (CWE-200) -> Route denial for .env, .git, and secrets.
    • SSRF (CWE-918) -> Outbound URL and IP validation blocking loopback and cloud metadata.
  3. Patch Synthesis: Generate code transformations and compute unified diffs.
  4. TDD Test Generation: Emit executable test assertions into test/security/redteam-healed.test.ts.
  5. Atomic Application & Guard: If applied, write patches with automated backup. On syntax or compilation failure, trigger circuit-breaker rollback.
  6. Closed-Loop Verification: If target is accessible, execute verification probes to confirm fix.
  7. Attestation & Ledger Sealing: Record cryptographic SHA-256 seal and mark work cards closed.

Decision Rules

  • If syntax check or typecheck fails on a candidate patch, trigger rollback immediately via circuit breaker.
  • Always generate executable TDD regression test suite before sealing remediation.
  • Never modify files in dryRun mode; only emit unified diffs and previews.
  • When target endpoint is live and verification is requested, probe target to prove vulnerability closure before completing.
  • Record SHA-256 cryptographic attestation in .fable/heal-attestation.json for all applied patches.

Constraints

  • Do not apply patches without automated rollback circuit breaker in place.
  • Do not bypass verification tests when closing active security work cards.
  • Patches must be surgical and preserve existing application business logic and comments.

Tool Policy

  • Use native AST patching and regex transformers from src/core/redteam/heal.ts.
  • Run Bun test runner (bun test) to execute generated regression test suites.
  • Use native SHA-256 crypto for cryptographic attestation generation.

Evidence Requirements

  • Synthesized patches must provide exact file paths, strategy name, and unified diffs.
  • Applied patches require syntax verification and automated regression test generation in test/security/redteam-healed.test.ts.
  • Cryptographic healing attestation at .fable/heal-attestation.json verifying integrity of all applied patches.

Failure Handling

  • If a candidate patch produces invalid syntax or type errors, immediately rollback changes via the circuit breaker.
  • If regression tests fail, revert applied patches and flag finding for manual developer review.
  • If target server is unavailable during closed-loop verification, mark verification as pending without blocking patch application.

Completion Criteria

  • All identified vulnerability findings mapped to remediation strategies.
  • Unified diffs and patches synthesized for vulnerable targets.
  • TDD regression test suite generated and passing in test/security/redteam-healed.test.ts.
  • Cryptographic attestation recorded in .fable/heal-attestation.json.
  • Remediation status recorded in .fable/LEDGER.md.

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.