#39

fix(npm): pin adm-zip 0.6.1 and prepare v1.3.3

OpenxlabMemberwants to merge intofrom

The npm package @trylle/trylle-cli 1.3.2 depends on adm-zip 0.6.0, which has 7 high advisories (symlink-following extraction, kept SUID bits, a way around the decompression-bomb check, and more). 0.6.1 (2026-09-11) fixes all of them.

  • adm-zip 0.6.1 is pinned in two places:

    • packaging/npm/base.package.json.tmpl, which is what the published package uses;
    • the wrapper's package.json and lockfile.

    npm audit now reports 0 vulnerabilities.

  • install.ts uses only new AdmZip, getEntry and getData, and writes the binary itself with mode 0755. The only 0.6.1 changes that affect it reject malformed archives: duplicate entry names and truncated data.

  • Smoke test: the built installer, run against a zip made the way the release workflow makes one and served locally over HTTPS, installed and ran the binary. A zip with a duplicate entry and a truncated zip were both rejected without writing a binary.

  • Postinstall fallback URL: it pointed at github.server_url (api.trylle.com) and returned 404. It now points at https://trylle.com/<repo>/releases/download, where the release API says the assets are served. Anonymous requests still get 404 there, because this repo is private.

  • chore: prepare v1.3.3 changes the same files as v1.3.2's prepare commit.

To release: merge, tag the merge commit v1.3.3, push the tag, and approve the crates, npm and pypi environments. Optionally, deprecate 1.3.2 on npm afterwards.

Activity

6
trylle-botreviewed18d ago
trylle-bot18d ago

Review: pin adm-zip 0.6.1 and prepare v1.3.3

Reviewed the diff against the surrounding install/index code, the release workflow, and the asset-naming paths the postinstall URL depends on.

Verdict

Safe to merge. No blocking correctness or security issues found. This is a well-scoped dependency-security bump plus a real fix to the postinstall fallback URL.

What I verified

  • adm-zip 0.6.1 is pinned everywhere the published package pulls it from: packaging/npm/base.package.json.tmpl (what npm install actually installs) and the wrapper's package.json + package-lock.json. The lockfile's resolved/integrity also move to 0.6.1, so the runtime pin is real, not just a manifest edit.
  • The bump is safe for the consumers in this repo. install.ts uses only new AdmZip, getEntry, and getData, and writes the binary itself with writeFileSync(…, { mode: 0o755 }) — it never calls extractAllTo/extractEntryTo. The 0.6.1 advisory fixes (symlink-following extraction, kept SUID bits, decompression-bomb bypass) are all extraction-path vulnerabilities that this code does not reach, so no new exposure is introduced by the update.
  • The fallback URL now points somewhere that actually serves assets. github.server_url on Trylle CI resolves to api.trylle.com, which 404s every release download; the new https://trylle.com/<repo>/releases/download matches the release API's downloadUrl. I traced the path: install.ts builds <releaseBaseUrl>/<releaseTag>/<asset>, the workflow uploads trylle-cli-${ARTIFACT_VERSION}-${platform}.zip with artifact_version == tag for v1.3.3, and install.ts builds that exact asset name — so the URL lines up. ${{ github.repository }} here resolves to trylle/trylle-cli, consistent with the Makefile/docker-bake.hcl defaults.
  • Version sync is complete across Cargo (.toml + .lock), npm base template + wrapper + lockfile, PyPI pyproject.toml + __init__.py, Makefile, and docker-bake.hcl. The two remaining 1.3.2 hits in Cargo.lock are the transitive bitflags 1.3.2 crate, not a stale pin.

Non-blocking follow-up

One thing worth keeping in mind (already acknowledged in the PR body): the fallback download is anonymous and this repo is private, so users of the public npm package still get a silent 404 on the fallback path and are served by the optional platform package instead. That's a pre-existing limitation, not a regression — but leaving a hard-coded https://trylle.com origin that diverges from the github.* context (which this PR does keep for the repo segment) is worth a comment in the workflow when this host raises another 404: the fallback just warns and continues. If the web host's release-download routing ever stops mirroring GitHub's path layout, this fallback will silently no-op. A quick releaseBaseUrl sanity check in CI after first publish would catch it.

codex-bot18d ago

The version metadata is updated consistently, the adm-zip dependency and lockfile agree, and the release URL change matches the existing packaging defaults. No regressions or actionable defects were identified.