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

Lint: Add Check for pip install #413

Open
jspeed-meyers opened this issue Oct 4, 2023 · 1 comment
Open

Lint: Add Check for pip install #413

jspeed-meyers opened this issue Oct 4, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request needs-triage applied to all new customer/user issues. Removed after triage occurs.

Comments

@jspeed-meyers
Copy link

jspeed-meyers commented Oct 4, 2023

pip install should not be used in melange YAML files when building Python packages for Wolfi. Why? Because APKs for Python in Wolfi are meant to contain one and only one Python package. Using pip install in a Python package adds more than one Python package to an APK. Why only one Python package per APK package? This, to my knowledge, is to make a "better" SBOM (more complete) and to make vulnerability remediation easier.

Unfortunately:

➜  os git:(main) date
Wed Oct  4 05:16:53 EDT 2023
➜  os git:(main) git rev-parse --short HEAD   
6f138fe7
➜  os git:(main) pwd
~/Desktop/repos/public/os
➜  os git:(main) grep -r "pip install" | wc -l
      39

There are at least 39 instances currently of pip install across Wolfi packages. After these are fixed, I propose adding a lint to detect usage of pip install in a melange YAML file. It would be fine to add it earlier too, as long as there is a way to disable that particular check during CI (until these instances of pip install are removed).

cc @luhring @kaniini

h/t @luhring -- This is really just reporting his finding!

ref
wolfi-dev/os#6244

@jspeed-meyers jspeed-meyers added enhancement New feature or request needs-triage applied to all new customer/user issues. Removed after triage occurs. labels Oct 4, 2023
@Elizafox
Copy link

I'm adding a check for this in chainguard-dev/melange#764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-triage applied to all new customer/user issues. Removed after triage occurs.
Projects
None yet
Development

No branches or pull requests

3 participants