fixguard
v0.1.0
Published
AI-powered CLI for code analysis, security hardening, and auto-fixing with instant rollback
Maintainers
Readme
FixGuard
A verifiable, local-first CLI system for safe code evolution.
Features
- 🔍 Multi-language support - TypeScript, JavaScript, Python, and more
- 🛡️ Security hardening - OWASP-compliant checks and fixes
- ⏪ Rollback support - Every change can be undone
- 📊 Comprehensive reporting - Markdown, JSON, and SARIF formats
- 🔒 Safe by design - Tools and tests are the judges, never AI
Installation
# Clone the repository
git clone https://github.com/your-org/fixguard.git
cd fixguard
# Install Node.js dependencies
npm install
# Install Python dependencies
cd python && pip install -e ".[dev]" && cd ..
# Build TypeScript
npm run build
# Link globally (optional)
npm linkUsage
Scan (Read-only Analysis)
fixguard scan .Scan with Auto-fix (Low-risk fixes only)
fixguard scan . --auto-fixGuided Refactor (Proposals require approval)
fixguard scan . --mode=guided-refactorCI Mode (Strict, non-interactive)
fixguard scan . --ciGenerate Reports
fixguard report .
fixguard report . --format=json
fixguard report . --format=sarifRollback Changes
fixguard rollback <run-id>
fixguard rollback <run-id> --dry-runExecution Modes
| Mode | Description | Auto-fix | Refactor | Interactive |
|------|-------------|----------|----------|-------------|
| observe | Read-only analysis (default) | ❌ | ❌ | ✅ |
| safe-fix | Low-risk fixes only | ✅ | ❌ | ✅ |
| guided-refactor | Proposals + approval | ✅ | ✅ | ✅ |
| ci | Strict, non-interactive | ❌ | ❌ | ❌ |
Core Principles
- AI has zero authority - Tools and tests decide
- Every change is verifiable - Backed by tests
- Every change is reversible - Snapshot and rollback
- Every action is logged - Immutable run logs
- If uncertain → report, don't guess
Architecture
┌─────────────────────────────────────────────────────┐
│ TypeScript Layer │
│ (Orchestration - "What Happens") │
├─────────────────────────────────────────────────────┤
│ CLI │ Detection │ Decision │ Snapshots │
│ │ │ Engine │ & Rollback │
└────────────────────────┬────────────────────────────┘
│ JSON Bridge
┌────────────────────────▼────────────────────────────┐
│ Python Layer │
│ (Transformation - "How Code Changes") │
├─────────────────────────────────────────────────────┤
│ Analyzers │ Fixers │ Security │ Testing │
│ (ESLint, │ (Rule- │ Hardening │ (Test Gen) │
│ Ruff...) │ based) │ (OWASP) │ │
└─────────────────────────────────────────────────────┘Security Hardening
FixGuard checks and hardens:
- Rate limiting on public endpoints
- Input validation and sanitization
- Secret handling (no hardcoded keys)
- SQL injection prevention
- XSS prevention
All security fixes follow OWASP Top 10 best practices.
License
MIT
