Skip to content

fix: force ejs to ^6.0.1 via npm overrides (#709) - #710

Open
shrutiburman wants to merge 3 commits into
mainfrom
ejs-critical-cve-override_internal
Open

fix: force ejs to ^6.0.1 via npm overrides (#709)#710
shrutiburman wants to merge 3 commits into
mainfrom
ejs-critical-cve-override_internal

Conversation

@shrutiburman

@shrutiburman shrutiburman commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #709

What

  • Force ejs to ^6.0.1 via npm overrides, matching the same critical-CVE fix applied in twilio-cli-core.
  • Bump @actions/core/@actions/github (our own devDependencies, unrelated to the CLI's runtime code) to the same major versions @twilio/cli-core already uses. The old range pulled in a version of undici that our dependency curation policy now blocks.
  • Regenerate package-lock.json and restore all resolved URLs to the public npm registry — a from-scratch reinstall against our internal registry mirror had left several entries pointing at that internal host, which external contributors and outside CI runners (e.g. AppVeyor) can't reach.
  • Pin an explicit registry=https://registry.npmjs.org/ in .npmrc so the default registry is unambiguous for anyone building this repo without additional local configuration.
  • Port the restore-lockfile-registry.js helper from twilio-cli-core and wire it into make install, so future installs self-correct before anyone commits a lockfile pointing at an internal host.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

sudhirnarayana and others added 3 commits September 4, 2026 13:12
…store public lockfile URLs

CI was failing two independent ways:
- `audit`: `make install` (which deletes and regenerates package-lock.json
  from scratch) pulled undici@5.29.0 transitively via our own
  @actions/core@^1.0.0 / @actions/github@^6.0.0 devDependencies, and
  Twilio's Artifactory curation policy now blocks that version (403).
  Bumped both to the same major versions @twilio/cli-core already uses
  (^2.0.0 / ^9.0.0), which resolve to undici@6.x instead.
- `lockfile-hygiene` / AppVeyor's `npm ci`: the committed package-lock.json
  had 26 entries resolved to npmjs.artifacts.twilio.com instead of the
  public registry (from someone's local Artifactory-backed `npm install`
  never being normalized back). AppVeyor has no route to that internal
  host, so `npm ci` there was failing outright.

Regenerated the lockfile via `make install` (only reachable through
Artifactory from this network) and ported the restore-lockfile-registry.js
script from twilio-cli-core to rewrite the resulting Artifactory URLs back
to registry.npmjs.org. Also wired the script into `make install` itself
(rather than per-workflow) since this repo's Makefile always deletes and
rebuilds the lockfile from scratch, so every future install self-corrects
before anyone commits.
The lockfile-hygiene CI check scans .npmrc (among other files) for
registry/resolved host lines, and its script runs under `bash -e -o
pipefail`. Our .npmrc only had `engine-strict=true`, which matches
nothing, so the scan's `grep | grep | sed` pipeline for that file exited
1, pipefail propagated it, and set -e killed the whole check before it
ever reached package-lock.json -- regardless of that file's actual
content. Reproduced locally against the exact PR merge commit.

Pinning the public registry explicitly is good practice on its own (it's
the default for anyone running npm here without a corporate .npmrc
override) and incidentally gives the scan a matching line so it completes
instead of dying early.
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