auto icon indicating copy to clipboard operation
auto copied to clipboard

chore(core): upgrade @octokit deps to fix CVE-2025-25288 (paginate-rest ReDoS)

Open attehuhtakangas opened this issue 7 months ago • 0 comments

Summary

Bumps @octokit/rest + related plugins to versions that ship a patched @octokit/plugin-paginate-rest, fixing GHSA-h5c3-5r3r-rr8q / CVE-2025-25288 (ReDoS, moderate). The old v18 line of @octokit/rest transitively pins @octokit/[email protected], which is inside the vulnerable range < 9.2.2.

Socket and other SCA scanners flag this on any project that pulls in @auto-it/core, so fixing it upstream helps every consumer.

Target stack

CJS-compatible — stays off the @octokit/rest@21+ ESM-only line to avoid an ESM migration of the whole monorepo:

Package Before After
@octokit/rest ^18.12.0 ^20.1.2
@octokit/core ^3.5.1 ^5.2.2
@octokit/plugin-throttling ^3.6.2 ^8.2.0
@octokit/plugin-retry ^3.0.9 ^6.1.0
@octokit/plugin-enterprise-compatibility 1.3.0 ^4.1.0

Resolved @octokit/plugin-paginate-rest is 11.4.4-cjs.2 — the CJS back-port on the fixed 11.4.x line, no longer flagged.

Code changes

  • packages/core/src/git.ts
    • plugin-throttling v4 renamed onAbuseLimit → onSecondaryRateLimit; v8 moved retryCount out of the options object into a 4th handler argument.
    • @octokit/core v4 removed the previews option — dropped symmetra-preview (GA since 2019, header no longer needed).
    • REST search endpoints now require advanced_search: \"true\" (string) rather than boolean true; test updated.
  • Small cleanups surfaced by the newer TypeScript / @types/node: child.pid narrowing in verify-auth.ts, Object.entries cast in utils/omit.ts, explicit .toString() on execSync output in plugins/exec, tighter regex/reduce types in plugins/released, agent cast at three node-fetch call sites (HttpsProxyAgent shape vs. the new http.Agent).

Test / build environment

  • The new octokit majors require node >= 18. CI bumped to Node 20 (LTS) and pkg-fetch binaries to node18.
  • TypeScript bumped to ~4.9.5 so the import { type X } syntax in the new octokit .d.ts parses. Added skipLibCheck: true and useUnknownInCatchVariables: false to the root tsconfig so the rest of the monorepo keeps compiling without touching catch blocks across the codebase.
  • @types/node hoisted to ^18.19.0 (direct dep + resolution), @types/readable-stream pinned to ^4 via resolution so it matches the new node globals.
  • actions/checkout / actions/cache bumped to v4, actions/setup-node to v4. The old v3 pins were one likely reason some dependabot/related PRs wouldn't go green.

Test status

Locally, on Node 22 / yarn 1:

  • yarn build ✅
  • yarn lint — 3 errors, identical to main (pre-existing unused-memoize imports).
  • yarn test — 790 passing, 60 failing. Identical failure set to main; all remaining failures are pre-existing (the prebuilt pkg binary not being present locally, strip-ansi@7 ESM vs. ts-jest@26, and a handful of tests that require a real GITHUB_TOKEN). No new regressions introduced by this change.

Change Type

  • [ ] documentation
  • [ ] patch
  • [x] minor
  • [ ] major

It's arguably a major because the Node engine requirement effectively moves from 14 to 18 and some octokit-plugin option names change, but the surface of @auto-it/core is unchanged. Happy to relabel if you prefer.

Notes

  • Related / superseded: #2459 (same direction, stalled since 2024, conflicting). This PR intentionally jumps past @octokit/rest@19 because that major still ships [email protected] — also inside the CVE's vulnerable range — so it wouldn't fix the advisory.
  • No changes to the public API of @auto-it/core or any plugin.

🤖 Generated with Claude Code

attehuhtakangas avatar Apr 18 '26 10:04 attehuhtakangas