Skip to content

Conversation

@witmicko
Copy link
Collaborator

@witmicko witmicko commented Oct 15, 2025

Summary

Add @lavamoat/allow-scripts across 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-scripts enforces an explicit allowlist so only vetted scripts execute, reducing supply‑chain attack surface.

What changed

  • Add @lavamoat/allow-scripts at the root and wire it into installs.
  • Generate and commit per‑package allowScripts allowlists via allow-scripts auto.
  • No runtime code changes.

Security considerations

  • Narrows the set of install-time scripts to an audited allowlist.

Note

Introduces LavaMoat allow-scripts and disables lifecycle scripts for packages/linea-ens-contracts, adding an explicit allowlist policy to block install-time scripts from transitive deps.

  • Install-time hardening:
    • Disable lifecycle scripts via Yarn config in packages/linea-ens-contracts/.yarnrc and .yarnrc.yml.
    • Add devDeps @lavamoat/allow-scripts and @lavamoat/preinstall-always-fail in packages/linea-ens-contracts/package.json.
    • Define lavamoat.allowScripts policy in package.json to deny install scripts for specified transitive packages.

Written by Cursor Bugbot for commit cc74d87. This will update automatically on new commits. Configure here.

@witmicko witmicko requested a review from a team as a code owner October 15, 2025 16:20
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