-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Labels
bun installSomething that relates to the npm-compatible clientSomething that relates to the npm-compatible clientenhancementNew feature or requestNew feature or request
Description
There are npm packages, like esbuild, that need postinstall support to install binaries or run other scripts. While we could allow any package to run scripts, that wouldn't be the safest thing to do. We also can't not support it at all, because these packages would simply not work.
We're thinking of adding a new trustedDependencies property to the package.json, which would require developers to explicitly define an allowlist of packages that are allowed to run scripts.
{
"private": true,
"dependencies": {
"esbuild": "^0.17.8"
},
"trustedDependencies": [
"esbuild"
]
}This would not extend to child dependencies, so if package foo depends on bar, and foo is on the allowlist, bar is not on the allowlist, unless it is explicitly added.
ThatOneBro, MatiasCiccone, third774, derhuerst, 01walid and 6 more
Metadata
Metadata
Assignees
Labels
bun installSomething that relates to the npm-compatible clientSomething that relates to the npm-compatible clientenhancementNew feature or requestNew feature or request
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
bun installready yet? #2450[install] support privilegedDependencies
[install] support trustedDependencies
[install] support trustedDependencies
[-]Support `privilegedDependencies` in `package.json`[/-][+]Support `trustedDependencies` in `package.json`[/+][install] support trustedDependencies
[install] support trustedDependencies
[install] support trustedDependencies
[install] support trustedDependencies
[install] support trustedDependencies
[install] support trustedDependencies
[install] support trustedDependencies (#3288)
build(astro): upgrade to astro 3.0.12
Bessonov commentedon Sep 24, 2023
@Electroid I'm not sure if I'm missing something. From a security point of view, what's the difference between using the
postinstalllifecycle hook and executing/spawning inside the dependency?