zara-shell: validate allowed program/root policy descriptors eagerly #114

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

Problem

CommandPolicy validates environment names and numeric bounds but does not validate the element types/content of allowed_programs or allowed_roots. Malformed policy values can survive construction and later leak incidental TypeError/path conversion behavior from ShellRunner instead of failing at the policy boundary.

Slice

  • deterministic RED coverage for malformed allowed program/root descriptors;
  • reject them during CommandPolicy construction with explicit policy errors;
  • no execution-path widening and no change to Core cancellation requirements;
  • full plugin/registry/Nix verification before merge.

Dependency-ready correctness slice within #5.

## Problem `CommandPolicy` validates environment names and numeric bounds but does not validate the element types/content of `allowed_programs` or `allowed_roots`. Malformed policy values can survive construction and later leak incidental `TypeError`/path conversion behavior from `ShellRunner` instead of failing at the policy boundary. ## Slice - deterministic RED coverage for malformed allowed program/root descriptors; - reject them during `CommandPolicy` construction with explicit policy errors; - no execution-path widening and no change to Core cancellation requirements; - full plugin/registry/Nix verification before merge. Dependency-ready correctness slice within #5.
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#114
No description provided.