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.

poetry.lock hashes not checked when running poetry install

See original GitHub issue

Issue

It appears that Poetry does not check the hashes of the packages in poetry.lock when installing packages using poetry install.

The Dockerfile in this gist (https://gist.github.com/slai/9d0d442fe7e4f4ea04e8f658b675192a) demonstrates the issue. It runs poetry lock, mangles the hashes in poetry.lock, then runs poetry install. This succeeds, with no errors.

I would expect poetry install to fail in this case, or at least print a warning for packages where the hash does not match.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:73
  • Comments:23 (6 by maintainers)

github_iconTop GitHub Comments

48reactions
pietrodncommented, Apr 19, 2021

List of PRs related to this issue:

Can we merge one of the valid ones? Not checking the hashes in poetry.lock poses a significant security problem.

40reactions
pietrodncommented, Apr 19, 2021

In particular python-poetry/poetry-core#159 + #3885 are meant to be fixed together from what I understand. The other PRs can be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python poetry install failure - invalid hashes - Stack Overflow
There are several issue reports about invalid hashes. One common cause is running multiple Poetry instances simultaneously; ...
Read more >
Commands | Documentation | Poetry - Python dependency ...
install. The install command reads the pyproject.toml file from the current project, resolves the dependencies, and installs them. If there is a poetry.lock...
Read more >
Insights into how poetry.lock works cross platform - Packaging
Surprisingly to me, but poetry produces a lockfile format that captures markers and can be installed on multiple sys_platform and python ...
Read more >
Poetry Advance - Python Biella Group
This problem can occur as soon as you run a library installation or do poetry install or poetry update . ⚠ Attention ⚠...
Read more >
Dependency management - Synapse - GitHub Pages
...update the version range for an existing dependency? ... Best done by manually editing pyproject.toml , then poetry lock --no-update . Include the...
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