Pisces is an AI-assisted, self-healing, human-governed security remediation patcher for Python. It detects vulnerabilities with 7 AST + regex rules, generates a minimal patch with an LLM, validates the fix against your own test suite — and rolls back automatically if anything breaks. Nothing gets patched without your approval.
Security scanners find problems. AI codegen guesses at fixes. Pisces closes the loop — it detects, patches, judges its own patch, runs your tests, heals when they fail, and asks you before touching a single line. Remediation you can audit.
Seven built-in AST + regex rules scan your .py files. Fully deterministic — no LLM in the loop. Findings are cached to .pisces/cache. Exit code 1 when findings meet your severity threshold — perfect for CI.
An LLM generates a minimal, targeted patch with full source and AST context. An adversarial LLM judge reviews it before it reaches you. Every patch is applied atomically — checkpoint, temp file, rename — and rolls back on any failure.
Judge-reviewedYour test command (pytest by default) verifies the fix. Tests fail? Pisces re-enters the healing loop, up to your attempt limit. Exhausted? The original file is restored, untouched. Every repair is logged with diffs and judge scores.
HITL approval gate| Rule | ID | Severity | What it detects |
|---|
API credentials are read from environment variables only and never stored in pisces.toml. The scanner never calls an LLM — LLMs are used only for explanations, patch generation, and optional patch judging.
Python ≥ 3.10. Run pisces watch . in a separate terminal to keep context.json updated before tracing changes with pisces scan. Bring an API key for your LLM provider — or run fully local with Ollama / LM Studio.
Set your provider's key with export first — it lives in your shell, never in pisces.toml.
Install Pisces today. Detect, remediate, validate — with you firmly in charge.