Quick start (local)
This gets Heimdall running on your laptop. You need Rust (stable), Docker and,
if you want alerts, a Microsoft Teams Workflows webhook URL (optional). If you
are new to Rust, the only thing you need from it is cargo, which comes with
rustup.
-
Start Postgres. The repository ships a development database on port 5433.
Terminal window git clone https://github.com/mrashed98/heimdall.gitcd heimdalldocker compose -f docker-compose.dev.yml up -dexport DATABASE_URL=postgres://heimdall:heimdall@localhost:5433/heimdallDatabase migrations run automatically when the server starts.
-
Create a bootstrap key. An API key is
hd_plus 43 URL-safe base64 characters (32 random bytes). This command prints exactly that:Terminal window export HEIMDALL_BOOTSTRAP_ADMIN_KEY="hd_$(openssl rand -base64 32 | tr '+/' '-_' | tr -d '=')"echo -n "$HEIMDALL_BOOTSTRAP_ADMIN_KEY" | wc -c # prints 46 (3 for "hd_" + 43)32 bytes encode to 44 base64 characters;
tr -d '='strips the one=of padding, leaving 43. Heimdall refuses to start with a bootstrap key that does not match this format. Only the key’s SHA-256 is stored in the database, so keep the key itself in your secret store. -
Write a config. Copy
heimdall.example.yamltoheimdall.yamland edit at leastrealms,own_registriesandteams. Then check it:Terminal window cp heimdall.example.yaml heimdall.yamlcargo run -- serve --check-config heimdall.yaml # prints "config ok"Every key is explained in the configuration reference.
-
Run the server. These environment variables are optional:
GITHUB_TOKEN(5000 requests an hour instead of 60 for GitHub),NVD_API_KEY, and one variable per Teams webhook named inteams[].webhook_env.Terminal window cargo run -- serve heimdall.yaml # listens on 0.0.0.0:8080curl localhost:8080/healthz # ok -
Talk to it with the CLI.
Terminal window export HEIMDALL_URL=http://localhost:8080export HEIMDALL_API_KEY=$HEIMDALL_BOOTSTRAP_ADMIN_KEYcargo run -- realmscargo run -- findings --min-severity highIf you install the binary, the same commands are
heimdall realmsandheimdall findings --min-severity high.
Where next
Section titled “Where next”- Send alerts to your team: Microsoft Teams alerts.
- Block vulnerable builds: CI gate.
- Run it for real: Install on Kubernetes.