zara-files: reject scalar and malformed root collections before confinement setup #56

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

Problem

FileDomain.__init__() iterates roots without validating the collection shape. A scalar string is therefore treated as a sequence of root descriptors; in the worst case roots="/" successfully configures the filesystem root as root-0 instead of rejecting malformed configuration. Other malformed scalars can leak incidental Python/path errors.

Required behavior

  • configured roots must be an explicit bounded list/tuple of path descriptors, never a scalar string/bytes/mapping
  • empty collections still fail closed
  • malformed collection shape fails as FileDomainError before root inspection
  • valid explicit roots preserve current symlink/directory confinement checks
  • deterministic regression proves scalar / cannot become a configured root
  • full registry/source/install/Nix gate remains green

No Zara Core changes.

## Problem `FileDomain.__init__()` iterates `roots` without validating the collection shape. A scalar string is therefore treated as a sequence of root descriptors; in the worst case `roots="/"` successfully configures the filesystem root as `root-0` instead of rejecting malformed configuration. Other malformed scalars can leak incidental Python/path errors. ## Required behavior - configured roots must be an explicit bounded list/tuple of path descriptors, never a scalar string/bytes/mapping - empty collections still fail closed - malformed collection shape fails as `FileDomainError` before root inspection - valid explicit roots preserve current symlink/directory confinement checks - deterministic regression proves scalar `/` cannot become a configured root - full registry/source/install/Nix gate remains green No Zara Core changes.
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#56
No description provided.