openpack
Safe archive reader for ZIP-derived container formats. It reads ZIP, JAR, APK, IPA, and CRX files with mandatory guardrails against Zip Slip, zip bombs, and resource exhaustion.
use OpenPack;
let pack = open_default.unwrap;
for entry in pack.entries.unwrap
let bytes = pack.read_entry.unwrap;
Why this exists
Standard archive readers trust the metadata inside the archive. Security tools reading user-supplied APKs or CRXs face Zip Slip path traversal, extreme compression ratio abuse, and excessive file counts. openpack enforces strict safety limits, rejects malicious paths like ../etc/passwd, and prevents reading beyond configured memory boundaries.
Supported formats
| Format | Features | Internal behavior |
|---|---|---|
| Zip | Default | Standard ZIP archive reading. |
| Jar | Default | Treated as standard ZIP. |
| Apk | apk feature |
Adds read_android_manifest() to extract package and version info. |
| Ipa | ipa feature |
Adds read_info_plist() to extract bundle identifiers. |
| Crx | crx feature |
Parses Chrome extension headers and locates the nested ZIP payload. |
Feature extraction
Read format-specific metadata directly.
// Requires the "apk" feature
let pack = open_default.unwrap;
let manifest = pack.read_android_manifest.unwrap;
println!;
Configuration
Override safety limits via TOML.
= 104857600
= 10485760
= 52428800
= 1000
= 50.0
Contributing
Pull requests are welcome. There is no such thing as a perfect crate. If you find a bug, a better API, or just a rough edge, open a PR. We review quickly.
License
MIT. Copyright 2026 CORUM COLLECTIVE LLC.