A local-first application security scanner running on your own workstation. It scans your repos for vulnerabilities and secrets, validates fixes in isolated sandboxes, and opens GitHub Pull Requests directly from your machine.
Local-first · Offline-capable · Non-destructive Git worktrees · Zero telemetry
Zerra is an open-source, local-first blue-team security platform. It provides a lightweight web dashboard and command-line interface that allows software engineers to audit their source code for security vulnerabilities, test automated fixes in disposable sandboxes, and push verified security pull requests to GitHub.
Unlike cloud SaaS security platforms that ingest your proprietary source code onto third-party servers:
- Your code stays on your machine. Scans and Git operations execute entirely locally.
- Non-destructive Git automation. Fixes are applied and tested inside temporary
git worktreedirectories. Your live working tree is never modified or reset. - Hardware-backed secrets. Tokens and keys are stored in your operating system's native keychain (Windows Credential Manager, macOS Keychain, Linux Secret Service) with an authenticated AES-256-GCM (
scryptKDF) fallback.
- Static Analysis (SAST): AST pattern scanning and Semgrep integration detecting SQL injection, command execution, path traversal, unsafe deserialization, and dangerous redirects.
- High-Entropy Secret Detection: Detects leaked AWS credentials, GitHub tokens, private keys, database connection strings, and generic secrets using Shannon entropy and regex signatures.
- Dependency Audit (SCA): Scans
requirements.txt,package.json, and dependency locks for known CVEs via the Open Source Vulnerabilities (OSV) database.
- Non-Destructive Git Worktrees: Fixes are prepared in isolated
git worktreecheckouts. Zerra never runs destructivegit reset --hardorgit cleanin your workspace. - Flexible Fix Backends: Generates patches using local Ollama models (100% private/offline), deterministic pattern replacements, or optional cloud LLMs (Anthropic Claude, OpenAI).
- Ephemeral Docker Sandboxes: Verifies that fixes compile and pass project tests inside disposable Docker containers with writable overlays.
- Zero Force-Push Policy: Branches are created with explicit commit history and pushed cleanly; Zerra never force-pushes or commits directly to
main.
- Interactive Dashboard: Modern Next.js interface on
http://localhost:3000to review findings, browse SARIF reports, and trigger one-click fix PRs. - Zerra CLI: Terminal companion for developers (
zerra scan,zerra doctor,zerra vault).
┌────────────────────────────────────────────────────────────────────────┐
│ Local Machine (Your Device) │
│ │
│ ┌────────────────────────┐ ┌───────────────────────────┐ │
│ │ Next.js Dashboard │ │ OS Credential Vault │ │
│ │ (http://localhost:3000)│ │ (OS Keychain/AES-256-GCM) │ │
│ └───────────┬────────────┘ └─────────────┬─────────────┘ │
│ │ API Calls │ Credentials │
│ ▼ ▼ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ Zerra Core Agent (FastAPI on :8000) │ │
│ │ │ │
│ │ • SAST / SCA / Secret Scanner │ │
│ │ • Fix Synthesizer (Ollama local / Claude / GPT / Templates) │ │
│ │ • Safe Git Worktree Engine │ │
│ │ • Ephemeral Docker Sandbox Runner │ │
│ └───────────────────────────┬───────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ Isolated Git Worktree (Temporary) │ │
│ │ • Branch: zerra/fix-<id> (Developer working tree untouched) │ │
│ │ • Run project verification tests │ │
│ │ • Commit verified security patch │ │
│ └───────────────────────────┬───────────────────────────────────┘ │
└───────────────────────────────┼────────────────────────────────────────┘
│ Push Branch & Open PR (via GitHub API)
▼
┌──────────────────────────┐
│ GitHub Repository │
│ (Pull Request for Review)│
└──────────────────────────┘
Start the agent and dashboard in two commands:
# 1. Clone repository
git clone https://github.com/sjsreehari/zerra.git
cd zerra
# 2. Start the stack
docker compose up -d
# 3. Open dashboard
# Browse to: http://localhost:3000To configure optional GitHub token or AI fix backends, copy .env.example to .env and fill in your desired settings.
Run the services natively on your workstation without Docker:
# Terminal 1: Python Agent (scanner & PR engine)
cd agent
python -m venv venv
# Windows: .\venv\Scripts\Activate.ps1 | macOS/Linux: source venv/bin/activate
pip install -r requirements.txt
python -m uvicorn api:app --reload --port 8000
# Terminal 2: Next.js Dashboard
cd frontend
npm install
npm run dev
# Open http://localhost:3000 in your browserScan any directory directly from your terminal:
# From the repo root
npm install
npm run build -w cli
# Run health check
node cli/dist/index.js doctor
# Scan a repository
node cli/dist/index.js scan /path/to/project- Least-Privilege GitHub Access:
- Recommended: Fine-grained Personal Access Tokens (PATs) scoped strictly to target repositories with minimal permissions (
Contents: Read & Write,Pull Requests: Read & Write,Issues: Read & Write).
- Recommended: Fine-grained Personal Access Tokens (PATs) scoped strictly to target repositories with minimal permissions (
- Local Credential Storage:
- Primary: Operating System Keychain (Windows Credential Manager, macOS Keychain, Linux Secret Service).
- Fallback: AES-256-GCM encryption with keys derived via
scrypt(salt + IV + 128-bit authentication tag), saved to a file restricted to user-only permissions (0o600). - Zero telemetry: Credentials are never transmitted to external analytics endpoints.
- Data Privacy Notice:
- If using cloud LLM backends (Anthropic Claude, OpenAI), the vulnerable code snippet is sent to the respective API provider. To run 100% offline and keep all code local, set
OLLAMA_BASE_URLto your local Ollama instance.
- If using cloud LLM backends (Anthropic Claude, OpenAI), the vulnerable code snippet is sent to the respective API provider. To run 100% offline and keep all code local, set
We welcome contributions! Whether you are adding new AST security rules, improving test sandboxes, or polishing the dashboard:
- Read our CONTRIBUTING.md guide.
- Adhere to our CODE_OF_CONDUCT.md.
- Check out issues tagged
good first issueorhelp wanted.
If you discover a security vulnerability in Zerra, please do not file a public issue. Follow our responsible disclosure process detailed in SECURITY.md or email isrosreehari@gmail.com.
Zerra is distributed under the GNU General Public License v3.0. See LICENSE for details.