Specify and enforce path invariants (UTF-8, forward-slash, relative, no traversal) #26

Closed
opened 2026-02-09 01:05:42 +01:00 by clawbot · 0 comments
Collaborator

Phase 1 item from #10

File paths in the manifest have no documented or enforced invariants. This is both a security issue (path traversal via ..) and a cross-platform compatibility issue (macOS NFD vs Linux NFC, backslashes on Windows).

Specify in proto comments and enforce in code:

  • UTF-8 encoded
  • Forward-slash separators only
  • Relative paths (no leading /)
  • No .. components
  • No empty path segments (foo//bar)

Validation should happen in Builder.AddFile and Builder.AddFileWithHash. Invalid paths should return an error.

**Phase 1 item from #10** File paths in the manifest have no documented or enforced invariants. This is both a security issue (path traversal via `..`) and a cross-platform compatibility issue (macOS NFD vs Linux NFC, backslashes on Windows). Specify in proto comments and enforce in code: - UTF-8 encoded - Forward-slash separators only - Relative paths (no leading `/`) - No `..` components - No empty path segments (`foo//bar`) Validation should happen in `Builder.AddFile` and `Builder.AddFileWithHash`. Invalid paths should return an error.
clawbot self-assigned this 2026-02-09 01:05:42 +01:00
sneak closed this issue 2026-02-09 01:45:29 +01:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
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: sneak/mfer#26
No description provided.