qwen-code/packages
易良 1356c05e3f
fix(permissions): match env-prefixed shell commands against saved permission rules (#2850)
* fix(permissions): match env-prefixed shell commands

Fixes #2846

* fix(core): improve shell command parsing for env vars and multiline commands

- Add dotAll flag to matchesCommandPattern for matching commands with embedded newlines
- Support newline operators in SHELL_OPERATORS for splitCompoundCommand
- Refactor getCommandRoot to skip leading VAR=value assignments
- Add test coverage for multiline commands and env var prefixed commands

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(permissions): tighten shell command parsing

Handle env-prefixed commands and quoted Windows paths consistently.

Keep newline splitting heredoc-aware and avoid false heredoc detection in comments or arithmetic expressions.

* refactor(permissions): simplify fix by reverting splitCompoundCommand rewrite

Remove ~350 lines of heredoc/comment/arithmetic parsing from
splitCompoundCommand that were not needed to fix #2846. Revert to
the original main version, keeping only the core env-var stripping
logic in matchesCommandPattern and getCommandRoot.

This addresses both reviewer concerns:
- heredoc breakage: no longer an issue since splitCompoundCommand is unchanged
- Windows quoted paths: handled correctly by shell-quote parse in getCommandRoot

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-09 14:25:04 +08:00
..
channels fix(release): run release:version 0.14.2 to sync all package versions (#3026) 2026-04-08 21:33:40 +08:00
cli fix(cli): serialize subagent confirmation focus to prevent concurrent input conflicts (#2930) 2026-04-09 14:24:59 +08:00
core fix(permissions): match env-prefixed shell commands against saved permission rules (#2850) 2026-04-09 14:25:04 +08:00
sdk-java feat: simplify subagent model configuration with model selector 2026-03-27 11:49:45 +08:00
sdk-typescript Merge pull request #2698 from QwenLM/refactor/subagent-model-selection 2026-04-01 16:17:54 +08:00
test-utils fix(release): run release:version 0.14.2 to sync all package versions (#3026) 2026-04-08 21:33:40 +08:00
vscode-ide-companion feat: add wasm build config (#2985) 2026-04-09 14:21:00 +08:00
web-templates fix(release): run release:version 0.14.2 to sync all package versions (#3026) 2026-04-08 21:33:40 +08:00
webui fix(webui): fix chat input scrollbar not draggable in VS Code plugin (#2883) (#3038) 2026-04-09 10:53:39 +08:00
zed-extension chore(zed-extension): update package version to 0.10.0 2026-02-06 14:26:01 +08:00