Please do NOT open a public issue for security vulnerabilities.
To report a security vulnerability, please use GitHub's private vulnerability reporting — this is the channel today.
As a fallback, [email protected] is the shared maintainer inbox of the pdfnative and zipnative ecosystems. A dedicated [email protected] inbox is a maintainer decision that has not been taken yet; this file and SUPPORT.md will name it when it exists.
We will acknowledge receipt within 48 hours and aim to provide a fix within 7 days for critical issues. A vulnerability in the engine itself should be reported to zipnative; the CLI will ship the fixed engine version in a patch release.
| Version | Supported |
|---|---|
| 1.1.x | ✅ |
| 1.0.x | |
| < 1.0 | ❌ |
1.1.0 ships the security fixes recorded below — configuration limited to presentation, strict invocation, finite bounds, symlink-safe overwrites, single-descriptor reads, terminal-safe text. Three of them narrow what 1.0 accepted; the CHANGELOG lists each with its migration. A security fix may narrow an input in a minor release; it never widens one.
zipnative-cli is a thin dispatch layer over the zipnative engine. It introduces zero additional runtime dependencies and contains no ZIP parsing logic of its own: every byte of ZIP structure — end-of-central-directory records, central directory, local headers, Zip64, DEFLATE, CRC-32 — is parsed, validated and bounded inside zipnative. See the zipnative security policy for the engine's threat model and its frozen compatibility promise.
The engine, by design, never touches the filesystem, never opens a socket and never evals. That makes the CLI the filesystem trust boundary: it reads the archive bytes, hands them to the engine, and is the sink that writes extracted data to disk. The invariants the CLI adds on top of the engine are described below.
The CLI exposes 17 commands (run zipnative --help or zipnative schema manifest for the authoritative list). No command can open a socket, in any mode — there is no network opt-in.
A .zipnativerc.json planted in a cloned repository is found by the upward discovery the moment
someone types zipnative extract … inside it. Since 1.1.0 a configuration file is
presentation only (src/utils/config.ts, ADR 0001):
it may set format, fields, json, pretty, quiet, no-color, progress, strict,
long and summary — how a result is shown, or a stricter run — and nothing else. Every other
key (overwrite, skip-unsafe, skip-unsupported, allow-symlinks, every --max-*, input and
output paths, name-encoding, timeout, codec, …), the prototype names (__proto__,
constructor, prototype) and a value of the wrong type are E_USAGE naming the file; the
whole file is validated whatever command runs. Only a regular file of at most 1 MiB is read
(size checked on the open descriptor). A key applies only where the command declares the flag,
and the file that supplied defaults is announced on stderr and carried as config: { path, applied } in the --json envelopes. --no-config skips discovery entirely — the recommended
posture for unattended runs. Before 1.1.0 every key but codec was accepted, so a planted file
could disable the limits or turn on --overwrite / --skip-unsafe / --allow-symlinks.
The parser stores flags in a prototype-free record and refuses __proto__ / constructor /
prototype as names; since 1.1.0 the dispatcher also refuses, before any input is read, a flag
the command does not declare, a switch given twice, a single-value flag given twice, a flag given
both bare and with a value, more positionals than the command takes, and an operand together
with the flag it stands for — all E_USAGE, exit 2. A typo such as --overwite or
--skip-unsafe on the wrong command is therefore never a silent no-op. Every task of a batch --manifest gets the same check, for all tasks before the first one runs. A refused value is
never echoed (it may be a secret typed in the wrong place).
Entry names, comments and the engine messages that quote them come from whoever produced the
archive. In text mode every such string is printed through escapeTerminal()
(src/utils/sanitize.ts): C0 controls other than TAB / LF, DEL, C1 controls and the Unicode
bidi embedding / override / isolate controls — and the invisible look-alike characters (U+00AD, U+115F, U+1160, U+200B, U+2028, U+2029, U+2060–U+2064, U+3164, U+FEFF, U+FFA0 and the tag characters U+E0000–U+E007F) — are rendered as visible escapes (\x1b,
\u202e), so a hostile name cannot clear the screen, retitle the window, rewrite earlier lines
of a listing or make evil\u202etxt.exe display as evilexe.txt (Trojan Source,
CVE-2021-42574). Each archive field and every one-line message also has TAB and LF escaped, so a name cannot forge an extra row or a remedy: line. JSON output keeps the exact text (JSON.stringify escapes C0 controls) and
--long keeps the bytes in rawNameHex. The repository holds itself to the same rule:
tests/docs/source-hygiene.test.ts fails on any raw control or bidi character in a tracked text
file.
The agent-native contract is a pure local presentation/validation layer and adds no network surface:
--jsononly changes how diagnostics are formatted on stderr (a machine-readable envelope). It never alters what is written to stdout and never relaxes any security check. Underbatch --manifest --jsonevery task's stdout is captured into the single batch document (64 MiB cap →E_LIMIT), and a task that would write an artefact to stdout is refused at validation.--dry-runvalidates inputs and plans — archives are opened, every destination is proven safe, edits are applied to the modifier,modifyverifies the entries it would re-emit, manifests are resolved — and short-circuits before producing or writing output.--strictonly tightens: the first engine diagnostic becomes a hard error before any output byte.- Stable
E_*classes carry a failure class;error.zipCodecarries the engine's frozenZIP_*cause verbatim;detailcarries only the structured fields the engine (or the CLI-owned--max-input-sizebound) defines ({ limit, configured, observed },{ feature },{ expectedCrc, actualCrc }). Internal parser state and byte offsets are never exposed beyond what the engine's own remedy-bearing message states. - The same switches are honoured from the environment (
ZIPNATIVE_JSON,ZIPNATIVE_DRY_RUN,ZIPNATIVE_QUIET,ZIPNATIVE_STRICT,ZIPNATIVE_PURE_CODECS,ZIPNATIVE_PROGRESS), so a manifest task inherits the mode of itsbatchinvocation; there is no environment variable that loosens a check. --timeout <duration>only bounds a run: past the deadline the engine (zipnative 1.1signal) and the CLI's own byte loops stop at the next chunk or entry boundary withE_LIMIT(detail.limit: "timeout") and the file being written is removed.--progresswrites snapshots to stderr only.
The engine's extractZip / extractZipStream yield { path, entry, data | stream() } with path already run through sanitizeEntryPath() and the hostile shapes already refused (rejectTraversal, rejectSymlinks, onDuplicate: 'error', the limits). extract and stream --output-dir share one sink (src/utils/sink.ts), hardened in two phases:
- Plan (lexical) — the extraction generator is drained without decompressing anything. For every entry the CLI recomputes the destination with
safeJoin(root, path)(src/utils/io.ts), which resolves the absolute target and proves it stays inside the resolved--output-dir(a relative-path escape, an absolute result or a..segment throwsE_SECURITY). Existing files are refused unless--overwrite(E_IO). On case-insensitive filesystems (win32, darwin) two entries whose targets fold to the same path are refused (ZIP_EXTRACT_DUPLICATE_PATH) unless--on-duplicate first|lastresolves it deliberately. Directory entries go throughsanitizeEntryPath()+safeJointoo. - Write (physical) — before
mkdir -pof a target's parent, the nearest existing ancestor isrealpath'd and must lie under the root'srealpath; after the directory is created it is re-checked the same way. A symbolic link or junction planted inside the destination that points outside is refused withE_SECURITY("Refusing to write through a link that leaves the output directory…") and nothing is created beyond the link. Without--overwriteany existing path — a dangling symlink included (lstat, which also closes Windows'CREATE_NEW-follows-a-dangling-link hole) — is refused and every file is created exclusively (wx), so a file that appears between the plan and the write is refused like any pre-existing one — there is no check-then-write window. With--overwritethe entry is written to an exclusively created temp sibling andrename()d over the target, so a symlink planted at the target is replaced, never followed (1.0 opened it withw, which truncated and wrote through the link). Each entry streams in with backpressure; a CRC / size failure removes only the file the write created — a pre-existing target is never truncated or removed.--preserve-modeappliesmode & 0o777to files only (never setuid, setgid or sticky; POSIX only).
Residual window. The only gap left is between the realpath check and the exclusive open: an attacker who can replace a directory with a link inside that interval and who already has write access to the destination could redirect one file. The posture is therefore: extract into an empty or trusted destination; the CLI never extracts into a location it did not check, but it cannot lock a directory it does not own.
Opt-outs are skip-not-write: --skip-unsafe skips entries whose names cannot be made safe (they are listed in the envelope as skipped: unsafe-path and never written); --skip-symlinks drops symlink entries; --allow-symlinks writes the link target text as a regular file — a symlink is never materialised by the CLI under any flag; --skip-unsupported skips encrypted entries and methods with no registered codec (skipped: unsupported). --flat writes basenames only and applies the same duplicate policy.
stream --output-dir is the same sink over the forward reader: because iterateZipEntries does not sanitise names, the CLI applies sanitizeEntryPath() itself before safeJoin, entry by entry.
The policy is uniform across every writer, not only the sink: create -o, modify -o, cat -o, inflate -o, extract, stream --output-dir and batch --task create (directory mode) refuse an existing path — a dangling symlink included — with E_IO ("Refusing to overwrite existing file (pass --overwrite)") and leave it intact; --overwrite writes an exclusive temp file next to the target and renames it into place (a planted symlink is replaced, not followed; a failed write leaves the original untouched). The write layer is the only code that removes a partial file, and only one it created: before 1.1.0 an engine error raised before the deferred exclusive open could make cat / inflate / create unlink a pre-existing output. modify --in-place never writes into the original: it writes to an unpredictable, exclusively created temporary file (<input>.tmp-<pid>-<12 hex>) and renames atomically. Writing to stdout (- or no -o) is unaffected. Partial outputs are removed on failure, and a SIGINT / SIGTERM handler removes only the file currently being written (never a completed output, never the original of --in-place) before exiting 130 / 143.
- Argv paths are the user's own filesystem authority.
zipnative list ../a.zip,-o ../out.zipor--output-dir ../xare ordinary shell usage and are accepted; the CLI does not second-guess where the invoking user may read or write.validatePath()— the..refusal,E_INPUT"Path traversal detected" — applies to paths that arrive as data: the path flags ofbatch --manifesttasks and thepathvalues ofcreate/modifymanifests. Entry names are a different matter (see below). --max-input-size <size>(global; default 4 GiB; always finite) bounds every buffered read through one descriptor: stdin is byte-counted and the read aborted; a regular file is size-checked on its open descriptor and read to that size only (a file that grows after the check is never read past it; short reads loop); a pipe, FIFO or device (<(curl …),/dev/zero) is byte-counted like stdin — 1.0stat'd the path, saw size 0 for/dev/zeroand read it whole —list,inspect,verify,extract,cat,modify,create --stdin-name,inflate --sync,govern verify-issue. Exceeding it isE_LIMITwithdetail { limit: "maxInputSize", configured, observed }(CWE-400). It is a CLI-owned bound, not aZipLimitskey;doctorreports it underlimits. The streaming paths —stream,crc32,inflate(default),create --stream— are constant-memory and are not bounded by it. Random-access commands hold the whole archive in memory, so the bound is also the memory envelope.- JSON input size is capped at 50 MB before
JSON.parse—create --from-manifest,modify --from-manifest,batch --manifest,govern verify-issuedrafts. Batch manifests are additionally bounded to 1 000 tasks..zipnativerc.jsonis capped at 1 MiB (checked on the open descriptor). - Manifest values —
batch --manifestis validated strictly before anything executes: structural violations exit 2 /E_USAGE, value violations (bad or duplicate id, non-whitelisted command, forward or unknown@ref) exit 1 /E_INPUT; only 10 archive commands may appear (neverbatch,govern,schema,completion,doctor); acodecflag is refused unless thebatchinvocation itself carries--allow-codec-load. A manifest has the filesystem access of the user who invokesbatch— the same trust level as flags typed on the command line, no more. --max-*semantics — the nine flags map one-to-one onto the engine'sZipLimitsand are pre-validated (E_USAGEon malformed or zero values), so an invalid limits object can never reach the engine. Every bound is finite: the 1.0none/infform (Infinity) is refused since 1.1.0 with a remedy naming an explicit value (ADR 0002), and no bound can come from a config file; the defaults are always on when no flag is given. zipnative 1.1's ninth bound,maxEntryCompressedSize(CWE-770,--max-entry-compressed-size, default 1 GiB + 1 MiB), is consulted by the byte-range reader thatlist,catandverify --rangeuse: it bounds every whole-entry fetch (cat --raw,verify), and--max-input-sizedoes not apply under--range(ADR 0011);doctor/schema limitsreport it with the other eight.inflatederives its mandatory--max-outputdefault from the effective--max-entry-size. The bounds also apply on the write side (create/modify).- Every entry name the CLI writes (
createinputs,--stdin-name, manifests,modify --add/--rename/--add-dir) is pre-checked with the engine'ssanitizeEntryPath(): a name that could not be extracted safely is refused at creation time (E_INPUT, withentryName). Malformed flags stayE_USAGE; unsafe data isE_INPUT. - Dates are data too:
--date <ISO>and manifestdatevalues are read as UTC wall-clock, so the stored DOS fields — and the archive bytes — do not depend on the host time zone. A date outside 1980–2107 is clamped by the engine and reported (ZIP_TIMESTAMP_CLAMPED, zipnative 1.1), an error under--strict. --name-encoding <label>hands the engine aTextDecoder(the runtime's own, no table shipped) for names without the UTF-8 flag; the engine decodes beforesanitizeEntryPath(), so a decoded name passes exactly the same guards (zipnative 1.1, CWE-22).list/inspectJSON output is derived from the engine's typed entry objects; raw payload bytes are never emitted except bycat/stream --cat/inflate, whose purpose is exactly that. Raw name and comment bytes are exposed only as hex (rawNameHex,commentHexunder--long;archive.commentHex) and extra-field payloads only as hex underinspect --extra.
Every row below is enforced by zipnative on every code path the CLI uses; the last column is the CLI switch, if any.
| Threat | Defence | CWE | zipCode |
CLI switch |
|---|---|---|---|---|
Zip-slip path traversal (../, absolute paths, drive letters, UNC, backslashes, NUL, NTFS ADS, Windows reserved device names) |
rejectTraversal: true by default; sanitizeEntryPath() for external sinks |
CWE-22 / CWE-67 | ZIP_PATH_TRAVERSAL |
extract --skip-unsafe (skip, never write) |
| Decompression bombs (high ratio, nesting, entry floods) | per-entry and total output caps, ratio bound, entry-count cap — enforced during inflation | CWE-400 / CWE-409 | ZIP_LIMIT_EXCEEDED |
--max-entry-size, --max-total-size, --max-ratio, --max-entries |
| Symlink entries redirecting extraction | rejectSymlinks: true by default |
CWE-59 | ZIP_SYMLINK_REJECTED |
extract --allow-symlinks (target text as data) / --skip-symlinks |
| Overlapping entries | always-on overlap detection over central-directory ranges | CWE-405 | ZIP_ENTRY_OVERLAP |
none |
| Parser-differential smuggling (central directory vs local headers) | the central directory is authoritative; method divergence is fatal, name divergence is diagnosed | CWE-436 | ZIP_CD_LFH_MISMATCH |
none |
| Ambiguous EOCD (trailing garbage, multiple candidates) | only a self-consistent EOCD closest to EOF is accepted; ambiguity is refused | — | ZIP_EOCD_NOT_FOUND |
none |
| Zip64 field spoofing | Zip64 records cross-checked against every non-sentinel classic field | CWE-1288 | ZIP_ZIP64_CONTRADICTION |
none |
| Duplicate entry names (shadowing) | onDuplicate: 'error' by default |
CWE-694 | ZIP_EXTRACT_DUPLICATE_PATH |
--on-duplicate first|last |
| Integer overflow (> 2^53 sizes / offsets) | 64-bit fields read via BigInt and rejected above Number.MAX_SAFE_INTEGER |
CWE-190 | ZIP_VALUE_UNREPRESENTABLE |
none |
| Oversized names / extra fields / comments / central directory | maxNameBytes, maxExtraFieldBytes, maxCommentBytes, maxCentralDirectoryBytes |
CWE-400 | ZIP_LIMIT_EXCEEDED |
--max-name-bytes, --max-extra-bytes, --max-comment-bytes, --max-cd-bytes |
The defaults (100000 entries, 1 GiB per entry, 8 GiB total, 1024:1 ratio, 4096-byte names, 65535-byte extra fields and comments, 256 MiB central directory) are the safe path for untrusted input; raising one is always an explicit decision.
The rows the CLI adds because it owns the process and the filesystem (the knowledge base §6 carries the full table):
| Threat | Defence | Status / residual |
|---|---|---|
| Unbounded stdin / file / device buffering (memory exhaustion) | --max-input-size (4 GiB default) on every buffered read, through one descriptor (devices and pipes byte-counted); streaming commands are constant-memory |
always finite (1.1.0) |
Hostile .zipnativerc.json in a cloned repository |
presentation-only keys; every other key E_USAGE naming the file; the applying file named on stderr and in the envelope |
--no-config for unattended runs |
| A typo or a misplaced flag silently ignored | unknown / repeated / surplus flags and operands E_USAGE before any input is read (argv and every manifest task) |
none |
A copy that launders a lying entry (merge, manifest raw entries) |
every copied entry decoded once first — CRC-32 and size checked, no opt-out; an unverifiable entry refused (E_UNSUPPORTED) or skipped (--skip-unsupported) |
none |
An archive larger than memory (--range) |
read by byte ranges through one descriptor of a regular file; each whole-entry fetch bounded by --max-entry-compressed-size (CWE-770); stdin and devices refused |
none |
| Terminal escape / bidi injection through entry names | text output escaped (escapeTerminal); JSON exact; rawNameHex |
none |
| A symlink planted at an output path | lstat refusal without --overwrite; temp + rename() with it (replaced, never followed) |
none |
Symlink / junction planted inside --output-dir |
realpath anchor of the nearest existing ancestor before mkdir, re-check after; refused with E_SECURITY |
the realpath → open window: use an empty or trusted destination |
| File appearing between plan and write | exclusive wx open unless --overwrite; E_IO refusal |
none |
| Partial output under its final name (failure or interrupt) | the write layer removes only the file it created (a pre-existing target is never removed); SIGINT / SIGTERM remove the in-flight file only, exit 130 / 143 |
signals are POSIX-only in practice |
modify laundering a hostile record into a canonical-looking archive |
eager open + verifyEntry() on every re-emitted entry before the save (see below) |
encrypted / stream-only-codec content cannot be checked: their local header is, and they are counted |
A --codec module shaping the writer silently |
override announced (warning: line, tier); create --parallel refuses such a module |
see Code Safety |
The default modify save is the engine's append-only save(): the original bytes are kept verbatim and a new central directory is appended, so untouched entries are never recompressed — and removed or replaced content remains recoverable from the output file. --compact selects saveCompact(), a canonical rewrite (still no recompression) in which removed content is truly gone. The CLI prints an info: line whenever a destructive edit is saved append-only, and the engine emits the ZIP_DEAD_BYTES_RATIO diagnostic above 50 % dead bytes. 7-Zip's CLI is also known to mis-read the append-only layout (it does not honour the final central directory); ship --compact output when interoperability with 7-Zip matters.
Because both save modes copy untouched records verbatim, modify must not launder a hostile archive into a clean-looking one. It opens the archive eagerly (overlaps and the central-directory ↔ local-header structure are checked before any edit) and, before save() / saveCompact(), calls reader.verifyEntry() on every entry that will be re-emitted (every entry not removed or replaced; renamed entries are verified under their original record): CRC-32, sizes and the local header against the central directory — one decompress pass, never a recompress. A lying record is refused with the entry named: E_SECURITY ZIP_CD_LFH_MISMATCH, E_DATA ZIP_CRC_MISMATCH or ZIP_SIZE_MISMATCH. Encrypted entries and entries whose registered codec has no decompressSync cannot have their content verified: since zipnative 1.1 their local header is still cross-checked (a mismatch is refused like any other, ZIP_CD_LFH_MISMATCH) and they are counted in verifySkipped; an entry with an unregistered method is refused (E_UNSUPPORTED / ZIP_UNSUPPORTED_METHOD, load --codec). The check runs under --dry-run too and has no opt-out — an opt-out would write unverified bytes. The envelope reports verified, verifySkipped, tier, changed and layout: append-only | compact.
stream reads local headers alone through iterateZipEntries — there is no central directory to cross-check names, sizes, methods or attributes, so a hostile archive can present different content there than list / extract authoritatively report. Consequently --preserve-mode, --allow-symlinks and --skip-symlinks are refused in forward mode (E_USAGE), every JSON output carries trust: "local-headers-only", a warning: line is printed at start, and every name written to disk goes through sanitizeEntryPath() + safeJoin. All size limits are enforced by output counting and CRCs are verified. Entries written with data descriptors carry zero sizes in their local header, so --summary reports descriptorEntries and bytesKnown: false rather than pretending. A custom-method entry is decoded in forward mode only when its --codec exposes createDecompressor() (zipnative 1.1); otherwise the engine refuses it before the first byte (E_UNSUPPORTED ZIP_UNSUPPORTED_CODEC_MODE), which --skip-unsupported skips — cat / extract --codec read it from the complete file. Use stream only for input you cannot seek; prefer list / extract on a complete file.
- No
eval(),Function(), or dynamic code execution — with one declared exception:--codec <module>dynamically imports a user-supplied ESM module and registers its codecs (registerCodec,setInflateImpl,setDeflateImpl). It runs with the invoking user's privileges (the same trust asnode -r), so it is honoured only from argv:.zipnativerc.jsonrefuses thecodeckey (a hostile repository cannot run code when you typezipnative listinside it), abatch --manifesttask carryingcodecis refused unless the invocation itself passes--allow-codec-load, and a loaded module is reported truthfully. Registered codecs are not confined to the reader: the engine resolves methods 0 (store) and 8 (deflate) through the registry, so a module that registers either replaces the built-in compressor forcreate/modify— even under--deterministic, which pins only the engine's own encoder — and a sequentialcreateannounces it with awarning:line (silent under--dry-run); a module exportingdeflateImplreplaces the sync deflate tier and shows up astier: "injected"in the envelope unless--deterministicpins the engine's encoder (pure-pinned).create --parallelrefuses (exit 2) a module registering method 0 / 8, and adeflateImplwithout--deterministic, because the worker pool never sees the module and the envelope would lie.batch --manifestotherwise dispatches only to a fixed whitelist of CLI command modules. - No sockets. No command opens a network connection; there is no flag that could.
doctor,governandschemaare fully local. - The CLI never post-processes archive bytes: what the engine writes is what is written to disk, so the engine's
deterministic: truebyte contract holds end to end. - Signals.
SIGINT/SIGTERMremove exactly the files being written at that moment (src/utils/inflight.tsregisters a file only once the CLI created it) and exit 130 / 143; completed outputs and the original ofmodify --in-placeare never touched. POSIX only in practice (Windows has no signals for child processes). - Supply chain. The package ships the CJS bin only (
dist/cli.cjs, no ESM build, no.d.ts, no source maps, nomainentry) plusAGENTS.md,llms.txt,docs/data/errors.json,README.md,CHANGELOG.md,SECURITY.md,THIRD-PARTY-NOTICES.md,LICENSEandpackage.json— 10 files, pinned indocs/data/package-files.json(legal texts by SHA-256).scripts/lib/bundle-probe.mjsfails the build if engine code is inlined, a module outside the allow-list is required, or aconsole.log, an attribution trailer or embedded binary data appears;scripts/smoke-install.mjsinstalls the packed tarball into an empty project and proves it pulls exactly one runtime dependency. The release (ADR 0009) runs in five jobs —guard(tag =v<version>, tags only),build and pack(the whole publish gate with noid-tokenand no cache, one tarball and its SHA-256 / SHA-512),publish to npm(behind thenpm-publishenvironment,.nvmrconly, digests re-checked, an npm client pinned by SHA-512, Trusted Publishing with provenance — noNPM_TOKENanywhere)attest and attach(the tarball fetched back from the registry and compared, CycloneDX + SPDX + toolchain SBOMs written bynpm sbom, everything attested withactions/attest-build-provenanceand attached to the GitHub Release with the Sigstore bundle — no code fetched from the registry runs in this job) andverify as a consumer(read-only permissions: the published version installed into an empty project,npm audit signatures, the installed bin run). Verify a release:npm install zipnative-cli@<version> && npm audit signatures;gh attestation verify zipnative-cli-<version>.tgz -R Nizoka/zipnative-cli. Repository side: every workflow job starts withstep-security/harden-runner, installs withnpm ci --ignore-scripts(the tracked.npmrcsays the same for every machine), keeps no checkout credentials and pins every action to one SHA; zizmor, actionlint andreuse lintcheck the workflows and licences; CodeQLsecurity-extendedcovers the TypeScript and the workflows; OpenSSF Scorecard, dependency review, a weekly npm audit + OSV-Scanner and Dependabot (seven-day cooldown, the engine bumping alone) watch the dependencies;.github/rulesets/holds branch and tag protection as code;tests/tools/workflows.test.tspins all of it. CI also proves the bundle is byte-reproducible (two builds, one hash). Contacts: security.txt, Security Insights.
- Encryption, read or write. ZipCrypto is cryptographically broken; the engine will never write it and does not read it in 1.x. Encrypted entries are detected (
isEncrypted; since zipnative 1.1 the scheme is named —detail.featurezipcrypto,aesorstrong-encryption), listed, counted byinspect, reported asskipped: "encrypted"byverify(passing only when their local header agrees), skippable withextract --skip-unsupported/stream --skip-unsupported, copied with their header checked bymodify(counted inverifySkipped), and refused on read withZIP_UNSUPPORTED_ENCRYPTION. There is no password flag. - Multi-disk / spanned archives — refused (
ZIP_UNSUPPORTED_MULTI_DISK). - Archive repair / salvage — structural problems are reported (
verify,inspect), never guessed at. - Other archive formats — none.
Every archive the CLI writes is validated against ISO/IEC 21320-1:2015 by scripts/validate-zip.mjs, a validator vendored from the engine (zipnative/scripts/validate-zip.ts, commit 1e2ab42, zipnative 1.1.0) that raw-parses the bytes with its own reader and never imports zipnative — so it cannot attest the engine with the engine. npm run validate:zip builds the CLI, drives the built binary to write a 41-archive corpus (37 conformant, including 3 hostile-but-conformant archives — zip-slip, a Windows device name, duplicate paths — that pass the ISO profile and that extract must refuse; plus 4 raw-crafted negative canaries the validator must reject with a declared check id), and validates every file: the expected verdict is 37 PASS, 4 XFAIL, 0 FAIL. An unexpected pass of a canary is fatal, and a coverage canary fails the run if a required check id has no canary. Level 0 always runs; level 1 foreign integrity tools skip visibly when absent and VERAZIP_REQUIRED=1 fails closed in CI. The gate is blocking in .github/workflows/verazip.yml (Linux + Windows, on every push and PR — no path filter) and again before every publish. Conformance is not safety — hostile-but-spec-valid archives are exactly why the guards above exist.
We follow coordinated disclosure. We ask that you:
- Report vulnerabilities privately (see above).
- Allow us reasonable time to fix and release a patch before public disclosure.
- Avoid testing against systems you do not own.
Confirmed vulnerabilities are fixed in a patch release with a GitHub Security Advisory and a CHANGELOG entry crediting the reporter (unless anonymity is requested).