The command line prints a refusal's detail to the terminal unescaped
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start with service.rs::shown, which already escapes control characters; that is the pattern to lift into a shared helper in the command line's refusal printer. Then find both unescaped call sites: profiles.rs::refuse (used by import-profile and export-profile) and the ladderback mcp call path that prints ladderback: <sentence> on stderr (added in #723). Route both through the helper so C0, DEL and C1 become \u{…}, and add one test per path whose detail contains an escape sequence. Done when every refusal path prints escaped text and those tests pass.
Written by the indexing model from the issue text.
Description
What happens
When the command line prints a refusal on stderr, the refusal's arguments and detail go to the terminal unescaped. If one holds a control character (an ANSI escape sequence, a carriage return, a bell), the terminal acts on it. A detail can come from a daemon in connect mode, from a profile file, or from a worker's output.
Two places print this way:
ladderback mcp call(#723 adds the catalog sentence on stderr,ladderback: <sentence>);profiles.rs::refuse, used byimport-profileandexport-profile.
service.rs::shown already escapes what it prints, so the command line has the pattern; these two paths don't use it.
Why it matters
A detail with escape sequences can rewrite what the terminal shows (hide a line, move the cursor, change the title), so a person could be misled about what Ladderback refused and why. This isn't a secret leak (I4 masking happens before), but it's untrusted text reaching a terminal.
Proposed
One shared escape in the command line's refusal printer, used by every path that prints a refusal: control characters (C0, DEL, C1) shown as \u{…} or similar, as shown does. A test for each path, with a detail that holds an escape sequence.
Found in the review of #723's PR.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 56m
- Merged PRs (30d)
- 349
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nledford/Ladderback
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nledford/Ladderback#759 ·
Maintainers usually reply within 1 day
-
enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nledford/Ladderback#746 ·
Maintainers usually reply within 1 day
-
enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nledford/Ladderback#745 ·
Maintainers usually reply within 1 day
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nledford/Ladderback#647 ·
Maintainers usually reply within 1 day
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nledford/Ladderback#637 · 1 comment ·
Maintainers usually reply within 1 day
All issues in nledford/Ladderback
Similar issues
-
area:ui bug effort:low P2 source:agent
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
akitaonrails/ai-memory#2314 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ElectronicWave/Elemental#265 ·
Maintainers usually reply within 1 day
-
bug low-priority
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dividebysandwich/rust-dos#1170 ·
Maintainers usually reply within 1 day
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day