Skip to content

chore(hardening): make telemetry opt-in and give the tips fetch a kill switch - #8

Merged
devGregA merged 2 commits into
mainfrom
hardening/egress-defaults
Aug 13, 2026
Merged

chore(hardening): make telemetry opt-in and give the tips fetch a kill switch#8
devGregA merged 2 commits into
mainfrom
hardening/egress-defaults

Conversation

@devGregA

Copy link
Copy Markdown
Contributor

Problem

  1. Telemetry was opt-out, and failed open. It ran unless the config said telemetry = false. An install that never made a choice reported by default, and — because the check was !== false — a config that could not be parsed was also treated as consent.
  2. The startup tips fetch had no kill switch. Every other launch-time call can be turned off (KIMI_CODE_NO_AUTO_UPDATE, KIMI_DISABLE_TELEMETRY, providing rg/fd locally). The tips banner had none, so an install configured for no outbound traffic still beaconed on every run.

What changed

  • Telemetry is enabled only when the config opts in (telemetry = true). An unreadable config is treated as no consent rather than consent. KIMI_DISABLE_TELEMETRY is unchanged and still overrides everything.
  • KIMI_CODE_NO_TIPS=1 skips the tips fetch before any network call is made, using the same truthy values as the other switches.

Note this is a fork-local default change: upstream's opt-out choice is theirs to make, and it is easy to see why a product wants it. For a fork run inside one organization, reporting by default is the wrong way round.

Testing

  • New: telemetry stays disabled when the config is silent; enables only on explicit opt-in; the tips fetch is skipped (with fetch asserted never called) when the switch is set.
  • Updated: the test that asserted telemetry "degrades to enabled when config is unreadable" now asserts it degrades to disabled — that fail-open was part of the problem, so the test was encoding the behaviour being fixed.
  • Verified as real tests: with both source files reverted, exactly those 3 fail.
  • Full CLI suite green: 196 files / 2665 tests.
  • oxlint clean on changed files (one pre-existing warning elsewhere in the file, confirmed on main); tsc --noEmit clean.

Checklist

  • Problem explained above (fork-local hardening; no upstream issue).
  • Tests added that prove the change works.
  • Changeset added (minor).
  • No doc update needed.

Greg Anderson and others added 2 commits August 12, 2026 21:14
…l switch

Telemetry ran unless the config explicitly said telemetry = false, which
also meant a config that failed to parse was treated as consent. Enable it
only when the config opts in, so an install that never made a choice, or
whose config could not be read, reports nothing. KIMI_DISABLE_TELEMETRY
still works as a hard override.

Add KIMI_CODE_NO_TIPS for the startup tips fetch. It was the only launch
network call with no way to turn it off, so an install otherwise
configured for no outbound traffic still beaconed on every run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@devGregA
devGregA merged commit 75e2d8f into main Aug 13, 2026
13 checks passed
@devGregA
devGregA deleted the hardening/egress-defaults branch August 13, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant