-
Notifications
You must be signed in to change notification settings - Fork 25
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
snyk test
produces an issue for setuptools==68.0.0
with high
severity in the output when run in a 3.12
venv when setuptools
is in the dependency list
#243
Comments
snyk test
produces an issue for setuptools==68.0.0
with high
severity on Python 3.12
when setuptools
is in the dependency listsnyk test
produces an issue for setuptools==68.0.0
with high
severity in the output when run in a 3.12
venv when setuptools
is in the dependency list
I agree pinning the setuptools version in the plugin is asking for trouble. But setuptools does make breaking changes quite often. Is tensorflow or something else in your stack declaring a runtime dependency on setuptools so it's showing in the requirements? It should only be a build time dependency in an ideal world.
-- edit Ended up finding a project that does have a runtime dependency on setuptools. This indeed does cause the issue you describe. |
Maybe the plugin could vendor setuptools? |
Indeed, both I agree that the most beneficial approach overall would be to nudge them to remove Your argument on breaking changes is very valid, and considering that, it will probably be fairly unreasonable to support arbitrary versions that could already be present in an environment. I would love for it, at the end of the day, to be handled in the plugin, and to not have to do preps and cleanups and adding ignores on my side for this. I believe vendoring can be an acceptable approach, although I don't have any other ideas at the moment. |
This has been seemingly resolved by #246 |
node -v
: v18.5.0npm -v
:snyk -v
: 1.1292.1snyk test --file=requirements.txt
In our case, we install
tensorflow
as a dependency, which hassetuptools==70.0.0
in its list of dependencies. Upon runningsnyk test
, setuptools==68.0.0 is installed, which results in the output ofsnyk test
containing an issue related to the high vulnerability insetuptools==68.0.0
.As per my uneducated and honestly haphazard look at the code, ideally, if
setuptools
is already present in the environment, the setuptools installation step should be skipped. At the very least, bumping UPDATED_SETUPTOOLS_VERSION to70.0.0
is desirable. I'm not sure if excludingsetuptools
from the list of dependencies to scan is easily achievable.I presume this can be handled via a Policy, but I would like to not to have to do it manually.
Expected behaviour
When
setuptools>68.0.0
is specified in the requirements either explicitly or transiently, and is present in the venv, upon runningsnyk test
, no vulnerabilities related tosetuptools
are expected in the output, and ideally,setuptools
shouldn't be re-installed back to68.0.0
.Actual behaviour
When
setuptools>68.0.0
is specified in the requirements either explicitly or transiently, and is present in the venv, upon runningsnyk test
, a vulnerable68.0.0
version is installed, and an issue for it is displayed in the output.Steps to reproduce
requirements.txt
file with eithersetuptools==70.0.0
specified directly, or withtensorflow==2.16.2
specified.pip install -r requirements.txt
.snyk test --file requirements.txt
setuptools==68.0.0
with high severity, andpip list | grep setuptools
will returnsetuptools 68.0.0
.The text was updated successfully, but these errors were encountered: