Buyer-visible release-verification resource gap
Fresh protected main 7faf7a3b8a47980113982914000e724ab6a6cda5 still opens the final publication wheel with zipfile.ZipFile(...) before applying any semantic member-count ceiling in scripts/ci/verify_distribution.py. ZipFile parses and materializes the complete central directory into ZipInfo objects during initialization, after which _verify_wheel(...) calls namelist() and builds another complete Python list before path validation.
This is distinct from #69's already-integrated bounded SBOM generator and is the wheel-side sibling of #215/#216. The SBOM generator already preflights the ZIP end record and central directory before allowing ZipFile to allocate member objects; the final publication distribution verifier remains a separate evidence authority and does not yet do so.
RCA
First failing boundary: final wheel publication verification, after a bounded immutable source snapshot is created but before ZipFile central-directory object materialization.
Immediate cause: _verify_wheel(...) constructs zipfile.ZipFile(wheel_file) with no prior finite central-directory member-count admission. namelist() then creates a second full list.
Systemic cause: the verifier has a compressed 256 MiB file ceiling and stable snapshot/digest binding, but no independent finite semantic wheel-member ceiling before the standard-library ZIP parser allocates one ZipInfo per central-directory entry.
Falsifiable hypothesis: if the stable snapshot receives a bounded canonical EOCD/central-directory preflight that rejects an over-budget or unsupported ZIP structure before ZipFile(...), then later standard-library semantic parsing is bounded by the reviewed member ceiling and cannot allocate an unbounded number of ZipInfo objects.
Distinct remedies / feasibility
- Preferred: reuse the already-proven EgressWeave SBOM design at this separate parser boundary: bounded EOCD tail read, single-disk/non-ZIP64 canonical central-directory validation, count entries before
ZipFile, reject above an explicit finite member ceiling, reset the snapshot, then run normal ZipFile semantic verification.
- Open
ZipFile and check len(infolist()) or len(namelist()) afterward: rejected because the complete ZipInfo set has already been materialized.
- Rely only on the 256 MiB compressed-file ceiling: rejected because metadata object count and Python object overhead are not independently bounded by compressed bytes.
- Delegate final verification to the SBOM generator: rejected because publication verification and SBOM generation are distinct evidence authorities with different outputs and failure contracts.
Acceptance criteria
Non-goals
Buyer-visible release-verification resource gap
Fresh protected
main7faf7a3b8a47980113982914000e724ab6a6cda5still opens the final publication wheel withzipfile.ZipFile(...)before applying any semantic member-count ceiling inscripts/ci/verify_distribution.py.ZipFileparses and materializes the complete central directory intoZipInfoobjects during initialization, after which_verify_wheel(...)callsnamelist()and builds another complete Python list before path validation.This is distinct from #69's already-integrated bounded SBOM generator and is the wheel-side sibling of #215/#216. The SBOM generator already preflights the ZIP end record and central directory before allowing
ZipFileto allocate member objects; the final publication distribution verifier remains a separate evidence authority and does not yet do so.RCA
First failing boundary: final wheel publication verification, after a bounded immutable source snapshot is created but before
ZipFilecentral-directory object materialization.Immediate cause:
_verify_wheel(...)constructszipfile.ZipFile(wheel_file)with no prior finite central-directory member-count admission.namelist()then creates a second full list.Systemic cause: the verifier has a compressed 256 MiB file ceiling and stable snapshot/digest binding, but no independent finite semantic wheel-member ceiling before the standard-library ZIP parser allocates one
ZipInfoper central-directory entry.Falsifiable hypothesis: if the stable snapshot receives a bounded canonical EOCD/central-directory preflight that rejects an over-budget or unsupported ZIP structure before
ZipFile(...), then later standard-library semantic parsing is bounded by the reviewed member ceiling and cannot allocate an unbounded number ofZipInfoobjects.Distinct remedies / feasibility
ZipFile, reject above an explicit finite member ceiling, reset the snapshot, then run normalZipFilesemantic verification.ZipFileand checklen(infolist())orlen(namelist())afterward: rejected because the completeZipInfoset has already been materialized.Acceptance criteria
MAX_WHEEL_MEMBERScontract and reject over-budget central-directory entry count beforezipfile.ZipFile(...)is constructed.verify_distribution.pywriter lane; do not create a competing branch for the same path.Non-goals