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

Do a better job of signaling when audited dependencies come from pip-audit itself #621

Open
woodruffw opened this issue May 25, 2023 · 7 comments
Assignees
Labels
component:dep-sources Dependency sources discussion Design discussion.

Comments

@woodruffw
Copy link
Member

woodruffw commented May 25, 2023

Raised by @ESultanik.

We need to think a bit more about if/how we'd like to do this, but in terms of user experience: some users might find it confusing that running pip-audit (i.e. bare, auditing the current environment) is also likely to audit pip-audit's own dependencies.

This is confusing on two levels:

  1. The user might not be expecting those dependencies to be there;
  2. pip-audit will occasionally produce findings on its own dependencies, like the recent security advisory on requests.
@woodruffw woodruffw added component:dep-sources Dependency sources discussion Design discussion. labels May 25, 2023
@woodruffw woodruffw self-assigned this May 25, 2023
@CribberSix
Copy link

Is this the same case as with the current urllib3 security advisory?

@woodruffw
Copy link
Member Author

woodruffw commented Oct 9, 2023

Is this the same case as with the current urllib3 security advisory?

I'm not sure, you'll need to be more specific. Can you share the advisory ID?

Edit: and are you using pip-audit in "environment" mode?

@CribberSix
Copy link

ID: GHSA-v845-jxx5-vc9f

I suppose not, we are using it as a pre-commit hook without any args.

@woodruffw
Copy link
Member Author

I suppose not, we are using it as a pre-commit hook without any args.

That's the environment mode 🙂

Could you try running with a requirements file or other dependency source instead, and seeing if this reproduces? This may indeed be a false positive from our own dependencies.

@CribberSix
Copy link

CribberSix commented Oct 12, 2023

If I run pip_audit in my local venv (that I use during development - created by poetry), it doesn't flag the above id - it only flags some other ids which I expected (and ignore in the pre-commit hook).

So I guess that means it's not an issue with pip-audit itself, but with my pre-commit hook setup.

@woodruffw
Copy link
Member Author

Yeah, that sounds likely. Are you using pre-commit to run other tasks that might pull urllib3 in?

@CribberSix
Copy link

Black/flake8/isort/bandit ... probably the culprit is there. Sorry to bother you with this! I suppose it's one of them. Disregard my comments :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:dep-sources Dependency sources discussion Design discussion.
Projects
None yet
Development

No branches or pull requests

2 participants