mantis server 0.2.0
Security hardening release following the pre-launch audit (#86). Hit listings no longer expose admin-configured global webhook URLs to non-admin key owners, external_id claims by unrelated full keys are refused, installer templates neutralise hostile memos, API-key minting is admin-only, and MANTIS_PUBLIC_PATH finally routes.
Security
- Global-destination targets redacted for non-admins.
GET /api/keys/:id/hitsandGET /api/hits/recentreturntarget: nullwith a newdestination_scopefield (key/global/unknown) for rows a non-admin may not see. Global destinations are Slack / Discord / Teams / Home Assistant webhook credentials; only the key's own targets are shown to its owner. Admins are unchanged. POST /api/keyswith a foreignexternal_id. An unrelated full-scope key now gets409 conflict(auditedkey.claimedwithdenied: true). An enrollment-scoped key that did not create the key still recovers the trigger URL — the documented re-image / key-rotation flow — but withmemo: nulland no routing, audited withcross_key: true.- Installer templates sanitise memo and hostname text before it lands in generated comments and YAML (a
*/memo could previously become live JavaScript/CSS in the clone-detector, CSS canary and Scrypted snippets; a quoted newline could inject Home Assistant automation actions). POST /api/api-keysis admin-only. Self-revoke is unchanged.- Bearer failures on session-or-key routes now consume the auth-failure limiter;
/api/audit?actor=is validated (422);bulk-downloadanddevice-bundleenforce the 64 KiB JSON cap (413);/api/healthno longer echoes the database driver error; the key page fingerprints the decrypted signing secret.
Fixed
MANTIS_PUBLIC_PATHworks: the proxy rewrites<prefix>/<id>onto the trigger handler at runtime. Minted URLs under a custom prefix previously returned 404.
Changed
- Dashboard secondary text lifted to WCAG AA contrast.
- Fly and Render deploy templates enable hit / notification retention by default (90 / 30 days).
Upgrading
docker compose:git pull && docker compose up -d --build. No new migrations, no new required environment variables.- Integrators:
notifications[].targetmay now benull; non-admin keys can no longer mint API keys; foreignexternal_idclaims from full keys return409. - CLI 0.2.1 renders the new notification shape (
cli-v0.2.1).
Full diff: 42175e3...v0.2.0