zara-shell: reject malformed cwd with structured ShellError #134

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

Problem

ShellRunner._validate_cwd() passes caller input directly to Path(). Non-path-like values such as integers can therefore leak a Python TypeError instead of the plugin's structured ShellError contract.

Acceptance

  • deterministic RED test proves malformed cwd currently leaks the wrong exception;
  • malformed cwd is rejected before process creation with ShellError;
  • valid Path/path-like cwd behavior is unchanged;
  • full compatibility/registry/plugin/package gates pass before merge.

This is a bounded local #5 hardening slice and does not implement the Core-blocked explicit cancellation path.

## Problem `ShellRunner._validate_cwd()` passes caller input directly to `Path()`. Non-path-like values such as integers can therefore leak a Python `TypeError` instead of the plugin's structured `ShellError` contract. ## Acceptance - deterministic RED test proves malformed cwd currently leaks the wrong exception; - malformed cwd is rejected before process creation with `ShellError`; - valid Path/path-like cwd behavior is unchanged; - full compatibility/registry/plugin/package gates pass before merge. This is a bounded local #5 hardening slice and does not implement the Core-blocked explicit cancellation path.
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#134
No description provided.