Repository navigation
Description
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.
Activity
pszymkowiak commentedon May 27, 2026
🔍 Automated Triage
bughighSummary
Privacy bug: low_savings_commands telemetry leaks command arguments (URLs, paths, tokens) despite documentation guaranteeing they are not collected; fix by applying the same tool-name-only reduction used by top_commands.
📁 Relevant files
src/core/tracking.rssrc/core/telemetry.rssrc/main.rsdocs/TELEMETRY.mdTriaged automatically by wshm · This is an automated analysis, not a human review.
docs: verification pass — correct telemetry payload claim, confirm re…
kobihikri commentedon Jul 27, 2026
@LionartBR's analysis here is correct, and I wanted to add one piece of evidence that I think raises the priority: the argument that leaks can be a credential, and I was able to trigger it rather than just reason about it.
Their report notes it deliberately needs no binary execution, and describes the exposed value as potentially "a URL, path, repository name, host, branch, package, or token-like string". Running the path confirms the stronger case. With a stored command whose average savings falls inside this field's
0 < avg < 30window, the password survives thetake(3)reduction into the valuesend_pingplaces in the JSON body:Those credentials are synthetic and it was run in a container — nothing real was transmitted. The shape is what matters:
rtk psql <DSN> -c ...reduces tortk psql <DSN>, because the third whitespace word is the connection string.On my own machine this is not hypothetical either. My history DB has 63,542 rows, and 129 distinct stored commands carry a path or URL in that third word — including
postgres://…DSNs with inline credentials from local development. On this particular machine none of those happened to sit inside the0 < avg < 30bucket (they scored either 0.0 or ≥35.99), so nothing of mine was ever eligible to be sent. But that window is an ordinary numeric threshold, not a safety mechanism, and a slightly different compression ratio puts a DSN in range.So I'd suggest this is worth treating as credential exposure rather than only argument exposure — it also touches
DISCLAIMER.md, which promises that no "secrets" are collected.I've opened #3233 implementing the mitigation @LionartBR suggested. It keeps rtk's leading marker, then only bare subcommand words, and takes a third word only when the second names a tool that genuinely has subcommands — so
rtk git logandrtk docker psstill report usefully whilertk psql postgres://…reduces tortk psql. Full credit for the finding is @LionartBR's; I only wrote the patch, and I'm happy for it to be closed or reworked if you'd prefer a different shape (their tool-name-only option is simpler and I'd support that too).Disclosure: I used AI assistance to investigate and draft this. I verified the behaviour and reproduced it myself before posting.
KuSh commentedon Sep 26, 2026
This looks resolved by #4123, shipped in v0.50.0: the low_savings_commands entries in the telemetry payload are now built from the tool name plus, only for tools that route by subcommand, a subcommand-shaped word, so URLs, paths, connection strings and search terms no longer reach the payload. This was checked in the code and its tests rather than against a live telemetry endpoint, so marking it resolved-pending-close. If you find a stored command shape that still leaks an argument on v0.50.0 or later, please comment here.
KuSh commentedon Oct 3, 2026
This has carried the resolved-pending-close label with no new report of it happening, so closing it. Fixed by #4123, shipped in v0.50.0:
low_savings_commandslabels are now built from the tool name, plus a subcommand-shaped word only for tools that route by subcommand, so URLs, paths and connection strings no longer reach the telemetry payload. If you find a stored command that still leaks an argument on the latest release, please comment and it can be reopened.