question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatically audit packages using both osv and pypi, or document that they may report different results

See original GitHub issue

Is your feature request related to a problem? Please describe.

I’m always frustrated when I think there are no security vulnerabilities in my project, but there actually are. My team runs pip-audit as a daily CI job to warn us about CVEs in our Python dependencies.

By default pip-audit uses PyPI, and currently reports no issues for any of our dependencies. But while investigating a dependabot warning today, we reran pip-audit using “–vulnerability-service osv”, and saw that there was a django-celery-results GHSA reported in OSV.

Describe the solution you’d like

Obviously pip-audit doesn’t control the contents of either the OSV or PyPI databases, and I’m about to go request that those projects synchronize their data. But it would also be nice if pip-audit automatically checked both OSV and PyPI by default:

-s SERVICE, --vulnerability-service SERVICE
                        the vulnerability service to audit dependencies
                        against (choices: osv, pypi) (default: osv, pypi)

Describe alternatives you’ve considered

Add some documentation stating that OSV and PyPI vulnerabilities may differ, and that auditing against both services is recommended. This could be a small snippet in “pip-audit --help”, like below:

-s SERVICE, --vulnerability-service SERVICE
                        the vulnerability service to audit dependencies
                        against. Each service may report different
                        results, so checking both is recommended.
                        (choices: osv, pypi) (default: pypi)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
oliverchangcommented, May 18, 2022

warehouse now knows about GHSA-fvx8-v524-8579:

> curl -s https://pypi.org/pypi/django-celery-results/json | jq ".vulnerabilities"
[
  {
    "aliases": [
      "CVE-2020-17495"
    ],
    "details": "django-celery-results through 1.2.1 stores task results in the database. Among the data it stores are the variables passed into the tasks. The variables may contain sensitive cleartext information that does not belong unencrypted in the database.",
    "fixed_in": [],
    "id": "GHSA-fvx8-v524-8579",
    "link": "https://osv.dev/vulnerability/GHSA-fvx8-v524-8579",
    "source": "osv"
  }
]
0reactions
woodruffwcommented, May 23, 2022

Glad to hear it! Thanks again for reporting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip-audit - PyPI
pip-audit is a tool for auditing Python environments for packages with known vulnerabilities. A "known vulnerability" is a publicly reported flaw in a...
Read more >
Some CVEs are missing #65 - pypa/advisory-database - GitHub
Automatically audit packages using both osv and pypi, or document that they may report different results pypa/pip-audit#274.
Read more >
Dustin Ingram on Twitter: "Second, pip-audit can be used to ...
Today I'm announcing the first stable release of a project that's been in the works for a few months: pip-audit: a tool for...
Read more >
Warning: PyPI Feature Executes Code Automatically After ...
PyPI, the Python Package Index, automatically executes code on the system when developers merely download a package.
Read more >
Proposing a community maintained database of PyPI package ...
Hi! I'm from Google and my team has been working on some efforts to improve vulnerability management for open source packages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found