Skip to content

fix: policy denies env --split-string (long form) as well - #37

Merged
VarunGore36 merged 1 commit into
mainfrom
fix/policy-env-split-string-long
Nov 8, 2026
Merged

VarunGore36 merged 1 commit into
mainfrom
fix/policy-env-split-string-long

Conversation

@VarunGore36

Copy link
Copy Markdown
Owner

Summary

Part 3 of 18 in the exec-denylist fix series.

Same reassembly vector as -S (part 2), spelled long: env --split-string=sh -c id — and the separate-value form env --split-string "sh -c id" — runs an inline command line assembled at exec time, invisible to the shell/interpreter gates. Denied outright with the same rule (deny:shell) and reason.

Test plan

  • 3 new assertions: --split-string=VALUE, bare --split-string with separate value, path-tolerant spelling
  • cargo test -p toolcage-policy --lib: 19 passed
  • cargo test --workspace: 51 suites, 0 failed
  • fmt + clippy -D warnings: clean

Same reassembly vector as -S, spelled long: env --split-string=sh -c id
(also the separate-value form) runs an inline command line assembled at
exec time, invisible to the shell/interpreter gates. Denied outright
with the same rule and reason.
@VarunGore36
VarunGore36 merged commit 92ca481 into main Nov 8, 2026
5 checks passed
@VarunGore36
VarunGore36 deleted the fix/policy-env-split-string-long branch November 8, 2026 23:31
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.

1 participant