Repository navigation
Description
Summary
I reviewed RTK v0.34.3 after installing it for Codex and found a few privacy/security issues that look worth tracking in one place. I searched existing public issues and saw related broad/data-directory issues such as #640 and #1014, but did not find a targeted issue covering these specific findings.
Findings
1. aws secretsmanager get-secret-value appears to print secret material
src/cmds/cloud/aws_cmd.rs routes aws secretsmanager get-secret-value through filter_secrets_get.
The filter extracts SecretString and emits it as Secret: ...:
filter_secrets_getappends the raw/compacted secret string to output.- The tests assert that
password":"secret123"andplain-text-passwordare present in the filtered output.
For an LLM-facing command filter, this seems risky: it can place secret material directly into agent context and logs/transcripts. Expected behavior would be to redact or summarize the secret metadata by default, with an explicit opt-in/raw mode if users really want secret values shown.
2. RTK local tracking stores full command strings and project paths
The local SQLite tracking database stores original_cmd, rtk_cmd, and project_path in the commands table.
This can persist sensitive data when users run commands containing inline tokens, URLs, auth headers, env values, file contents, or private path names. In my local install, command history included full URLs and PowerShell command bodies.
Expected behavior could be one or more of:
- redact obvious secret-bearing arguments before storage
- store only normalized command categories by default
- make full command-history storage opt-in
- document the exact local persistence behavior very prominently in Codex/agent setup output
3. [tracking] enabled = false appears not to be enforced
Config exposes tracking.enabled, but source search did not show checks of tracking.enabled before calls to Tracker::new() / Tracker::record(...). Tracker::record inserts rows unconditionally once called.
If this is intended to disable tracking, it looks like a bug. If it is not intended to disable tracking, the config key is misleading.
4. Raw output tee can persist sensitive command output
tee is enabled by default in failure mode and writes raw command output to the local data directory when output is large enough. This can preserve secrets from failing commands, especially cloud/auth/config commands.
Potential mitigations:
- disable tee by default for known sensitive commands
- avoid tee for commands involving env/auth/secret/key/config/token patterns
- redact before tee writes
- make tee opt-in rather than default-on
Environment
- RTK version: 0.34.3
- Install method:
cargo install --git https://github.com/rtk-ai/rtk - OS: Windows
- Agent integration: Codex (
rtk init -g --codex)
Suggested acceptance criteria
- Secrets Manager filtered output does not include secret values by default.
tracking.enabled = falseprevents command-history writes, or the config option is removed/renamed.- Local command tracking redacts or avoids sensitive arguments by default.
- Tee/raw-output recovery skips or redacts likely secret-bearing commands by default.
- Docs/setup output clearly state what is stored locally and how to disable/delete it.
Activity
pszymkowiak commentedon May 27, 2026
🔍 Automated Triage
bughighSummary
Security bug: aws secretsmanager filter leaks secret values into LLM context, tracking.enabled=false is not enforced, and tee persists raw sensitive output — well-documented with code references; three PRs already open addressing all findings.
📁 Relevant files
src/cmds/cloud/aws_cmd.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
feat(tracking): honour tracking.enabled and redact sensitive args
feat(tee): redact sensitive output and add per-command opt-out
laurac8r commentedon Jun 26, 2026
One more for the "secret output filtering" bucket:
rtk envmasks on a variable-name denylist and never inspects the value, so a secret under a non-matching name (DATABASE_URL=postgres://user:pw@…,SENTRY_DSN, a base64 blob) is printed in full when surfaced (e.g.rtk env --filter URL). Same root cause as finding#1here — masking by pattern, not by value. An allowlist of known-safe names (or a value-entropy / secret-shape check) would meet this issue's redaction acceptance criterion and match SECURITY.md's own "use allowlists … not denylists." (src/cmds/system/env_cmd.rs)