Skip to content

archive: add aggregate extraction byte and entry limits #280

Description

@dmcilvaney

archive.Extract limits each regular-file entry to 10 GiB, but it does not limit total extracted bytes or entry count. An archive containing multiple sub-limit files—or a very large number of tiny entries—can still exhaust disk space or inodes during extraction.

This behavior predates archive overlays (introduced in #223), but PRs #275/#276 make Extract part of the source-preparation path.

Expected behavior

  • Track cumulative declared regular-file bytes with overflow-safe arithmetic.
  • Track total archive entries.
  • Fail before either corpus-informed fixed limit is exceeded.
  • Preserve the existing per-entry limit.
  • Add tests for aggregate bytes and entry count.

This should remain internal policy; no user-facing quota configuration is needed unless real source archives require it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions