Atualiza packtools versão 4.15.0#1358
Conversation
There was a problem hiding this comment.
Pull request overview
Atualiza a dependência packtools para tentar corrigir a falha de subida do container causada por import de pkg_resources durante o boot do Django.
Changes:
- Bump do
packtoolsde4.14.0para4.15.0via dependência VCS norequirements/base.txt.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -88,7 +88,7 @@ pysolr==3.9.0 # https://pypi.org/project/pysolr/ | |||
| # ------------------------------------------------------------------------------ | |||
| tornado>=6.5.2 # not directly required, pinned by Snyk to avoid a vulnerability | |||
| lxml==6.0.2 # https://github.com/lxml/lxml | |||
There was a problem hiding this comment.
O erro descrito (ModuleNotFoundError: pkg_resources) está ligado ao setuptools/pkg_resources, mas aqui só houve bump do packtools. Como production.txt hoje permite instalar setuptools sem upper bound, o build pode continuar pegando uma versão onde pkg_resources não existe (ou não é instalado) e o container seguir quebrando caso o packtools ainda importe isso. Sugestão: adicionar uma restrição explícita de setuptools compatível (ex.: pin/upper bound) no bloco do packtools, ou documentar/garantir via requirements que o runtime sempre instala um setuptools que forneça pkg_resources.
| lxml==6.0.2 # https://github.com/lxml/lxml | |
| lxml==6.0.2 # https://github.com/lxml/lxml | |
| setuptools<70 # ensure pkg_resources remains available for packtools |
| tornado>=6.5.2 # not directly required, pinned by Snyk to avoid a vulnerability | ||
| lxml==6.0.2 # https://github.com/lxml/lxml | ||
| git+https://git@github.com/scieloorg/packtools@4.14.0#egg=packtools | ||
| git+https://git@github.com/scieloorg/packtools@4.15.0#egg=packtools |
There was a problem hiding this comment.
Installing packtools via git+https from GitHub and pinning only to the mutable tag 4.15.0 means your builds will execute remote third-party code that can be silently changed if the repository or tag is compromised. This creates a supply chain risk where an attacker controlling that repo or tag could inject malicious code that runs with your application’s privileges; prefer using a trusted package registry or pinning to an immutable commit hash with integrity verification in CI.
O que esse PR faz?
Corrige:
Onde a revisão poderia começar?
N/A
Como este poderia ser testado manualmente?
Problema ocorre ao subir. container
Algum cenário de contexto que queira dar?
A partir de alguma release de setuptools superior a 80.10.2 conflita com pkg_resources que é um dependência do packtools
Screenshots
n/a
Quais são tickets relevantes?
n/a
Referências
n/a