-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Request: making --no-emit-index-url
the default of pip-compile
#1876
Comments
I'm not sure what kind of end user group you mean exactly with open source users? EDIT: Understood. Thanks for reporting, sounds like a reasonable request! |
Yeah sorry for being unclear there, I just meant open source users likely don't use package mangers beside PyPI, so they don't have an extra index URL. Here is a slightly more backwards compatible idea:
That way, users who don't have secrets in the index URL can still rely on index URL being emitted by default. |
I think I like the former suggestion better. Users may wonder why some index URLs are emitted, but others not.
Also, this is a bit long for a command line flag. |
Also I would add that putting the index-url in the requirements is unrecognized when referring to the requirements in project.toml.
|
FTR this request would pair nicely with #2051. |
Requirements files are pip-specific and contain PEP 508 requirement specifiers and pip CLI options. |
Motivation
Currently,
pip-compile
by default will emit any index URLs used.For open source users, likely this will be empty (no index URL). Regardless of the default being
--no-emit-index-url
or not, these users will not be affected, as just PyPI is used.For non-open source users, this may not be empty. For these users, forgetting to include
--no-emit-index-url
represents a security risk, because if this opt-in arg is forgotten, a company secret will be leaked.This actually happened to me tonight when I accidentally leaked my company's internal package manager's index URL. Luckily, I realized it within 15 minutes, and refreshed my token. Now I am getting an email from GitGuardian saying their service detected a string secret was leaked.
For all of my company's
pip-compile
use cases, we append--no-emit-index-url
. Thus for engineers at my company, a useful default would be--no-emit-index-url
.Request
I think the default of
pip-compile
should be secure (and not bias towards leaking secrets).This entails:
--no-emit-index-url
the new default--emit-index-url
or--enable-emit-index-url
as an opt-in flagThe text was updated successfully, but these errors were encountered: