Closed daneb-ifm closed 1 year ago
Please make sure there are license files such as LICENSE under the specified root dir.
Interesting, there is no LICENSE file in the root dir. I thought trivy scan through the packages.lock files or in container in the node_modules etc. directory. I guess the documentation suggests another functionality. Isn´t it? Thanks :)
As described in the document, --license-full
enables the following functionality.
Trivy scans source code files, Markdown documents, text files and LICENSE documents to identify license usage within the image or filesystem.
https://aquasecurity.github.io/trivy/v0.37/docs/licenses/scanning/
Filesystem scanning doesn't support package licenses such as package.json, while image scanning does.
okay, I understood!
We have a plan to add support for package licenses in filesystem scanning. Please track the issue. https://github.com/aquasecurity/trivy/pull/2916
Description
Trivy cannot find license files in npm or nuget package.lock files in --license-full filesystem (git repo) scan.
trivy fs --scanners license --license-full
Response is ->
2023-02-08T14:34:15.779Z INFO Vulnerability scanning is enabled 2023-02-08T14:34:15.779Z INFO Full license scanning is enabled 2023-02-08T14:34:21.581Z INFO Number of language-specific files: 11 2023-02-08T14:34:21.581Z INFO Detecting nuget vulnerabilities... 2023-02-08T14:34:21.587Z INFO Detecting npm vulnerabilities...
no more output.
What did you expect to happen?
Show license information for npm / nuget packages.
What happened instead?
No license output
Output of run with
-debug
:See all files inside the folder (packages.lock, ...) (delete the file/folder names)
Output of
trivy -v
:Additional details (base image name, container registry info...):
Thanks :)