Skip to content

Commit 3a54e8a

Browse files
committed
remove the dangerous pattern check (appsec verified)
1 parent b559e6c commit 3a54e8a

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

packages/core/src/codewhispererChat/tools/executeBash.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export enum CommandCategory {
1616
Destructive,
1717
}
1818

19-
export const dangerousPatterns = new Set(['<(', '$(', '`'])
2019
export const splitOperators = new Set(['|', '&&', '||', '>'])
2120
export const splitOperatorsArray = Array.from(splitOperators)
2221
export const commandCategories = new Map<string, CommandCategory>([
@@ -187,14 +186,6 @@ export class ExecuteBash {
187186
case CommandCategory.Mutate:
188187
return { requiresAcceptance: true, warning: mutateCommandWarningMessage }
189188
case CommandCategory.ReadOnly:
190-
if (
191-
cmdArgs.some((arg) =>
192-
Array.from(dangerousPatterns).some((pattern) => arg.includes(pattern))
193-
)
194-
) {
195-
// put the mutation message for dangerous pattern command for now, will update as long as finalized with appsec team
196-
return { requiresAcceptance: true, warning: mutateCommandWarningMessage }
197-
}
198189
continue
199190
default:
200191
return { requiresAcceptance: true }

0 commit comments

Comments
 (0)