Skip to main content

Test package for dependency confusion vulnerability

Project description

coherent minds


confusion-test - Test Package for Dependency Confusion Vulnerability

Background

Since you found this package, you might have already read about the so-called dependency confusion vulnerability. If you have no idea what I am talking about, first read this.

The pip team is still discussing if this could and/or should be fixed within pip itself or whether this is somebody else's problem.

Whatever the outcome of this discussion might be, you might want to mitigate this vulnerability now. Two tools (basically proxies which filter/route requests to repositories) have been proposed:

What's the use of confusion-test?

Whatever you use as a mitigation, you might wonder if it actually works, i.e., if you have package A in you private repository and someone else uploads package A to PyPI using a higher version number, will you actually not install the package from PyPI.

You can use confusion-test for testing your mitigation. It is tiny and does not have any dependencies (as version 1.x) or functionality.

How to use it

  1. Manually download the latest 1.x version of confusion-test from PyPI. Do not download a 666.x version!

  2. Upload this file to your private repository. Here is how you would do it with twine:

    twine upload -r YOUR_PRIVATE_REPO confusion-test-1.*.tar.gz
    
  3. Include confusion-test in your dependencies without a version.

When you now install your dependencies, pip will try to install confusion-test with the highest version it can find:

  • If pip installs version 1.x from you local repository, all is fine.

  • If pip installs version 666.x from PyPI, the parent process (most likely pip) is being killed which should bring the installation process and your build pipeline to a grinding halt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

confusion-test-666.0.0.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file confusion-test-666.0.0.tar.gz.

File metadata

  • Download URL: confusion-test-666.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

File hashes

Hashes for confusion-test-666.0.0.tar.gz
Algorithm Hash digest
SHA256 2170f428339844a44b0eb674abcca61f6e2cfc23df8f4ae057b63f62795dd676
MD5 7319c4449f288153ff622a96b872b3cb
BLAKE2b-256 d552bf766aea7bf731753847f693cefed24b10f3bb67b4eb53701d831e888289

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page