仓库指标
- Star
- (48,085 star)
- PR 合并指标
- (平均合并 11天 1小时) (30 天内合并 45 个 PR)
描述
Summary
Telemetry documentation says full command lines, arguments, file paths, environment variables, source code, and secrets are not collected. In v0.39.0, most telemetry fields are aggregate or reduced, but low_savings_commands can still include command arguments because it sends the first three whitespace-separated words of the stored rtk_cmd.
This is a privacy hardening issue, not an accusation of malware.
Version / tag / commit
- Release:
v0.39.0 - Commit/tag target:
2fbc7514f6964acabcfac65501b8bb6b525e3aa8 - Producing Actions run: https://github.com/rtk-ai/rtk/actions/runs/25445836840
Evidence
Telemetry payload:
src/core/telemetry.rs:106-140includeslow_savings_commandsin the JSON payload.src/core/telemetry.rs:271-278populates it fromtracker.low_savings_commands(5)and formats each entry as"{cmd}:{pct}%".src/core/tracking.rs:1053-1067implementslow_savings_commands; it selects fullrtk_cmd, then returnscmd.split_whitespace().take(3).join(" ").
Stored command sources can include arguments:
src/main.rs:1199-1204records TOML-filtered fallback asrtk:toml {raw_command}.src/main.rs:1227records passthrough asrtk fallback: {raw_command}.src/main.rs:2341-2344records proxy usage asrtk proxy {cmd_name} {cmd_args.join(" ")}.
Therefore a command such as a proxy or fallback invocation with a URL/path/token-like first argument can flow into the first three words of low_savings_commands, depending on savings stats and ranking.
Docs:
docs/TELEMETRY.md:65documentslow_savings_commandsas a sent telemetry field.docs/TELEMETRY.md:109-114says RTK does not collect full command lines or arguments, file paths, secrets, API keys, or environment variable values.
Other telemetry fields look better reduced:
src/core/tracking.rs:976-986extracts only the tool name fortop_commands.src/core/tracking.rs:1024-1038groups passthrough telemetry by first word only.src/core/tracking.rs:1141-1172maps commands to ecosystem categories forecosystem_mix.src/core/tracking.rs:1188-1195sends only a count of distinct project paths.
Impact
Users who opt in to telemetry may unintentionally send a command argument in low_savings_commands. Depending on the command, the first argument can be a URL, path, repository name, host, branch, package, or token-like string. This conflicts with the documented privacy claim and creates avoidable telemetry sensitivity.
Verification steps
No release binary execution is needed.
- Inspect
src/core/telemetry.rsatv0.39.0and confirmlow_savings_commandsis included in the payload. - Inspect
src/core/tracking.rs:1053-1067and confirm the first three words ofrtk_cmdare sent. - Inspect
src/main.rs:1199-1204,:1227, and:2341-2344and confirm storedrtk_cmdvalues can include raw command arguments. - Compare with
docs/TELEMETRY.md:109-114.
Suggested mitigation
- Make
low_savings_commandsuse the same tool-name reduction astop_commands, or map to a fixed taxonomy. - If subcommand granularity is needed, maintain a per-tool allowlist of safe subcommands and drop all other arguments.
- Add unit tests with URL/path/token-like arguments proving telemetry payload fields do not include them.
- Update
docs/TELEMETRY.mdif the intended policy is to send sanitized subcommand names rather than only tool names.