Repository navigation
fix: recognize more shell wrappers [AI] - #112955
Conversation
|
ClawSweeper proof for current head f06324c Behavior proved: shell-wrapper inline payloads no longer satisfy an allow-always entry for the wrapper executable itself, while parseable shell script operands still match their intended allow-always entry.
|
|
Codex review: needs maintainer review before merge. Reviewed July 23, 2026, 7:34 PM UTC. Summary PR surface: Source +289, Tests +638. Total +927 across 19 files. Reproducibility: Yes, source-reproducible: current main lacks the expanded wrapper recognition, and the PR discussion reports focused production-path approval evaluation where wrapper allowlist entries no longer satisfy hidden inline payloads. I did not rerun tests because this review is read-only. Review metrics:
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer decision needed
Next step before merge
Security Review detailsBest possible solution: Land the centralized fail-closed wrapper hardening after a maintainer/security owner accepts the operator compatibility impact and exact-head CI remains green. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main lacks the expanded wrapper recognition, and the PR discussion reports focused production-path approval evaluation where wrapper allowlist entries no longer satisfy hidden inline payloads. I did not rerun tests because this review is read-only. Is this the best way to solve the issue? Yes, this appears to be the best maintainable fix shape: the central wrapper registry, allowlist matcher, command explanation, authorization planning, and system.run execution boundary are updated together while opaque shells are kept out of reusable Bash-style parsing. The remaining question is the intentional compatibility impact, not a patch defect. AGENTS.md: found_applied Codex review notes: model internal, reasoning high; reviewed against be815ae. Label detailsLabel justifications:
Evidence reviewedPR surface:
|
Verification before mergeHead: Review gates:
Validation:
Behavior proof:
Merge notes:
|
…omic-publication-20260724 * origin/main: refactor(memory-lancedb): remove dead legacy path scan (#113299) fix(test): satisfy no-map-spread in exec approvals (#113303) fix: keep OAuth refresh failures terminal [AI] (#112957) fix: reusable exec approvals apply to approved arguments (#112946) refactor(agents): split tool search internals (#113296) fix: keep inline eval approvals one-shot [AI] (#112956) refactor(normalization): reuse trimmed list helpers (#113295) fix(openai): fail fast on invalid TLS certificates (#111818) fix: recognize more shell wrappers [AI] (#112955) fix(i18n): correct Indonesian seconds labels chore(i18n): refresh native locales fix: block opaque exec dispatch wrappers (#112953)
* fix: recognize more shell wrappers * fix: cover windows shell wrapper aliases * fix: limit shell rewrite parsing set * fix: recognize yash cmdline option * fix: fail closed for opaque shell rewrites * fix: recognize nushell execute mode * fix: fail opaque shell allowlist matches closed * fix: suppress opaque shell positional previews * fix: parse nushell value options before commands * fix: block opaque shell script fallbacks * fix: keep nushell startup configs bound * fix: preserve plus-option shell script binding * fix: fail opaque shell fallback paths closed * fix: reject shell inline flags in script fallback * fix: block nushell startup option binding * fix: fail opaque system run transports closed * fix: deny hidden opaque shell approvals * fix: keep startup shell payloads opaque * fix: keep osh shell payloads opaque * fix: use analysis result in allowlist test * fix: parse nushell attached command flags * fix: keep nushell attached parsing local
What Problem This Solves
Fixes an issue where exec approval checks could treat less-common shell wrappers as opaque executables, so inline command payloads were not surfaced consistently for review when those wrappers were allow-listed.
Why This Change Was Made
The shell-wrapper registry now recognizes additional
-ccapable shells and the shared inline-command parser recognizes Nushell's--commandsform. Internal consumers now distinguish wrapper recognition from the narrower shell set that is safe to feed through reusable Bash-style parsing.User Impact
Users and operators get consistent exec approval behavior across the expanded shell set: wrapper allowlist entries no longer hide changed inline payloads for those shells, while existing Bash, Zsh, Fish, PowerShell, cmd, and shell-multiplexer behavior stays unchanged.
Evidence
node scripts/run-vitest.mjs src/infra/exec-wrapper-resolution.test.ts src/infra/exec-wrapper-trust-plan.test.ts src/infra/exec-approvals-allow-always.test.tsgit diff --checkAI-assisted: yes.