Prerequisites
Before you begin, ensure you have:- Rust 1.85+ (2024 edition)
- PostgreSQL 14+ or Docker
- Git 2.25+
- AI API Key — At least one of:
- Anthropic API key (Claude) - recommended
- OpenAI API key (GPT-4o)
- Ollama server URL (for local models)
Docker is optional but recommended for easier PostgreSQL setup and for enabling the Garmr sandbox (PoC validation).
Quick Start
Configure environment
Copy the example environment file and add your AI provider key:Edit
.env and set at least one AI provider:.env
Run Heimdall
The schema is applied automatically on startup:Wait for the server to start. You should see:
Your First Scan
Register an account
- Navigate to
http://localhost:8080 - Click Sign Up
- Enter your email and password
- Click Register
Add a repository
Heimdall supports multiple ways to connect repositories:
GitHub and GitLab OAuth require setting up OAuth apps and configuring
GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET or GITLAB_CLIENT_ID/GITLAB_CLIENT_SECRET in your .env file.Trigger a scan
- From your repositories list, click on the repository you just added
- Click Run Scan
- Confirm by clicking Start Scan
Monitor progress
Heimdall provides real-time scan progress via Server-Sent Events (SSE):
- Ingest — Cloning repository and building code index (AST, symbols, call graph)
- Tyr — Generating threat model (boundaries, attack surfaces, data flows)
- Static Analysis — Pattern matching, secret detection, dependency audit
- Hunt — AI agent investigating security vulnerabilities per threat
- Víðarr — Adversarial verification to filter false positives
- Garmr — Sandbox validation of proof-of-concept exploits
- Report — Ranking findings and generating patches
A typical scan takes 2-5 minutes depending on repository size and number of threats discovered.
Review findings
Once the scan completes, you’ll see:
- Severity-ranked findings — Critical, High, Medium, Low
- File locations with line numbers and code context
- Plain English explanations of each vulnerability
- Suggested patches as unified diffs
- PoC exploit details (if sandbox-validated)
- Source badges — AI (Hunt agent), Static (pattern rules), Dependencies (audit)
- Full vulnerability details
- CWE/CVE classification
- Confidence level (High for static rules, Confirmed for sandbox-validated)
- Code snippets showing the vulnerable code
- Step-by-step remediation guidance
Understanding Results
Severity Levels
| Severity | Description | Examples |
|---|---|---|
| Critical | Exploitable remotely with severe impact | SQL injection, RCE, authentication bypass |
| High | Significant security impact | XSS, CSRF, hardcoded credentials |
| Medium | Moderate risk or limited exploitability | Information disclosure, weak crypto |
| Low | Best practice violations | Missing security headers, verbose errors |
Finding Sources
- AI — Discovered by the Hunt agent through code reasoning
- Static — Pattern-matched by deterministic rules
- Dependencies — Vulnerable dependencies from audit
Confidence Levels
- High — Static analysis rules (deterministic)
- Medium — AI-discovered (requires validation)
- Confirmed — Sandbox-validated with PoC exploit
Next Steps
Configuration
Configure AI providers, OAuth, security settings, and workers
Installation
Learn about local development setup and Docker deployment
Scan Pipeline
Deep dive into the 7-stage scan pipeline
API Reference
Integrate Heimdall into your CI/CD pipeline
Docker Quick Start
Prefer Docker? Here’s the fastest path:Troubleshooting
Database Connection Failed
If you seeDATABASE_URL connection failed:
-
Verify PostgreSQL is running:
-
Check your
DATABASE_URLin.envmatches your database credentials -
Test the connection:
No AI Provider Configured
If you seeNo AI provider configured:
-
Ensure at least one of these is set in
.env:ANTHROPIC_API_KEYOPENAI_API_KEYOLLAMA_URL
-
Restart Heimdall after editing
.env
Scan Stuck or Failed
If a scan gets stuck:-
Check the logs for errors:
-
Verify Docker is running (required for Garmr sandbox):
-
Cancel the scan and retry:
Stale scans are automatically timed out after 10 minutes by default. Configure this with
WORKER_STALE_TIMEOUT_MINS in .env.