Commit b374931
committed
chore(yarn): disable install scripts and allowlist required builds
Set `enableScripts: false` so dependency build scripts no longer run
implicitly during `yarn install`. This closes the largest
supply-chain hole: a compromised transitive dependency can no longer
execute code on every developer / CI install.
Add a `dependenciesMeta` allowlist in root package.json that
re-enables build scripts for the four packages this monorepo
actually needs to compile:
- @swc/core -- native binary, used by i18next-cli (yarn build)
- better-sqlite3 -- native binding, used by the SDK's tests
- react-native-nitro-modules -- RN native module used by SampleApp
- unrs-resolver -- native resolver binary, used by jest-resolve
Four other packages still print "lists build scripts, but all build
scripts have been disabled" warnings on install. They are
intentionally not allowlisted:
- @firebase/util -- internal type-generation script, ship-time
- es5-ext -- author advertisement postinstall
- hyochan-welcome -- "welcome" advertisement postinstall
- protobufjs -- proto compilation, not needed for pre-built
package on npm
The core SDK workspace's own `postinstall` (husky install +
shared-native sync) continues to fire -- `enableScripts: false`
gates dependency install scripts, not workspace lifecycle scripts.
Verified `yarn install --immutable`, `yarn lint`, and `yarn build`
all pass with the allowlist in place.1 parent 0b668ee commit b374931
3 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
17 | 31 | | |
18 | 32 | | |
19 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21925 | 21925 | | |
21926 | 21926 | | |
21927 | 21927 | | |
| 21928 | + | |
| 21929 | + | |
| 21930 | + | |
| 21931 | + | |
| 21932 | + | |
| 21933 | + | |
| 21934 | + | |
| 21935 | + | |
| 21936 | + | |
21928 | 21937 | | |
21929 | 21938 | | |
21930 | 21939 | | |
| |||
0 commit comments