-
Notifications
You must be signed in to change notification settings - Fork 384
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
[Rule] Dependency confusion #3032
Labels
Comments
|
@Sjord thats a great idea! probably can be done not only for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following snippet in this Dockerfile:
This installs the package
model_lstm
. It configures two sources for packages, pypi.fury.io and pypi.org. Presumablymodel_lstm
is meant to be loaded from the private pypi.fury.io, since it's not in PyPI, the public package index. However, anyone can add a package calledmodel_lstm
to the public PyPI repository, and if the version number is high enough, it will be installed when building this docker image. So this allows an attacker to install their own code instead of the code from the private repo.I think semgrep can find vulnerabilities like this, for example by searching for
--extra-index-url
in Dockerfiles, where the URL specifies credentials.The above example is with Python's pip, but dependency confusion is possible with most dependency tools.
The text was updated successfully, but these errors were encountered: