Skip to content

fix: Sanitize folder paths in terminal sendText to prevent command Injection#190

Open
aakashmandavilli96 wants to merge 1 commit intoaws:1.1from
aakashmandavilli96:1.1
Open

fix: Sanitize folder paths in terminal sendText to prevent command Injection#190
aakashmandavilli96 wants to merge 1 commit intoaws:1.1from
aakashmandavilli96:1.1

Conversation

@aakashmandavilli96
Copy link
Copy Markdown

Issue

  • P381721885

Description of Changes

  • Sanitize folder paths

Testing

  • Need to build the image locally and test the change

Screenshots/Videos

  • NA

Additional Notes

  • NA

Backporting

  • NA

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aakashmandavilli96 aakashmandavilli96 requested review from a team as code owners April 10, 2026 22:27
Copy link
Copy Markdown

@aws-ajangg aws-ajangg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment, otherwise LGTM

+++ b/src/vs/platform/terminal/common/terminalEnvironment.ts
@@ -126,3 +126,29 @@ export function sanitizeCwd(cwd: string)
export function shouldUseEnvironmentVariableCollection(slc: IShellLaunchConfig): boolean {
return !slc.strictEnv;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will strictEnv always be set for ! or should we use it sparingly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants