Skip to content

v0.2.0

Choose a tag to compare

@raphvallee raphvallee released this 03 Nov 04:52
· 12 commits to main since this release

[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 in env, 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: read and persist-credentials: false are set, and
    the release job runs in a protected release environment with provenance.
  • The spawned opencode stats CLI no longer inherits your whole environment
    (including OPENROUTER_MANAGEMENT_KEY and cloud credentials); it gets an
    allowlisted runtime environment.
  • managementKeyEnv cannot 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.
  • dbPath is 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/0700 where
    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
    extraIgnore is now applied even when the filters leave zero survivors
    (never with sort: "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, rankingWaitMs is capped at 30 s,
    ttlHours at 720, statsCacheMinutes at 1440 and statsDays at 365.