-
Notifications
You must be signed in to change notification settings - Fork 64
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
Bug: Can't disable dependency that's not on PYPI #874
Comments
I think this is a duplicate of #599? |
Yep, I think so -- @rvanlaar does that package come from a private index? If so, does passing (NB that this won't find vulnerabilities for that package, since it's not on PyPI. But it will prevent the resolution error.) |
It looks like it's related to #599 but it's slightly different. We install directly from github: So there's no index url.
(NB: I do understand that this won't find vulnerabilities for this package) |
Gotcha, hmm. I'm actually a little surprised we error in that case; I was pretty sure we only warn when we can't resolve a package on PyPI. Out of curiosity: does the command complete successfully when you drop Longer term, I suppose we could handle this more gracefully by seeing where the package was installed from -- IIRC one of the newer packaging PEPs exposes that information, at least in some cases. |
I've tried using pip-audit without In my tests I used
|
In your case, all (The reason this exists is because some users don't always know which dependencies are or aren't on PyPI, so they need a strict mode to fail conservatively and sort things out.) You can see the context where Lines 510 to 514 in bd25e9f
TL;DR: Removing |
I appreciate the quickness and depths of the responses. From my opinion this bug can be closed because it was a misunderstanding about what My suggestion would be to reword the description of |
Thanks, we appreciate the detail in your responses as well! I agree this is a misunderstanding about what Thanks again for your report! Closing. |
Pre-submission checks
Expected behavior
I expected
pip-audit --strict
to ignore dependencies that aren't on Pypi.Actual behavior
Instead
pip-audit --strict
gave the following error:ERROR:pip_audit._cli:django-private-media: Dependency not found on PyPI and could not be audited: django-private-media (0.1.4)
Exit code 1.
Reproduction steps
$ virtualenv venv
$ source venv/bin/activate
$ pip install git+https://github.com/kiesopmaat/django-private-media.git
$ pip install pip-audit
$ pip-audit --strict
Logs
Additional context
Seems to be related to #157
OS name, version, and architecture
Ubuntu 24.04.1 LTS on AMD64
pip-audit version
pip-audit 2.7.3
pip version
pip 24.0
Python version
Python 3.12.3
The text was updated successfully, but these errors were encountered: