zara-shell: reject non-integer byte limits in CommandPolicy #148

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

Parent

Advances #5.

Problem

CommandPolicy annotates output/input/environment byte limits as integers but only checks positivity. Direct construction can therefore accept booleans or floats. A float reaches output slicing/arithmetic and can fail at runtime instead of failing closed at policy construction; booleans silently become one-byte limits.

Slice

  • deterministic RED coverage for bool/float byte limits;
  • require each byte limit to be a positive non-bool integer;
  • preserve existing finite-positive runtime validation;
  • no cancellation side channel and no Zara Core changes.

Verification

Plugin tests, registry validator, and nix flake check.

## Parent Advances #5. ## Problem `CommandPolicy` annotates output/input/environment byte limits as integers but only checks positivity. Direct construction can therefore accept booleans or floats. A float reaches output slicing/arithmetic and can fail at runtime instead of failing closed at policy construction; booleans silently become one-byte limits. ## Slice - deterministic RED coverage for bool/float byte limits; - require each byte limit to be a positive non-bool integer; - preserve existing finite-positive runtime validation; - no cancellation side channel and no Zara Core changes. ## Verification Plugin tests, registry validator, and `nix flake check`.
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#148
No description provided.