Fix terminal command substitution quote handling#12429
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Pushed The previous Windows job had already packaged the extension and uploaded both artifacts, then hit the workflow Validation run locally on the touched area:
The new GitHub checks are running on head |
|
All standard GitHub checks on the current head are green, including CLA, PR Checks, CLI PR Checks, VSIX packaging, GitGuardian, and Cubic. The only remaining status blockers I can see are the Continuous AI contexts, which have been pending since 2026-05-19 02:13 UTC:
Could a maintainer rerun or clear those stale Continuous AI statuses if they are still required for merge? |
Description
Fixes command-substitution scanning in
@continuedev/terminal-securityso it follows shell quoting rules more closely:$()and backticks when they are literal text inside single quotes<(...)This avoids unnecessary permission prompts for safe commands like
echo 'literal $(name)'while preserving and tightening detection for executable substitutions.AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
N/A - terminal-security unit test coverage only.
Tests
npx vitest run test/terminalCommandSecurity.test.ts -t "Subshell and Command Substitution"npm testnpm run buildgit diff --checkSummary by cubic
Fixes command-substitution detection in
@continuedev/terminal-securityto follow shell quoting rules. Reduces false permission prompts while tightening detection for nested and process substitutions.Bug Fixes
$()and backticks inside single quotes; keep detection inside double quotes.<(...)/>(...), but treat them as literal inside double quotes.scanCommandSubstitutions,findClosingBacktick, andfindClosingParen, plus tests for single vs. double quotes and process substitutions.CI
Written for commit 520941b. Summary will update on new commits. Review in cubic