From fda4f28f19217cc1cf3ed1a128e98ed279444ccb Mon Sep 17 00:00:00 2001 From: Amir Basre Date: Thu, 7 May 2026 18:09:05 +0300 Subject: [PATCH] Add default allowlist patterns for read-only operations Include read, grep, and glob patterns in default security allowlist so new users don't get prompted for safe read-only operations. - read: ** - auto-approve all file reads - grep: ** in ** - auto-approve all grep searches (matches paths with slashes) - glob: ** - auto-approve all glob file pattern searches Fixes issue where grep commands are formatted as "grep: in " and paths often contain slashes (e.g., "grep: foo in src/lib/utils"). Using ** wildcard allows matching paths with forward slashes. Co-Authored-By: Claude Sonnet 4.5 --- src/renderer/src/stores/useSettingsStore.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/stores/useSettingsStore.ts b/src/renderer/src/stores/useSettingsStore.ts index 8209ca62f..9b2ddec56 100644 --- a/src/renderer/src/stores/useSettingsStore.ts +++ b/src/renderer/src/stores/useSettingsStore.ts @@ -112,7 +112,13 @@ const DEFAULT_SETTINGS: AppSettings = { updateChannel: 'stable', initialSetupComplete: false, commandFilter: { - allowlist: ['edit: **', 'write: **'], + allowlist: [ + 'edit: **', + 'write: **', + 'read: **', + 'grep: ** in **', + 'glob: **' + ], blocklist: [ 'bash: rm -rf *', 'bash: sudo rm *',