-
Notifications
You must be signed in to change notification settings - Fork 130
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
David tells dependency is insecure. Is this a bug, or am I wrong? #383
Comments
Your range includes vulnerable versions. People may have installed your module long ago and by virtue they may have installed a vulnerable version of jquery. Updating the version you depend on to not include a vulnerable version of jquery will force npm to install a version that isn't vulnerable rather than leaving the existing vulnerable version because it satisfies your range. |
@alanshaw What about lockfiles ? If a lockfile is provided and the latest jQuery version is pined in it, users with a vulnerable jQuery version will get it updated. A package may be compatible with a large jQuery version range and |
Yes, exactly this is my problem too! Nice idea. |
@ncoden, unfortunately a |
As far as I undestand his suggestions, thats not the point. Davaid should just look to the |
I'm not sure I understand how this would work - could you provide some examples? Specifically, I don't understand why you wouldn't just update the version in your |
The The problem here is, that For example, we have this two modules in a random project:
Then NPM would probably pick a Version of
Now NPM can't pick a compatible version for both. The two modules are incompatible in this project. But that's not true, because Maybe I hope you understand my point, it's a bit tricky to explain for me. ;) |
Would a peer dependency be an option? |
Depends on the module, I think. For some, yes. But for frontend modules, this would not always be an option, imo. Because you wound inject multiple copies of, for example, |
If I realise this is a tradeoff because it changes the contract with your users. But perhaps a peer dependency is a better description of the relationship with |
I have an issue with one of my repos. The badge shows
insecure
dependencies and this belongs tojQuery
, as the detail page ofdavid
told me (and as this is the only dependency too).https://david-dm.org/eisbehr-/jquery.lazy
The plugin depends on any version greater or equal than
1.7.2
. This is simply to keep the range as wide as possible, even for very old projects, like some IE stuff some companies has still live.My question is simply, why is my dependency unsecure? On a new install, the most common version
3.2.1
would be picked, what is secure. In my eyes this is a wrong message / badge here. I don't depend on1.7.2
directly, I depend on everything above too. On a normal install the latest version would be picked.Can someone tell me the problem?
The text was updated successfully, but these errors were encountered: