Skip to content

Improve npm package installation security#16

Merged
microbit-grace merged 4 commits into
mainfrom
npm-update
Jul 15, 2026
Merged

Improve npm package installation security#16
microbit-grace merged 4 commits into
mainfrom
npm-update

Conversation

@microbit-grace

@microbit-grace microbit-grace commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

.npmrc:

  • min-release-age=7 (cooldown; @microbit/* and @microbit-foundation/* exempt)
  • allow-git/remote/file/directory=root (block transitive non-registry deps)
  • strict-allow-scripts=true + engine-strict=true

package.json:

  • targetted allowScripts policy (esbuild, fsevents — the only deps with install scripts in our tree)
  • engines: node >=24.0.0, npm >=11.18.0
  • packageManager: 11.18.0 - CloudFlare Pages uses Corepack to manage package managers including npm. This allows CloudFlare deployments to use a later version of npm than the corresponding node version defined in .node-version.

.node-version:

  • For defining node version for building and deploying pages via CloudFlare.

CI workflows:

  • grab latest v11 npm directly after setup-node so engine-strict is satisfied
  • give build-docs its own node 24 setup (it had none and ran npm ci bare)
    bump GitHub-provided actions (checkout, Pages family to v5)

.npmrc:
  min-release-age=7 (cooldown; @microbit/* and @microbit-foundation/* exempt)
  allow-git/remote/file/directory=root (block transitive non-registry deps)
  strict-allow-scripts=true + engine-strict=true

package.json:
  targetted allowScripts policy (esbuild, fsevents — the only deps with
  install scripts in our tree)
  engines: node >=24.0.0, npm >=11.18.0

CI workflows:
  grab latest v11 npm directly after setup-node so engine-strict is satisfied
  give build-docs its own node 24 setup (it had none and ran npm ci bare)
  bump GitHub-provided actions (checkout, Pages family to v5)
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploying makecode-embed with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9971ee8
Status: ✅  Deploy successful!
Preview URL: https://4fe383b8.makecode-embed.pages.dev
Branch Preview URL: https://npm-update.makecode-embed.pages.dev

View logs

CloudFlare pages uses Corepack to manage package managers including npm. This hopefully will allow CloudFlare deployments to use a later version of npm than the corresponding node version defined in .node-version.
@microbit-grace microbit-grace marked this pull request as ready for review July 15, 2026 15:52
@microbit-grace microbit-grace merged commit c8a5383 into main Jul 15, 2026
4 checks passed
@microbit-grace microbit-grace deleted the npm-update branch July 16, 2026 08:05
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