Skip to content

Post-release: allow CLI extraction safety limits to be overridden #331

Open

Description

@bsutton

Add explicit CLI overrides for extraction safety limits after the 0.5 release.

The CLI currently constructs ExtractPolicy with defaults of 1 GiB per file, 10 GiB total file bytes and 100,000 selected entries (including directories and symlinks). It exposes boolean overwrite/symlink/permission options but no numeric overrides. Rust API callers can supply a policy. Consequently the CLI can create an archive whose contents it refuses to extract under its defaults.

Scope and acceptance:

  • Expose per-file bytes, total extracted bytes and selected-entry limits on applicable CLI extraction commands, mapping directly to the existing policy. Choose clear names and documented byte units.
  • Preserve existing defaults when options are omitted. Require explicit user input to raise them; do not silently disable safeguards.
  • Define and test handling of zero, malformed values, overflow, conflicting inputs and any supported unlimited setting; reject invalid values clearly.
  • Keep path traversal, signature/authentication, symlink, overwrite and permission protections independent of numeric overrides. No archive-format change is needed.
  • Add public CLI lifecycle tests: create/import through the CLI, demonstrate a deliberately lowered limit refuses extraction, raise it and extract successfully, then independently verify persisted bytes and applicable modes. Cover each limit including directory/symlink counting and boundary behavior without multi-gigabyte test fixtures.
  • Update CLI help and manual archive-limit/file-operation guidance with examples and explanations of policy versus format limits.

This is post-release work; do not delay the current release or restart optimisation to implement it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions