Skip to content

security: pin all dependencies to exact versions#1559

Open
RaananW wants to merge 1 commit intoBabylonJS:masterfrom
RaananW:security/pin-exact-dependency-versions
Open

security: pin all dependencies to exact versions#1559
RaananW wants to merge 1 commit intoBabylonJS:masterfrom
RaananW:security/pin-exact-dependency-versions

Conversation

@RaananW
Copy link
Copy Markdown
Member

@RaananW RaananW commented Apr 1, 2026

Summary

Pin all external dependencies in package.json to their exact resolved versions from package-lock.json and add an .npmrc with min-release-age=2d.

Changes

  • package.json: Removed ^ and ~ prefixes from all external dependencies (both dependencies and devDependencies), pinning them to the exact versions currently in package-lock.json
  • package.json: Updated resolutions field to match the pinned @types/react version
  • .npmrc: Added min-release-age=2d to reject any package version published less than 2 days ago

Motivation

Prevent unexpected version drift and reduce supply-chain attack surface by:

  1. Ensuring npm install always installs the exact audited versions
  2. Rejecting very recently published packages that haven't had time for community review

- Remove ^ and ~ prefixes from all external dependencies in package.json
- Pin versions to the exact resolved versions from package-lock.json
- Update resolutions field to match pinned version
- Add .npmrc with min-release-age=2d to reject recently published packages
@bjsplat
Copy link
Copy Markdown

bjsplat commented Apr 1, 2026

snapshot for this PR available at:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/DOCS/refs/pull/1559/merge

@@ -0,0 +1 @@
min-release-age=2d
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could it not prevent security fixes ?

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.

3 participants