Skip to content

Improve npm installation security #3

Open
microbit-grace wants to merge 3 commits into
mainfrom
npm-update
Open

Improve npm installation security #3
microbit-grace wants to merge 3 commits into
mainfrom
npm-update

Conversation

@microbit-grace

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

Copy link
Copy Markdown
Collaborator

.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)
  • 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:

  • bump GitHub-provided actions (checkout v7, setup-node v6,
    upload-pages-artifact v5, deploy-pages v5)
  • grab latest v11 npm directly after setup-node

Regenerated package-lock.json under the new install policy (drops the stale apps/capacitor entry).

@microbit-grace

microbit-grace commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

Branch Preview URL: https://npm-update.python-editor-embed.pages.dev/

@microbit-grace
microbit-grace marked this pull request as draft July 17, 2026 09:13
@microbit-grace
microbit-grace marked this pull request as ready for review July 17, 2026 09:35
@microbit-grace
microbit-grace marked this pull request as draft July 17, 2026 11:23
@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying python-editor-embed with  Cloudflare Pages  Cloudflare Pages

Latest commit: fdc4789
Status: ✅  Deploy successful!
Preview URL: https://68864e9a.python-editor-embed.pages.dev
Branch Preview URL: https://npm-update.python-editor-embed.pages.dev

View logs

@microbit-grace
microbit-grace marked this pull request as ready for review July 17, 2026 14:44
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