-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Security leak with github urls using credentials in environment variables #1513
Comments
You have to list the git URL of A in the dependency list of C project. Otherwise, all transitive dependencies will be resolved by the backend and turn into static strings. We just can't keep them dynamic, because we can't assume which backend is being used by dependency packages. |
In fact we did and pdm with the same url detected them as different, so we removed the URL of A from C and then we spotted the reported issue. I will double check it today... |
I don't understand this "We just can't keep them dynamic, because we can't assume which backend is being used by dependency packages." The problem is not the usage in any backend it is that in the output we have the expanded version. About "You have to list the git URL of A in the dependency list of C project. Otherwise, all transitive dependencies will be resolved by the backend and turn into static strings" I confirm that it doesn't work as the urls doesn't match. A expanded url is compared againts a non expanded one when in fact both refer to the same version. I am going to paste a real example with the real outputs in my next comment. |
Here it goes:
|
The metadata in While the resolution conflict looks like a bug, I will look into it later. |
Thanks for the quick fix! |
This is still quite a pain. We can't commit lockfiles with tokens on them for security reasons and because tokens are rotated now and then, breaking builds. We believe the options are:
We'd love to hear about other alternatives. Thanks! |
Steps to reproduce
I have the packages A, B and C with these dependencies: C -> B -> A. So C has A as a transitive dependency.
In the .toml file I have all the dependencies as an url like:
Actual behavior
When generating the C pdm.lock file the $GITHUB_PIP_TOKEN value appear for the dependency A in the dependencies section of the B package.
Expected behavior
I expect the real GITHUP_PIP_TOKEN value nevers appear in a pdm.lock file.
Environment Information
The text was updated successfully, but these errors were encountered: