commit bcc8430f9c02399fe69ef99673ea3aae68315b8c
parent 005ae43992cf9504c7bd9d8dfc8cd1d88330e82c
Author: William Casarin <jb55@jb55.com>
Date: Mon, 9 Feb 2026 12:46:06 -0800
dave: fix multi-line command bypass in auto-accept rules
Remove newline-containing prefixes ("ls\n", "tree\n") from the
auto-accept list to prevent multi-line command bypass. Replace with
exact-match entries ("ls", "tree") for bare commands without args.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crates/notedeck_dave/src/auto_accept.rs b/crates/notedeck_dave/src/auto_accept.rs
@@ -73,9 +73,9 @@ impl Default for AutoAcceptRules {
"rg\t".into(),
"find ".into(),
"find\t".into(),
+ "ls".into(),
"ls ".into(),
"ls\t".into(),
- "ls\n".into(),
"cat ".into(),
"cat\t".into(),
"head ".into(),
@@ -93,9 +93,9 @@ impl Default for AutoAcceptRules {
"type ".into(),
"type\t".into(),
"pwd".into(),
+ "tree".into(),
"tree ".into(),
"tree\t".into(),
- "tree\n".into(),
"du ".into(),
"du\t".into(),
"df ".into(),