Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
build: restrict postinstall scripts during package installation
Browse files Browse the repository at this point in the history
When performing a yarn-based package installation, only a specific group
of dependencies will now have postinstall scripts executed. This not only
provides additional security benefits but also reduced the amount of script
execution that occurs during each install. The workspace scripts are automatically
allowed and additional specific packages can be allowed as needed.
  • Loading branch information
clydin committed Aug 15, 2024
1 parent 24cd34b commit 2e786d1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
enableScripts: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.4.0.cjs
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,16 @@
"ts-node": "^8.10.2",
"typescript": "~5.5.2"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"dependenciesMeta": {
"esbuild": {
"built": true
},
"puppeteer": {
"built": true
},
"re2": {
"built": true
}
}
}
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12129,6 +12129,13 @@ __metadata:
tslib: "npm:^2.3.0"
typescript: "npm:~5.5.2"
zone.js: "npm:~0.14.10"
dependenciesMeta:
esbuild:
built: true
puppeteer:
built: true
re2:
built: true
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 2e786d1

Please sign in to comment.