-
Notifications
You must be signed in to change notification settings - Fork 333
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
hacked package mitigation - minimum package age #962
Comments
Thanks for the suggestion! This is technically doable, since the publish time of each version is available in the npm registry, e.g. The |
| Or it could omit the dependency completely, which is not a bad idea, since it will pick it up again once the min-age has passed to clarify my use case i would say that i was confidently doing this until this recent hack :
that way i get all minor versions updated, then i run checks
and if all is good i deploy to production. i also call npm directly to detect if a major version is available to migrate the code and deploy manually. a valid algorithm - for me - would be to
|
Do you wish to include betas, and pre-releases, or only stable versions? As mentioned above there is no way that I know of to get a history of versions published to the latest tag. But we can get a list of all published versions.
Try out |
Duplicate of #833 |
I dont really care as long as the package is old enough to be considered for update and my mocha passes. |
Still an open issue, but closing in favor of #833. |
npm-check-updates
node >= 10.17
** problem **
latest version of packages may sometimes be buggous / hacked.
Usually the hacked version are blocked some hours after. same goes for bugs. A new/safer version is released some hours/days after.
Here is an exemple of hack, a few days ago : https://portswigger.net/daily-swig/popular-npm-package-ua-parser-js-poisoned-with-cryptomining-password-stealing-malware
the hacked packages were deleted in ~5hours.
** solution **
to handle bugs, everyone need to test his own codebase with unit tests. (i'm trying to do this)
To handle hacks, i would like a way to install latest package version but ignoring packages that are less than 1 day old.
maybe a new option on the cli, like --min-age NUMBER_OF_DAYS to ignore package version that are too young.
Maybe you have a better solution ? Or is it too hard to implement ?
The text was updated successfully, but these errors were encountered: