python-poetry / python-poetry/poetry

user and password available in poetry.lock

Open
#3,567 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: Debian 10 (buster)

  • Poetry version: 1.1.4

Issue

I'm unsure this should be considered as a bug.

In poetry.lock, the url field fills packages location. If HTTP authentication is used, the user and password are provided in the URL so it's readable in the file. For example:

[package.source]
type = "legacy"
url = "https://alice:a_passwd@pypi.domain.tld/site/prod/+simple"
reference = "whatever"

It could be replaced by https://**user**:**password**@.... However, I wonder if it's the good strategy because the poetry.lock file can't be used directly to rebuild a virtualenv without doing search/replace those strings. What do you think about it?

I could provide a PR but I prefer to get some feedback before.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting how Poetry writes the url field under [package.source] in poetry.lock, and review the issue discussion for the unresolved trade-off between hiding credentials and rebuilding environments. Determine the expected handling of authenticated URLs and verify that lockfile use remains well-defined without exposing secrets.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.