File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
90
90
// Safe and common readonly commands (automatically approved)
91
91
echo : true ,
92
92
ls : true ,
93
- find : true ,
94
93
pwd : true ,
95
94
cat : true ,
96
95
head : true ,
@@ -139,15 +138,18 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
139
138
'Split-Path' : true ,
140
139
'Join-Path' : true ,
141
140
141
+ // Commands that are generally allowed with special cases we block
142
+ find : true ,
143
+ '/find\\b.*-exec(dir)?\\b/' : false , // Execute on results
144
+ top : true ,
145
+ '/top\\b.*-(k|r)\\b/' : false , // Kill or renice processes
146
+
142
147
// There are countless dangerous commands available on the command line, the defaults here
143
148
// include common ones that the user is likely to want to explicitly approve first. This is
144
149
// not intended to be a catch all as the user needs to opt-in to auto-approve commands, it
145
150
// provides additional safety when the commands get approved by broad rules or via LLM-based
146
151
// approval
147
152
148
- // Overwriting allowed by default commands with special cases
149
- '/find\\b.*-exec(dir)?\\b/' : false ,
150
-
151
153
// Deleting files
152
154
rm : false ,
153
155
rmdir : false ,
You can’t perform that action at this time.
0 commit comments