Skip to content
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

security: remove postinstall script in favor of prepublish script #615

Open
coolaj86 opened this issue Oct 21, 2023 · 2 comments
Open

security: remove postinstall script in favor of prepublish script #615

coolaj86 opened this issue Oct 21, 2023 · 2 comments

Comments

@coolaj86
Copy link

coolaj86 commented Oct 21, 2023

(socket) svelte-preprocess@5.0.4 contains risks:
Install scripts - Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Accept risks of installing these packages (y/N)?

See also: @SocketDev

Feature requests and proposals

The postinstall script will always run, even for deeply nested dependencies.

The prepublish script will run when someone is running npm install from the repo, and before npm publish.

Currently the install script is used to write a message to the screen which is not actually necessary for people who have this as a dependency.

@dominikg
Copy link
Member

the message is intended for users, but I agree that it would be better if it was made at runtime if a missing dependency was detected. vite handles this for sass for example, reminding you to install it if you didn't

@dominikg
Copy link
Member

it is however not a security issue in this case as it only runs "echo". You can safely disable this postinstall script with your package manager if it still concerns you

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

No branches or pull requests

2 participants