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

[SINT-1538] Check for NPM packages with a shrinkwrap file #291

Closed

Conversation

juliendoutre
Copy link
Contributor

@juliendoutre juliendoutre commented Nov 21, 2023

This PR adds a new check for NPM packages.

It's possible to publish a package on NPM with a npm-shrinkwrap.json file which locks transitive dependencies, preventing users to use their own. This is not recommended by NPM:

The recommended use-case for npm-shrinkwrap.json is applications deployed through the publishing process on the registry: for example, daemons and command-line tools intended as global installs or devDependencies. It's strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates.

@juliendoutre juliendoutre marked this pull request as ready for review November 21, 2023 13:05
@christophetd
Copy link
Contributor

Is there evidence that some malicious packages are using this, or that it could be used maliciously? If that's not the case, I'm not sure it makes sense to have it as a guarddog check

@juliendoutre
Copy link
Contributor Author

@christophetd this is reported by socket.dev as a high severity risk but indeed I'm not sure if it is actually used for a malicious purpose.

@juliendoutre juliendoutre deleted the julien.doutre/npm-shrink-wrap branch January 11, 2024 15:49
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