Minimum release age and security fixes #10284
wereHamster
started this conversation in
General
Replies: 1 comment 1 reply
-
|
I was thinking about adding something like
I believe we take this range from npm's audit report. I don't have objections to use a proper range with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I think we can generally agree that minimum release age is a good setting to use to avoid running into certain types of vulnerabilities. However it's a bit at conflict with security fixes that need to be applied ASAP.
I noticed that Renovate and Dependabot fail to create security PRs due to the
minimumReleaseAgesetting, they have not yet learned how to work with (or around) it.I know
minimumReleaseAgeExcludeexists, however it's not very ergonomic. Consider the following example: I want to allow[email protected]so I add it tominimumReleaseAgeExclude. Howevernextdepends on@next/envso I need to add that too. So I not only need to add my own dependencies, but also all the transitive dependencies of the vulnerable package that I want to bump.I further noticed that
npm audit --fixwill add overrides, but in a way that makespnpm installstill pick a vulnerable version.Because version
15.5.7is within the minimum age window, pnpm installs 16.0.5 (which is also vulnerable). And if I set the override to exact version 15.5.7, pnpm refuses due to the minimum age window.The only way I see how to apply the security fix is to temporarily remove the
minimumReleaseAgesetting from my workspace, bump that one package, and then reinstate the setting. That however has still a downside that during any future package installation, pnpm will remove optional dependencies that are inside the minimum release age window (#10270).I don't see a way to make security fixes work in the presence of
minimumReleaseAge. If there is a way, I'd appreciate guidance. But perhaps the two are, in the current form of pnpm, incompatible, and need a new setting or changes in pnpm behavior.Ideally, there would be a way to specify that a specific (minimum) version of a package is required, ignoring any other settings that would interfere with its installation (including transitive dependencies). I'd also prefer the change to update only to the least compatible version (the one that fixes the vulnerability), not like
>=15.5.7in my earlier example which can bump the dependency across major versions.Beta Was this translation helpful? Give feedback.
All reactions