Pick up license information from .venv when --license-full #6812
black-snow
started this conversation in
Ideas
Replies: 1 comment 5 replies
-
Hello @black-snow This is a bit unclear in the context of license scanning, but you can scan
Regards, Dmitriy |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I expected
--license-full
to walk the fs and pick up license information from.venv/lib/python3.12/site-packages
, e.g., from.venv/lib/python3.12/site-packages/wsproto-1.2.0.dist-info/LICENSE
.Trivy supposedly already scans site-packages, just not in arbitrary places. So it seems to me that picking up
.venv
from the project should be rather easy to add. Perhaps, we could also pass in additional directory and cover most / all Python build tools.My expectation was that with
--license-full
trivy would walk the whole file tree under the given path and look for package metadata it found in mypoetry.lock
file.It seems like, at the moment, in order to get license information for python projects you have to build a container or to install the package locally after the build. Not impossible but unwieldy when building libs.
/edit: or if I could just point it to the generated wheel or sdist ...
/edit2: we can do this via the
rootfs
scanner (thanks @DmitriyLewen) - it's somewhat unexpected, though. Why should fs and rootfs differ? Why are there even two different scanning methods for the file system? Why can you give rootfs a path (shouldn't it scan from ... the root?)? We should at least make this clearer in the docs.Target
Filesystem
Scanner
License
Beta Was this translation helpful? Give feedback.
All reactions