Skip to content

install-time security hardening + toolchain pinning - #137

Merged
microbit-grace merged 5 commits into
mainfrom
npm-update
Jul 17, 2026
Merged

install-time security hardening + toolchain pinning#137
microbit-grace merged 5 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)
- 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
- added cludge around npm publish

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

.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)
        - engines: node >=24.0.0, npm >=11.18.0

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).
node version is defined by .node-version file.

npm version is defined by packageManager in package.json.  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.
@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying microbit-connection with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8225c40
Status: ✅  Deploy successful!
Preview URL: https://428f3823.microbit-connection.pages.dev
Branch Preview URL: https://npm-update.microbit-connection.pages.dev

View logs

@microbit-grace
microbit-grace marked this pull request as ready for review July 17, 2026 08:14
Comment thread package.json
@microbit-grace
microbit-grace marked this pull request as draft July 17, 2026 11:23
Comment thread .npmrc Outdated
@microbit-grace
microbit-grace marked this pull request as ready for review July 17, 2026 12:54

@microbit-matt-hillsdon microbit-matt-hillsdon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for checking those bits.

@microbit-grace
microbit-grace merged commit 489f075 into main Jul 17, 2026
4 checks passed
@microbit-grace
microbit-grace deleted the npm-update branch July 17, 2026 15:14
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