zara-shell: reject scalar argv before execution #137

Closed
opened 2026-09-08 02:03:03 +00:00 by nsaspy · 0 comments
Owner

Plugin

zara-shell

Defect

ShellRunner._validate_argv() accepts any Sequence[str]. A bare string is therefore interpreted as a character sequence instead of rejected as a malformed argv container. Depending on the first character and allowlist, this can produce misleading program-policy behavior instead of a precise provider-boundary error.

Required behavior

  • argv must be a non-string sequence of non-empty strings;
  • scalar strings/bytes and other malformed containers fail with ShellError before subprocess.Popen;
  • existing allowlist, cwd, input/output, environment, timeout and process-group semantics remain unchanged.

RAGE

Deterministic RED first, smallest implementation, full plugin/registry/Nix exact-head gate before merge.

Advances #5; does not implement cancellation or modify Zara Core.

## Plugin `zara-shell` ## Defect `ShellRunner._validate_argv()` accepts any `Sequence[str]`. A bare string is therefore interpreted as a character sequence instead of rejected as a malformed argv container. Depending on the first character and allowlist, this can produce misleading program-policy behavior instead of a precise provider-boundary error. ## Required behavior - `argv` must be a non-string sequence of non-empty strings; - scalar strings/bytes and other malformed containers fail with `ShellError` before `subprocess.Popen`; - existing allowlist, cwd, input/output, environment, timeout and process-group semantics remain unchanged. ## RAGE Deterministic RED first, smallest implementation, full plugin/registry/Nix exact-head gate before merge. Advances #5; does not implement cancellation or modify Zara Core.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara-plugins#137
No description provided.