@@ -135,22 +135,22 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
135135 // While these PowerShell verbs can have side effects, they are generally innocuous (eg.
136136 // updating OS-level file access info) and and often have prompts if they're more
137137 // involved (eg. Get-Credential)
138- '/Get-[a-z0-9]/i' : true ,
139- '/Select-[a-z0-9]/i' : true ,
140- '/Measure-[a-z0-9]/i' : true ,
141- '/Compare-[a-z0-9]/i' : true ,
142- '/Format-[a-z0-9]/i' : true ,
143- '/Sort-[a-z0-9]/i' : true ,
138+ '/^ Get-[a-z0-9]/i' : true ,
139+ '/^ Select-[a-z0-9]/i' : true ,
140+ '/^ Measure-[a-z0-9]/i' : true ,
141+ '/^ Compare-[a-z0-9]/i' : true ,
142+ '/^ Format-[a-z0-9]/i' : true ,
143+ '/^ Sort-[a-z0-9]/i' : true ,
144144 'Write-Host' : true ,
145145 'Write-Output' : true ,
146146 'Split-Path' : true ,
147147 'Join-Path' : true ,
148148
149149 // Commands that are generally allowed with special cases we block
150150 find : true ,
151- '/find\\b.*-exec(dir)?\\b/' : false , // Execute on results
151+ '/^ find\\b.*-exec(dir)?\\b/' : false , // Execute on results
152152 top : true ,
153- '/top\\b.*-(k|r)\\b/' : false , // Kill or renice processes
153+ '/^ top\\b.*-(k|r)\\b/' : false , // Kill or renice processes
154154
155155 // There are countless dangerous commands available on the command line, the defaults here
156156 // include common ones that the user is likely to want to explicitly approve first. This is
0 commit comments