Skip to content

Commit 8f6253c

Browse files
authored
Mitigate supply chain attacks with npmMinimalAgeGate and Lavamoat (#88)
* Upgrade yarn from 4.2.2 to 4.10.0 * Add lavamoat allow-scripts and preinstall-always-fail
1 parent 5cc2b2c commit 8f6253c

4 files changed

Lines changed: 282 additions & 805 deletions

File tree

.yarn/releases/yarn-3.2.1.cjs

Lines changed: 0 additions & 786 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ nodeLinker: node-modules
1515
plugins:
1616
- path: .yarn/plugins/@yarnpkg/plugin-allow-scripts.cjs
1717
spec: 'https://raw.githubusercontent.com/LavaMoat/LavaMoat/main/packages/yarn-plugin-allow-scripts/bundles/@yarnpkg/plugin-allow-scripts.js'
18+
19+
npmMinimalAgeGate: 4320

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"packages/*"
1313
],
1414
"scripts": {
15-
"allow-scripts": "echo 'n/a'",
1615
"build": "turbo build",
1716
"build:packages": "turbo run build --filter='!./packages/delegator-e2e'",
1817
"changelog:update": "turbo run changelog:update --filter='!./packages/delegator-e2e'",
@@ -28,6 +27,8 @@
2827
"test:watch": "turbo run test:watch"
2928
},
3029
"devDependencies": {
30+
"@lavamoat/allow-scripts": "^3.4.0",
31+
"@lavamoat/preinstall-always-fail": "^2.1.1",
3132
"@metamask/create-release-branch": "^4.1.1",
3233
"@metamask/eslint-config": "^12.0.0",
3334
"@metamask/eslint-config-nodejs": "^12.0.0",
@@ -55,11 +56,17 @@
5556
"viem": "2.31.4",
5657
"webauthn-p256": "^0.0.10"
5758
},
58-
"packageManager": "yarn@4.2.2",
59+
"packageManager": "yarn@4.10.0",
5960
"engines": {
6061
"node": "^18.18 || >=20"
6162
},
6263
"resolutions": {
6364
"elliptic": "^6.6.1"
65+
},
66+
"lavamoat": {
67+
"allowScripts": {
68+
"@lavamoat/preinstall-always-fail": false,
69+
"keccak": false
70+
}
6471
}
6572
}

0 commit comments

Comments
 (0)