Skip to content
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

Poetry V2: Change ONLY_BINARY/NO_BINARY implementation so that you can ONLY_BINARY=:all: NO_BINARY=one_package #10231

Open
willh-cmyk opened this issue Feb 27, 2025 · 1 comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@willh-cmyk
Copy link

Issue Kind

Change in current behaviour

Description

Hi, when using pip, you can use only_binary and no_binary interchangeably as part of the same configuration.

For example, when running pip install -r requirements --only-binary=:all: --no-binary=numpy all packages in my requirements file will be installed using binaries, with the exception of numpy.

I want to be able to specify something similar to installer.only-binary=:all: installer.no-binary=package1.

Impact

This is to mitigate against possible supply chain attacks, whereby a malicious developer has provided a malicious sdist for one of the packages we use, and released it as a new version of a package we use, but hasn't provided a binary, enabling arbitrary code execution to be run when the malicious package is built from source.

The reason for providing exceptions, is that there are some packages/dependencies we have to use, which never include binaries in their releases, but we want those to be the exceptions rather than the rule.

Workarounds

The only way I can see of achieving this functionality currently, is to provide a really long list of packages (except the one you want to build from source) to the POETRY_INSTALLER_ONLY_BINARY environment variable. Which isn't practical, and is difficult to maintain.

@willh-cmyk willh-cmyk added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Feb 27, 2025
@dimbleby
Copy link
Contributor

code is here, simplest way to make a proposal is likely by making a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants