Skip to content

security: bound ZIP/NPZ member decompression - #6

Merged
Pyhroff merged 4 commits into
mainfrom
hardening/zip-member-limits-20261011
Oct 11, 2026
Merged

Pyhroff merged 4 commits into
mainfrom
hardening/zip-member-limits-20261011

Conversation

@Pyhroff

@Pyhroff Pyhroff commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bound ZIP/NPZ archive member count, per-member decompressed bytes, and aggregate decompressed bytes.
  • Replace whole-member ZipFile.read() with bounded streaming reads.
  • Treat oversized entries, archive read failures, and resource-limit hits as suspicious parse errors (MEDIUM), not silently safe.
  • Add self-test regression coverage for per-member and aggregate limits.

Scope

This is separate from PR #5's NumPy header parser change; it hardens ZIP container handling only. The scanner still never deserializes pickle payloads.

Validation

The existing self-test workflow should validate the changes. No security checks are disabled or weakened; this PR is not merged automatically.

@Pyhroff
Pyhroff merged commit ded3823 into main Oct 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant