File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -86,17 +86,39 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
86
86
} ,
87
87
]
88
88
} ,
89
+ // There are countless dangerous commands available on the command line, the defaults here
90
+ // include common ones that the user is likely to want to explicitly approve first. This is
91
+ // not intended to be a catch all as the user needs to opt-in to auto-approve commands, it
92
+ // provides additional safety when the commands get approved by broad rules or via LLM-based
93
+ // approval
89
94
default : {
95
+ // Deleting files
90
96
rm : false ,
91
97
rmdir : false ,
92
98
del : false ,
99
+ '/^Remove-Item\\b/i' : false ,
100
+ ri : false ,
101
+ rd : false ,
102
+ erase : false ,
103
+ // Killing processes, dangerous thing to do generally
93
104
kill : false ,
105
+ '/^Stop-Process\\b/i' : false ,
106
+ spps : false ,
107
+ '/^taskkill(\\.exe)?\\b/i' : false ,
108
+ // Web requests, prompt injection concerns
94
109
curl : false ,
95
110
wget : false ,
96
- eval : false ,
111
+ '/^(Invoke-(RestMethod|WebRequest)|irm|iwr)\\b/i' : false ,
112
+ // File permissions and ownership, messing with these can cause hard to diagnose issues
97
113
chmod : false ,
98
114
chown : false ,
99
- '/^Remove-Item\\b/i' : false ,
115
+ '/^Set-ItemProperty\\b/i' : false ,
116
+ 'sp' : false ,
117
+ '/^Set-Acl\\b/i' : false ,
118
+ // Eval string, can lead to anything else running
119
+ eval : false ,
120
+ '/^Invoke-Expression\\b/i' : false ,
121
+ iex : false ,
100
122
} ,
101
123
}
102
124
} ;
You can’t perform that action at this time.
0 commit comments