Skip to content

Fix high-severity Dependabot alerts in runtime and dev dependencies - #63

Merged
aflanagan merged 3 commits into
mainfrom
agent/dependabot-high-fixes-ac5d
Oct 27, 2026
Merged

aflanagan merged 3 commits into
mainfrom
agent/dependabot-high-fixes-ac5d

Conversation

@aflanagan

@aflanagan aflanagan commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Clears the open high-severity Dependabot alerts by updating the npm lockfile (and two overrides entries). action.yml inputs, outputs, and runs.using are unchanged. No new environment variables or config files. Dependabot PR #52 is left open.

cronitor@2.6.0 and cronitor@2.6.1 still declare axios: ^1.6.5, so bumping cronitor does not force axios >=1.20.0. This PR pins that floor with an override instead of taking the cronitor bump in #52.

dist/ was rebuilt with npm run prepare (ncc) on Node 16.20.2, which is what check-dist.yml uses. Raising the undici override floor from ^6.28.1 to ^6.29.1 did not change the resolved tree or dist/.

Alerts

Alerts Package Before After How
#31, #52, #53, #59, #62–#67, #70, #105, #106 axios (runtime, via cronitor) 1.13.2 1.21.0 overrides.axios = ^1.20.0
#36, #39, #40, #73, #104 undici (runtime) 6.23.0 6.29.1 overrides.undici = ^6.29.1 (6.28.1 is still inside GHSA-xjj6-f33q-929c and GHSA-4qv8-2p9j-2685)
#88, #96, #102 js-yaml 4.x (runtime, via cronitor / eslint) 4.1.1 4.3.2 lockfile; parents already allow ^4.1.0
#71 form-data (runtime, via axios) 4.0.5 4.0.6 lockfile; axios 1.21.0 requires ^4.0.6
#87, #95, #103 js-yaml 3.x (dev, via @istanbuljs/load-nyc-config) 3.14.2 3.15.2 lockfile; parent allows ^3.13.1
#99 browserslist (dev) 4.28.1 4.29.5 lockfile; parents allow ^4.24.0 / >=4.21.0 (patched in 4.28.7)
#89 brace-expansion (dev) 1.1.12 1.1.21 lockfile; minimatch allows ^1.1.7
#42 flatted (dev) 3.3.3 3.4.4 lockfile; flat-cache allows ^3.2.9
#34 minimatch (dev) 3.1.2 3.1.5 lockfile; parents allow ^3.0.4–^3.1.2
npm audit high, no alert number in the request picomatch (dev, via jest) 2.3.1 2.3.2 lockfile; parents allow ^2.0.4 / ^2.2.3 / ^2.3.1

No requested alert needed a cross-major override. Jest 29 still passes (npm test, 20 tests).

npm audit after this change: 0 high, 0 critical. Still reported, and not part of this set: qs (moderate, via cronitor), ajv (moderate, dev), @babel/core (low, dev).

Dependabot PR #52

#52 bumps cronitor from 2.5.2 to 2.6.0. That release does not cover the axios alerts: cronitor 2.6.0 (and 2.6.1) still depend on axios: ^1.6.5, which is what resolved to the vulnerable 1.13.2 in this lockfile. This PR does not close #52.

Follow-up

action.yml still declares using: node16. This PR does not change that. undici 6.x (already overridden on main, now 6.29.1) declares engines.node: >=18.17, and the Node 16 action runtime is deprecated. Moving the action to node24, and moving check-dist.yml off Node 16 with it, should be a separate change.

Test plan

  • npm ci and npm test (jest, 20 passing) on Node 22
  • npm ci and npm run prepare on Node 16.20.2; a second prepare does not change dist/
  • units-test (test.yml) and Check dist/ (check-dist.yml, Node 16.x) green on this PR
Open in Web Open in Cursor 

cursoragent and others added 2 commits October 27, 2026 16:42
Raise the axios and undici overrides so the runtime tree resolves to
axios 1.21.0 and undici 6.29.1, and refresh js-yaml, form-data,
browserslist, brace-expansion, flatted, and minimatch within the ranges
already declared by their parents. Rebuild dist from that tree.

Co-authored-by: August Flanagan <aflanagan@users.noreply.github.com>
The remaining high advisory is a dev-only ReDoS in picomatch 2.3.1.
Parents already allow ^2.0.4, ^2.2.3, and ^2.3.1, so the lockfile can
move to 2.3.2 without an override.

Co-authored-by: August Flanagan <aflanagan@users.noreply.github.com>
@cursor

cursor Bot commented Oct 27, 2026

Copy link
Copy Markdown

Opus 5.5 High review of 3f95d28: APPROVE. No blocking findings.

1. Alerts are out of their vulnerable ranges (pass)

I could not read this repo's Dependabot alerts (the API returned 403), so I couldn't map alert numbers to advisory IDs. Instead, I checked every advisory in the GitHub Advisory Database for each package against the versions before and after this PR:

  • Fixed by this PR: 35 axios, 15 undici, 4 js-yaml 4.x, 4 js-yaml 3.x, 1 form-data, 2 browserslist, 7 brace-expansion, 2 flatted, 3 minimatch and 2 picomatch advisories. Each covered the old version and none covers the new one.
  • Still vulnerable: none of the resolved versions (axios 1.21.0, undici 6.29.1, js-yaml 4.3.2 and 3.15.2, form-data 4.0.6, browserslist 4.29.5, brace-expansion 1.1.21, flatted 3.4.4, minimatch 3.1.5, picomatch 2.3.2) is in any advisory range. The same is true for the newly bundled follow-redirects 1.16.2, https-proxy-agent 5.0.1 and agent-base 6.0.2.
  • npm audit: 0 high and 0 critical. What remains is qs (moderate, runtime, via cronitor), ajv (moderate, dev) and @babel/core (low, dev), which matches the PR body.

2. dist/ matches a clean rebuild (pass)

  • On a fresh worktree at the head commit, npm ci followed by npm run prepare on Node 16.20.2 (ncc 0.34.0) produces byte-identical dist/index.js, index.js.map, licenses.txt and sourcemap-register.js.
  • Bundle contents, according to the source map: agent-base and https-proxy-agent are added. proxy-from-env is removed because axios 1.21's CJS build inlines it. Nothing else changes, and licenses.txt changes to match.
  • New URLs: the only ones added are code comments from axios and https-proxy-agent (hackerone.com, evil.com and bugzilla.mozilla.org). The count of eval/child_process occurrences is unchanged.

3. Runtime and the node16 declaration (non-blocking, already true on main)

  • Real Node 16: both main and this head crash when the module loads, with ReferenceError: ReadableStream is not defined from undici/lib/web/fetch/response.js, reached via @actions/core and @actions/http-client. This PR does not make it worse.
  • GitHub-hosted runners: they run node16 actions on Node 24, because Node 20 was removed on September 23, 2026. I ran the real dist/index.js from main and from this head end to end, on Node 20.20.2 and Node 24.22.1, against a local fake cronitor.io/cronitor.link. Both exit 0 and send the monitor PUT plus the ping.
  • Who is affected: only GHES or self-hosted runners that still ship node16, and those are already broken on main.
  • Follow-up: change runs.using to node24 and move check-dist.yml off Node 16. Dev dependencies now declare engines >=18 (node-releases, undici), so npm ci on Node 16 only works with EBADENGINE warnings.

4. axios 1.21 compared with 1.13.2 for cronitor-js (non-blocking, behavior change)

  • No proxy: on Node 20 and 24, the origin receives identical requests from both builds. That covers method, path and query (state, series, message encoding, stamp), the headers (User-Agent: cronitor-js, Authorization, Cronitor-Version: 2025-11-28, Accept, Accept-Encoding) and the PUT body, for both the completed and requested events.
  • With HTTPS_PROXY set: main (axios 1.13.2) sends absolute-form, plaintext requests to the proxy, so the proxy can see the Cronitor API key in both the Authorization header and the ping path. This head (axios 1.21) opens a CONNECT tunnel to cronitor.io:443 / cronitor.link:443. Proxy-Authorization goes only on the CONNECT request and never reaches the origin.
  • NO_PROXY: still honored.
  • Net effect: a security improvement. The only regression risk is a self-hosted runner behind a proxy that refuses CONNECT, which is rare.

5. Other (non-blocking)

  • undici override floor: ^6.28.1 still allows 6.28.1, which is inside GHSA-xjj6-f33q-929c (high) and GHSA-4qv8-2p9j-2685 (moderate), both fixed in 6.29.1. The lockfile and the shipped dist use 6.29.1, but I suggest raising the override to ^6.29.1 so a future lockfile regeneration can't regress. The axios floor ^1.20.0 is fine, since no current advisory covers 1.20.0.
  • New runtime code: debug and ms lose their dev flag because https-proxy-agent depends on them. debug was already bundled through follow-redirects. https-proxy-agent's debug output is gated on the DEBUG environment variable.

CI on the head

units-test / units: success. Check dist/ / check-dist: success.

6.28.1 is still affected by GHSA-xjj6-f33q-929c and GHSA-4qv8-2p9j-2685.
The lockfile already resolves undici to 6.29.1, and npm install left it unchanged.

Co-authored-by: August Flanagan <aflanagan@users.noreply.github.com>
@cursor

cursor Bot commented Oct 27, 2026

Copy link
Copy Markdown

Raised the undici override floor from ^6.28.1 to ^6.29.1 in d97c3da. The lockfile already resolved undici 6.29.1, npm install did not change it, and npm run prepare did not change dist/.

Leaving the other notes as follow-ups:

  • action.yml node16 → node24. Loading the action on real Node 16 already throws ReadableStream is not defined on main, and GitHub-hosted runners execute a node16 action on Node 24. Changing runs.using is its own change.
  • check-dist.yml still builds on Node 16 while some dev dependencies declare Node 18+. npm ci there works today and only warns (EBADENGINE). Moving that job belongs with the node24 switch.

@cursor

cursor Bot commented Oct 27, 2026

Copy link
Copy Markdown

Opus 5.5 High re-review @ d97c3da: APPROVE. No blocking notes.

Change since 3f95d28 (pass). Only package.json changed: overrides.undici went from ^6.28.1 to ^6.29.1. package-lock.json and dist/ are byte-identical to 3f95d28. The new floor excludes 6.28.x, so GHSA-xjj6-f33q-929c (high) and GHSA-4qv8-2p9j-2685 (moderate) can no longer be resolved. Both are fixed in 6.29.1, and no current advisory covers 6.29.1.

Full PR at d97c3da. Checked from a fresh worktree:

  • On Node 16.20.2, npm ci accepts the lockfile under the new override, and undici resolves to 6.29.1 (marked "overridden") everywhere. npm ls --all reports a valid tree.
  • npm run prepare (ncc 0.34.0) leaves dist/ with no diff.
  • npm test passes all 20 tests.
  • npm audit shows 0 high and 0 critical. The remaining qs, ajv and @babel/core findings are unchanged and outside the scope of this PR.
  • The findings from my 3f95d28 review still apply and are still non-blocking: the node16 runtime that was already broken on main, and the switch to CONNECT tunnelling when a proxy is set.

CI on d97c3da. units-test / units: success. Check dist/ / check-dist: success.

@aflanagan
aflanagan merged commit 1224c74 into main Oct 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants