Please report security issues privately, not as a public GitHub issue.
- Open a private security advisory on the repository, or
- write to the maintainer through the contact listed on the project page.
Include what you did, what happened, and the version or commit you tested. A proof of concept helps, but a clear description is enough — please do not test against someone else's instance.
A NovaRoute install holds provider API keys, OAuth tokens and browser session
cookies for every provider you connect, the content of every request that passes
through the gateway, and — if the Nova agent is enabled — a path to running
commands on the host. Treat the install directory and DATA_DIR as secret
material.
-
Finish first-time setup immediately after install. Until a password is stored, an unclaimed panel can be claimed.
-
Set
JWT_SECRET,API_KEY_SECRETandMACHINE_ID_SALTto random values (openssl rand -hex 32). WithoutAPI_KEY_SECRET, provider credentials are stored in plain text. -
Leave
Require API Keyon and give each client its own key. -
Put the gateway behind TLS (the installer does this with Caddy when you give it a domain), or bind it to
127.0.0.1and reach it over SSH/Tailscale. -
chmod 600the.envfile andDATA_DIR/db/data.sqlite. -
Remove
ADMIN_MASTER_PASSWORDonce you have regained access. -
If the Nova agent is enabled, never combine a channel that reads messages from strangers (Instagram, a Telegram user account) with the
terminalorfilestools. Indirect prompt injection starts there. -
Give each client its own key with a request limit (
rpmLimit) and a spend cap. Both are enforced on every gateway surface, so a leaked key cannot be used to burn the account overnight. -
Watch
Settings > Security > Audit Trailafter any suspicious event, and scrape/api/metrics(withMETRICS_TOKEN) to alert on a key's spend jumping. -
Give each person their own account with the smallest role that works (Settings > Security > Users). Someone who only reads reports is a
viewer, not anadmin.
Run the posture check on a real install:
npm run audit:security # add --fa for Farsi, --json for CIIt exits non-zero when it finds a critical issue, so it can gate a deploy.
Changes to these need a careful review — they are the boundaries everything else rests on:
| File | Boundary |
|---|---|
custom-server.js |
Derives the client IP from the TCP socket and strips forged forwarding headers |
src/dashboardGuard.js |
Deny-by-default policy for /api/*, gateway key enforcement |
src/lib/auth/dashboardSession.js |
Session issuing, revocation epoch, password verification |
src/lib/nova/safeCommand.js |
The only thing between the agent and an unattended root shell |
src/lib/security/urlGuard.js |
SSRF guard (IP parsing, DNS, redirect revalidation) |
src/lib/security/fieldCipher.js |
Credential encryption at rest |
src/lib/auth/timingSafe.js |
Constant-time secret comparison |
src/lib/apiKeyPolicy.js |
Per-key policy: active flag, model access, spend and rate limits |
src/lib/security/keyRateLimiter.js |
Sliding-window request and concurrency limits |
src/lib/security/adminAudit.js |
Audit trail for administrative writes |
src/lib/auth/roles.js |
Role matrix: which role may call which route |
Regression tests for these live in tests/unit/security.test.js:
npm run test:unitA full audit of this codebase (August 2026), its thirteen findings and the
patches that closed them, is documented in Farsi at
docs/fa/05-security-report.md.