fix(deps): bump tar, adm-zip and form-data #2

Merged
thklein merged 1 commit from fix/deps-security into main 2026-10-18 10:47:55 +00:00
Owner

Summary

Clear the runtime vulnerabilities in the packages scripts/install-binary.js (the postinstall) uses to download and extract the gptscript binary.

Package Before After Advisory
tar 6.2.1 (^6.2.0) 7.5.22 (^7.5.22) critical: hardlink/symlink path traversal and others (<=7.5.20)
adm-zip 0.5.12 (^0.5.10) 0.6.1 (^0.6.1) high (<=0.6.0)
form-data (via @types/sync-fetch) 4.0.0 4.0.6 critical (4.0.0-4.0.5)
  • tar 7 is ESM/CJS with named exports only (no default export), so the installer now uses import * as tar from 'tar'. tar.x({file, cwd}) is unchanged. tar 7 needs Node >= 18; CI uses Node 21.
  • adm-zip 0.6: new AdmZip(file).extractAllTo(dir, true) works unchanged.
  • npm audit fix (non-breaking only) for the rest, which bumps a number of transitive dev packages in the lockfile.

The pinned gptscript version (v0.9.10) is unchanged.

Audit

Before (main) After
npm audit --omit=dev 3 (2 critical, 1 high) 0
npm audit (all) 60 (4 critical, 46 high, 8 moderate, 2 low) 42 (36 high, 6 moderate)

All 42 remaining findings are dev-only and need semver-major bumps, left for a separate change:

  • jest 29 -> 30 (and @types/jest 30): covers the @jest/*, babel-jest, babel-plugin-istanbul, js-yaml, argparse, sprintf-js findings
  • @swc/cli 0.3 -> 0.8: covers @mole-inc/bin-wrapper, bin-check, execa, cross-spawn, fast-glob, micromatch, braces, picomatch, file-type

Verification

  • Installer against the real v0.9.10 Forgejo release (GPTSCRIPT_RELEASE_TOKEN from the environment): downloads and extracts gptscript-v0.9.10-linux-amd64.tar.gz into bin/. bin/gptscript --version prints v0.9.10+77d3fcb0. A second run detects the matching version and exits.
  • Zip path: the windows-amd64.zip release asset extracts with adm-zip 0.6.1 (gptscript.exe, LICENSE, README.md).
  • npm run build (tsc): pass.
  • npm test with a placeholder key, restricted to tests that don't call a model (version, parse*, load simple/content/tools, credential operations, create and delete workspace): 17 passed. The full suite needs provider keys and is skipped in CI without them.
## Summary Clear the runtime vulnerabilities in the packages `scripts/install-binary.js` (the postinstall) uses to download and extract the gptscript binary. | Package | Before | After | Advisory | |---|---|---|---| | `tar` | 6.2.1 (`^6.2.0`) | 7.5.22 (`^7.5.22`) | critical: hardlink/symlink path traversal and others (<=7.5.20) | | `adm-zip` | 0.5.12 (`^0.5.10`) | 0.6.1 (`^0.6.1`) | high (<=0.6.0) | | `form-data` (via `@types/sync-fetch`) | 4.0.0 | 4.0.6 | critical (4.0.0-4.0.5) | - tar 7 is ESM/CJS with named exports only (no default export), so the installer now uses `import * as tar from 'tar'`. `tar.x({file, cwd})` is unchanged. tar 7 needs Node >= 18; CI uses Node 21. - adm-zip 0.6: `new AdmZip(file).extractAllTo(dir, true)` works unchanged. - `npm audit fix` (non-breaking only) for the rest, which bumps a number of transitive dev packages in the lockfile. The pinned gptscript version (v0.9.10) is unchanged. ## Audit | | Before (main) | After | |---|---|---| | `npm audit --omit=dev` | **3** (2 critical, 1 high) | **0** | | `npm audit` (all) | 60 (4 critical, 46 high, 8 moderate, 2 low) | 42 (36 high, 6 moderate) | All 42 remaining findings are dev-only and need semver-major bumps, left for a separate change: - `jest` 29 -> 30 (and `@types/jest` 30): covers the `@jest/*`, `babel-jest`, `babel-plugin-istanbul`, `js-yaml`, `argparse`, `sprintf-js` findings - `@swc/cli` 0.3 -> 0.8: covers `@mole-inc/bin-wrapper`, `bin-check`, `execa`, `cross-spawn`, `fast-glob`, `micromatch`, `braces`, `picomatch`, `file-type` ## Verification - Installer against the real v0.9.10 Forgejo release (`GPTSCRIPT_RELEASE_TOKEN` from the environment): downloads and extracts `gptscript-v0.9.10-linux-amd64.tar.gz` into `bin/`. `bin/gptscript --version` prints `v0.9.10+77d3fcb0`. A second run detects the matching version and exits. - Zip path: the `windows-amd64.zip` release asset extracts with adm-zip 0.6.1 (`gptscript.exe`, LICENSE, README.md). - `npm run build` (tsc): pass. - `npm test` with a placeholder key, restricted to tests that don't call a model (`version`, `parse*`, `load simple/content/tools`, `credential operations`, `create and delete workspace`): 17 passed. The full suite needs provider keys and is skipped in CI without them.
fix(deps): bump tar, adm-zip and form-data
All checks were successful
test / test (pull_request) Successful in 28s
857690561a
npm audit --omit=dev reported two critical and one high runtime
vulnerability in the packages the postinstall uses to extract the
gptscript binary: tar <=7.5.20, adm-zip <=0.6.0 and form-data 4.0.5.

Move tar to ^7.5.22 and adm-zip to ^0.6.1. tar 7 has no default
export, so import it as a namespace. Apply the non-breaking npm audit
fix for the rest, which also lifts form-data to 4.0.6.
thklein deleted branch fix/deps-security 2026-10-18 10:47:55 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
basepeak-ai/node-gptscript!2
No description provided.