-
Notifications
You must be signed in to change notification settings - Fork 21
chore(security): adopt @lavamoat/allow-scripts to reduce supply-chain risk #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
output from the |
Co-authored-by: Zbyszek Tenerowicz <[email protected]>
|
Hey @witmicko |
| "@ensdomains/dnsprovejs": "^0.3.7", | ||
| "@ensdomains/test-utils": "^1.3.0", | ||
| "@lavamoat/allow-scripts": "^3.4.0", | ||
| "@lavamoat/preinstall-always-fail": "^2.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Lavamoat Configuration Missing in Package
The linea-ens-contracts package adds Lavamoat dependencies but lacks the necessary lavamoat configuration in package.json. This omission means Lavamoat defaults to blocking all scripts, potentially causing build or installation failures if lifecycle scripts are required.
Summary
Add
@lavamoat/allow-scriptsacross the workspace to mitigate the risk of executing unexpected lifecycle scripts from transitive dependencies.Lavamoat allow-scripts does not affect runtime. Lavamoat at runtime is a separate integration
Motivation
npm lifecycle scripts can run arbitrary code during install.
@lavamoat/allow-scriptsenforces an explicit allowlist so only vetted scripts execute, reducing supply‑chain attack surface.What changed
@lavamoat/allow-scriptsat the root and wire it into installs.allowScriptsallowlists viaallow-scripts auto.Security considerations
Note
Introduce @lavamoat/allow-scripts across the monorepo with per-package allowlists and ignore npm lifecycle scripts by default.
.npmrcwithignore-scripts=trueto disable automatic lifecycle scripts.@lavamoat/allow-scripts(and@lavamoat/preinstall-always-fail) at the root withlifecycle:runandlifecycle:scanscripts; setpackageManagerto pnpm."lavamoat.allowScripts"in:packages/linea-ccip-gateway,packages/linea-ens-app,packages/linea-ens-contracts,packages/linea-ens-resolver,packages/linea-ens-subgraph,packages/linea-state-verifier,packages/poh-signer-api.Written by Cursor Bugbot for commit 2504609. This will update automatically on new commits. Configure here.