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

Security: dependency confusion check #5

Open
pawamoy opened this issue Aug 3, 2021 · 0 comments
Open

Security: dependency confusion check #5

pawamoy opened this issue Aug 3, 2021 · 0 comments

Comments

@pawamoy
Copy link
Owner

pawamoy commented Aug 3, 2021

Add a duty that reads dependencies from pdm.lock and yields instance of a Dependency class which has an is_internal method that the user can override to implement their own logic (like checking if its name is in a set, or if it matches a regular expression). Then for every internal dependency, the duty asserts that it is absent from a given PyPI index (overridable as well). This way we ensure an internal dependency has no public counter-part that could lead to dependency confusion. Of course if public indexes are not reachable, the duty would be disabled.

Still not sure about implementing this though, as it is only useful in private contexts (which I have no interest in supporting in an opensource project).

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

No branches or pull requests

1 participant