-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
More generic support for Python #492
Comments
My team uses requirements.txt as a lock file, so support for that would be much appreciated. More generally, I like the idea of just finding any An alternative approach could be to locate all |
This would be really helpful as we use conda for ML libs and we are not able to use trivy. |
This issue is stale because it has been labeled with inactivity. |
I've added this task to our backlog. |
As a first step, we'll support How it works:
How to implement it: |
@knqyf263 I am working on it. work in progress |
We finally merged #1169, so Trivy will support requirements.txt in the next version. Note that it detects only |
I have tried adding more generic pip-compile support: aquasecurity/fanal#357 |
…t azurerm terraform provider (aquasecurity#492) Signed-off-by: Liam Galvin <[email protected]>
It seems that
trivy
supportspoetry.lock
andPipfile.lock
for Python, but notrequirements.txt
.requirements.txt
has dual usage:pip-tools
package takes an unpinnedrequirements.in
and generates a pinnedrequirements.txt
.More broadly, there's the issue of people who install packages using unpinned mechanisms, e.g.
RUN pip install flask
in their Dockerfile.I can imagine a number of approaches:
requirements.txt
, and just give up if it's unpinned. This will miss some vulnerabilities.pip list
inside the container to get actually installed packages, and then you don't care how they were installed. The downside is that this is a big difference from your current mode of operation.pip list
just by inspecting the contents of anysite-packages
directories you find in the image. I went and asked apip
developer, and turns out allpip list
does is look for<package name>-<version>.dist-info
directories and uses that to get package name version. E.g. they look likeparamiko-2.7.1.dist-info
for packageparamiko
with version 2.7.1The third option seems like the easiest and most useful: it works for any Python environment and installation mechanism (it ought to work for Conda too, which is yet another packaging tool), and it's quite simple, just listing directories and parsing their names.
The text was updated successfully, but these errors were encountered: