Add 'git show' to auto-executable allow-list

This commit is contained in:
John Stearns
2024-11-06 14:54:12 -08:00
parent 48d7ef958c
commit 9153a962e5
4 changed files with 324 additions and 41 deletions

355
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
"name": "roo-cline",
"displayName": "Roo Cline",
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
"version": "1.0.4",
"version": "1.0.5",
"icon": "assets/icons/icon.png",
"galleryBanner": {
"color": "#617A91",
@@ -142,7 +142,9 @@
"@typescript-eslint/parser": "^7.11.0",
"@vscode/test-cli": "^0.0.9",
"@vscode/test-electron": "^2.4.0",
"esbuild": "^0.24.0",
"eslint": "^8.57.0",
"jest": "^29.7.0",
"npm-run-all": "^4.1.5",
"ts-jest": "^29.2.5",
"typescript": "^5.4.5"
@@ -163,11 +165,9 @@
"default-shell": "^2.2.0",
"delay": "^6.0.0",
"diff": "^5.2.0",
"esbuild": "^0.24.0",
"fast-deep-equal": "^3.1.3",
"globby": "^14.0.2",
"isbinaryfile": "^5.0.2",
"jest": "^29.7.0",
"mammoth": "^1.8.0",
"monaco-vscode-textmate-theme-converter": "^0.1.7",
"openai": "^4.61.0",

View File

@@ -56,13 +56,13 @@ type UserContent = Array<
Anthropic.TextBlockParam | Anthropic.ImageBlockParam | Anthropic.ToolUseBlockParam | Anthropic.ToolResultBlockParam
>
// Add near the top of the file, after imports:
const ALLOWED_AUTO_EXECUTE_COMMANDS = [
'npm',
'npx',
'tsc',
'git log',
'git diff',
'git show',
'list'
] as const
@@ -134,7 +134,7 @@ export class Cline {
}
}
protected isAllowedCommand(command?: string): boolean {
private isAllowedCommand(command?: string): boolean {
if (!command) {
return false;
}