-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dependency confusion #147
Comments
Ok, I will. |
As far as I understand until now, GunnarFarneback created PR in the |
Yes, the issue goes both ways, with the difference that everybody uses General and anybody can register packages there. Naturally, only people who have added HolyLabRegistry could possibly be affected by a dependency confusion there against General. The next requirement for a dependency confusion is that there is a UUID collision between packages in the registries. UUIDs don't collide by chance (sub-microscopic probabilities ignored), it either requires incompetence (copying UUID from somewhere else or not creating it randomly) or malice. So let's assume a package is registered in HolyLabRegistry with a UUID that matches a package in General.
To guard against this would either involve running RegistryCI before merging new packages into the registry or in some other way perform the check from JuliaRegistries/RegistryCI.jl#348 against General. Finally a heads up. I'm going to send out some test balloons to verify that the dependency confusion detection really works, so don't worry if you see an attempt to register one of your packages in General, at least not if it's coming from me. Update: Test has been performed and was successful. |
Correct. Not until it's reachable again or it has been removed from the AutoMerge configuration. We don't know whether this is going to be a practical problem or not but for now we prefer to be alerted when it happens rather than not noticing that something's amiss with the detection. |
You're right that since we control who can register packages here, General is in a sense protected against us...unless we fail to notice a malicious registration attempt. Just to be certain that doesn't happen, if that's not terribly difficult I think it would be nice to set up an automatic test on any new package registration here. But the problem will be solved as long as we are personally vigilant and check manually. The rate of new package registrations here is very low so this is not a major burden, but forgetting to check could be awful so the stakes are high. |
@GunnarFarneback added new functionality to protect registries against a malicious attack via "dependency confusion". See details in JuliaRegistries/RegistryCI.jl#348. This registry has now been protected thanks to JuliaRegistries/General#30175. I have not yet taken the time to dig into this issue in detail, but we should check whether we need to reciprocate: do we need to make sure that General is protected against dependency confusion from this registry?
Since it's a potential security hole, this is a high-priority issue and should be tackled ASAP. @kdw503, can you take this on?
The text was updated successfully, but these errors were encountered: