altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

Telemetry: unquoted filesystem paths and cloud-storage URIs reach App Insights unmasked

Open ralphstodomingo opened this issue 3 months ago • 1 comments

Describe the bug

Telemetry error-text masking (maskString in packages/opencode/src/altimate/telemetry/index.ts) deliberately redacts API keys, bearer tokens, emails, internal hosts, and quoted strings — but has no rule for filesystem paths or cloud-storage URIs. As a result:

  • Unquoted absolute paths in error messages reach App Insights raw. Home-directory paths carry the OS username, and project-rooted paths leak repo/client structure. A live 7-day core_failure/file_not_found cluster (32 machines) carries full /Users/<username>/… paths in the clear.
  • Cloud-storage URIs (gs://, s3://, abfss://, …) also pass through — bucket names identify the customer. Found via a sweep of all 800 distinct 30-day telemetry messages through maskString.

The gap is asymmetric, which is why it went unnoticed: paths that happen to be quoted are destroyed by the existing quote rule ('…' → ?), while unquoted ones survive.

Expected behavior

Paths and storage URIs in error text are masked (e.g. to a fixed <path> token), consistent with the chain's "over-masking is the correct failure mode" doctrine and with the masking already applied to keys/hosts/emails.

To Reproduce

Make any tool fail on an absolute path under the home directory (e.g. read on /Users/<you>/nope.sql) and inspect the emitted core_failure event — the path appears unmasked in error_message.

ralphstodomingo avatar Aug 19 '26 03:08 ralphstodomingo

Resolved in v0.11.0.

sahrizvi avatar Sep 09 '26 17:09 sahrizvi