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 ,
@@ -138,15 +137,18 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
138
137
'Split-Path' : true ,
139
138
'Join-Path' : true ,
140
139
140
+ // Commands that are generally allowed with special cases we block
141
+ find : true ,
142
+ '/find\\b.*-exec(dir)?\\b/' : false , // Execute on results
143
+ top : true ,
144
+ '/top\\b.*-(k|r)\\b/' : false , // Kill or renice processes
145
+
141
146
// There are countless dangerous commands available on the command line, the defaults here
142
147
// include common ones that the user is likely to want to explicitly approve first. This is
143
148
// not intended to be a catch all as the user needs to opt-in to auto-approve commands, it
144
149
// provides additional safety when the commands get approved by broad rules or via LLM-based
145
150
// approval
146
151
147
- // Overwriting allowed by default commands with special cases
148
- '/find\\b.*-exec(dir)?\\b/' : false ,
149
-
150
152
// Deleting files
151
153
rm : false ,
152
154
rmdir : false ,
You can’t perform that action at this time.
0 commit comments