You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some filters drop or misrepresent requested data (find, ls -R, env, cargo label) #2271
While using RTK's filtered output, a few commands drop or misrepresent the data that was actually requested. None of these corrupt data, but each can hide requested results or mislead a reader.
1. find truncates a directory mid-listing
The --max budget is counted across directories, so the last shown directory can be cut after only some of its files while still rendered as a normal dir/ files line. The listing then looks complete and the trailing +N more is attributed to other directories. Someone checking whether a file exists in that directory is misled into thinking the directory was fully listed.
2. ls -R drops directory headers
ls -R prints one path: section per directory. The compactor flattens every section into a single list and drops the headers, so files can no longer be mapped to their directory (many distinct mod.rs entries become indistinguishable). The output can even be larger than the raw listing.
3. env silently drops secret-bearing variables
A sensitive variable that does not match a known category (cloud/tool/language) falls through every bucket and is omitted entirely, so rtk env implies it is unset — even when the user wants to confirm it is set. (Categorized secrets such as AWS_SECRET_ACCESS_KEY are already shown masked; the gap is the uncategorized ones.)
4. cargo check is labeled cargo build
CargoBuildHandler is shared by build and check, but the summary string is hardcoded to cargo build, so rtk cargo check reports cargo build (N crates compiled).
A PR with atomic commits (one fix per commit) follows.
Re item # 3 (env dropping uncategorized secret-bearing vars): worth pairing the fix with value-based masking. Masking today keys off the variable name (a denylist), and the value is never inspected — so once an uncategorized var like DATABASE_URL=postgres://user:pw@… is surfaced instead of dropped, it'd be shown in full. Un-dropping without value inspection turns a silent drop into a silent leak. SECURITY.md's "use allowlists, not denylists" points the same way. (src/cmds/system/env_cmd.rs)
Activity
pszymkowiak commentedon Jun 4, 2026
🔍 Automated Triage
bughighSummary
Multiple filter handlers silently drop or misrepresent output (find truncation, ls -R header loss, env variable omission, cargo check mislabeled); fix PR #2272 already open.
Triaged automatically by wshm · This is an automated analysis, not a human review.
laurac8r commentedon Jun 26, 2026
Re item # 3 (
envdropping uncategorized secret-bearing vars): worth pairing the fix with value-based masking. Masking today keys off the variable name (a denylist), and the value is never inspected — so once an uncategorized var likeDATABASE_URL=postgres://user:pw@…is surfaced instead of dropped, it'd be shown in full. Un-dropping without value inspection turns a silent drop into a silent leak. SECURITY.md's "use allowlists, not denylists" points the same way. (src/cmds/system/env_cmd.rs)