Repository navigation
v0.2.0
[0.2.0] - 2026-11-02
Security release. A full audit was run and its findings are fixed; see
VULNERABILITY-AUDIT.md for the audit and remediation status. There are no
breaking changes, but configuration is now stricter: anything invalid changes
nothing silently, it fails startup (or is ignored) loudly.
Security
- The npm publish workflow cannot be command-injected via its manual
tag
input anymore: the value travels inenv, is validated against
^[a-z0-9][a-z0-9._-]{0,127}$before publish, and the release tag must match
package.json. Actions are pinned to commit SHAs, the toolchain is pinned,
permissions: contents: readandpersist-credentials: falseare set, and
the release job runs in a protectedreleaseenvironment with provenance. - The spawned
opencode statsCLI no longer inherits your whole environment
(includingOPENROUTER_MANAGEMENT_KEYand cloud credentials); it gets an
allowlisted runtime environment. managementKeyEnvcannot point at well-known cloud secrets
(AWS_*,OPENAI_API_KEY,GITHUB_TOKEN, ...); the value is never echoed,
and overriding the default prints a warning naming the variable.dbPathis canonicalized, symlinks are refused, and a database file whose
fetches table does not look like ours is refused unmodified; a corrupt one
is quarantined to*.corrupt-<timestamp>and recreated. Foreign files are
never migrated or modified. The database is owner-only (0600/0700where
the platform supports it) and reads are capped at 5,000 rows.- Routing from a poisoned or empty refresh is never persisted over a healthy
snapshot; the previous ranking is kept until a good refresh lands.
Disk timestamps are clamped, slugs are validated and capped on write and on
read, and survivors are validated exactly like the blacklist. - A routing failure is never silent: without a session it is logged; with a
session it appears in the transcript and as a toast; the user's
extraIgnoreis now applied even when the filters leave zero survivors
(never withsort: "price"). - Upstream payloads are size-capped (5 MB) and shape-validated before use;
request bodies are streamed with a 25 MB ceiling; provider slugs are
validated (^[a-z0-9][a-z0-9._-]{0,63}$) everywhere they are built or read. - Untrusted strings reaching logs, the TUI or transcripts are stripped of
control characters (no ANSI/OSC injection) and length-capped. - Discounts of 100%+ are rejected as broken pricing; honored discounts are
capped at 50%; NaN cannot pass any filter; missing uptime is never read as a
perfect score, and invalid health data fails closed. - Authenticated requests to the Activity API use
redirect: "error". - The stats child is capped at 10 MB of stdout / 64 KB of stderr; bodies and
stats payloads over their caps are aborted, not buffered.
Added
SECURITY.md(reporting policy) and Dependabot for npm and GitHub Actions.- 14 security-invariant tests (
test/security.test.ts), covering routing
safety, persistence gating, database hardening and input validation.
Changed
- Configuration validation is stricter: control characters are rejected
anywhere in string options, values are truncation-capped (200 chars) and
redacted in errors for*key*/*token*/*secret*names,extraIgnore
entries are validated provider slugs,rankingWaitMsis capped at 30 s,
ttlHoursat 720,statsCacheMinutesat 1440 andstatsDaysat 365.