Skip to content

poetry.lock vulnerability scanner

Free, no sign-up

Scan a poetry.lock for Python packages with known vulnerabilities. See the advisory, CVE, severity and fixed version of each, with nothing to install.

The file is read in your browser. Only package names and versions are sent to OSV when you scan.

This tool asks the OSV.dev vulnerability database directly from your browser. It sends the name, version and ecosystem of each package in the file, and then the IDs of the advisories that matched. The file itself, its paths, URLs and hashes stay in your browser, and nothing is sent to HardenKit.

How to use the poetry.lock vulnerability scanner

  1. Drop your poetry.lock on the page, or paste its contents.
  2. Press the scan button to send the package names and versions to OSV.dev.
  3. Read the table, worst first, with the fixed version of each package.
  4. Upgrade with poetry update package, or raise the range in pyproject.toml when it does not allow the fixed version.

About this tool

Poetry keeps two files. pyproject.toml states what your project needs, usually as ranges. poetry.lock records what Poetry resolved those ranges to: one [[package]] table per installed package, direct or transitive, with an exact version. The lockfile is what poetry install reproduces on every machine, so it is the file that says which code your application really runs.

This scanner reads the name and version of every [[package]] table and asks OSV.dev, which holds the PyPA advisory database and GitHub’s advisories for PyPI, which of those versions are affected. Packages that Poetry installed from a git repository, a directory, a file or a URL are listed as not checked: they have no PyPI release to match.

The lockfile holds every dependency group, so development tools such as test runners are scanned along with what you ship. A finding in a development-only package matters less in production, but it still runs on developer machines and in CI. The lockfile itself does not say which group a package belongs to; poetry show --tree does.

Sources

Questions

Should I commit poetry.lock?

For an application, yes: it is the only record of which versions were tested and deployed, and the only file a scanner can check precisely. For a library the lockfile is not used by the people who install it, but committing it still keeps your own CI reproducible.

How do I update one vulnerable package with Poetry?

Run poetry update package-name. Poetry moves that package to the newest version your pyproject.toml ranges allow and rewrites the lockfile. If the fixed version is outside the range of a parent package, upgrade the parent, or add the package as a direct dependency with the version you need.

Does this work with uv.lock or Pipfile.lock?

No, this page reads poetry.lock only. For another Python tool, export a pinned requirements file, for example with uv export or pip freeze, and use the requirements.txt scanner.

What is sent when I scan?

The names and versions of the packages, with the ecosystem name “PyPI”, go to OSV.dev. The file, its hashes and its source URLs stay in your browser.

Related tools