Recognize PowerShell -ec inline commands [AI]#80893
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: Do we have a high-confidence way to reproduce the issue? Yes from source and dependency proof: current main omits Real behavior proof Next step before merge Security Review detailsBest possible solution: Have a maintainer review the security-sensitive approval behavior, require or explicitly override real behavior proof, and land the narrow parser/test change if the proof and required checks are acceptable. Do we have a high-confidence way to reproduce the issue? Do we have a high-confidence way to reproduce the issue? Yes from source and dependency proof: current main omits Is this the best way to solve the issue? Is this the best way to solve the issue? Yes, extending the shared PowerShell parser and its downstream regression tests is the narrow maintainable fix; merge still needs maintainer handling because of proof and security-sensitive approval scope. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3b82156dff09. |
|
Not applicable to this automation stage; changelog/release-note and external real behavior proof requirements are handled outside auto-pr stages. Quoted comment from @clawsweeper:
|
* fix: recognize PowerShell -ec inline command flag * fix: recognize PowerShell -ec inline command flag * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * fix: recognize PowerShell encoded command prefixes * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * docs: add changelog entry for PR merge
* fix: recognize PowerShell -ec inline command flag * fix: recognize PowerShell -ec inline command flag * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * fix: recognize PowerShell encoded command prefixes * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * docs: add changelog entry for PR merge
* fix: recognize PowerShell -ec inline command flag * fix: recognize PowerShell -ec inline command flag * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * fix: recognize PowerShell encoded command prefixes * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * docs: add changelog entry for PR merge
Summary
-ecencoded-command alias as an inline payload carrier.system.runallowlist evaluation needs to inspect the payload instead of only the wrapper executable.-ecto the PowerShell inline flag set and added regressions for parser extraction, wrapper extraction, command resolution, and allowlist handling.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
-ecwrapper invocations are classified as inline payload carriers before allowlist fallback.src/infra/shell-inline-command.test.ts,src/infra/system-run-command.test.ts,src/infra/exec-wrapper-resolution.test.ts, andsrc/node-host/invoke-system-run.test.ts.Root Cause (if applicable)
-EncodedCommandand-enc, but not-ec.Regression Test Plan (if applicable)
src/infra/shell-inline-command.test.ts,src/infra/system-run-command.test.ts,src/infra/exec-wrapper-resolution.test.ts,src/node-host/invoke-system-run.test.tspwsh -ec <payload>is extracted as a PowerShell inline payload and does not pass allowlist evaluation merely because the wrapper executable is allowlisted.system.runallowlist decision without requiring PowerShell to be installed.User-visible / Behavior Changes
PowerShell
-ecwrapper invocations are now treated consistently with other encoded-command aliases duringsystem.runapproval evaluation.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) YesYes/No) NoYes, explain risk + mitigation: PowerShell-ecinvocations now take the stricter inline-payload approval path. This reduces unintended wrapper-only allowlist matching and does not add new command capabilities.Repro + Verification
Environment
system.runallowlist mode with a PowerShell wrapper allowlist entrySteps
system.runwith a PowerShell-ecencoded payload.Expected
Actual
Evidence
Added regression coverage in the changed test files; project commands were not run by the AI assistant.
Human Verification (required)
What you personally verified (not just CI), and how:
-ec, command extraction, wrapper extraction, and allowlisted wrapper handling.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
-ecmay now require inline payload approval.