Skip to content

fix(bash): guard PowerShell env output paths#1304

Open
YOMXXX wants to merge 1 commit into
XiaomiMiMo:mainfrom
YOMXXX:fix/1229-powershell-env-external-directory
Open

fix(bash): guard PowerShell env output paths#1304
YOMXXX wants to merge 1 commit into
XiaomiMiMo:mainfrom
YOMXXX:fix/1229-powershell-env-external-directory

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 24, 2026

Copy link
Copy Markdown

Summary

  • add common PowerShell output commands and output-path parameters to bash external-directory scanning
  • scan shell/PowerShell redirection targets before execution so external writes prompt external_directory before bash
  • add regression coverage for fake pwsh $env:* output paths and external redirection targets

Fixes #1229

Tests

  • bun test test/tool/bash.test.ts --timeout 30000
  • bun typecheck
  • git diff --check

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.

Vulnerability: Sandbox escape, AI accesses files outside workspace via PowerShell and $env bypassing any external_directory restrictions

1 participant