Scanning a repository does not pick up any licenses #8375
danielpomfjuk
started this conversation in
Bugs
Replies: 1 comment 1 reply
-
seems like this might be related #7993 builduser@LAPTOP-1SGEE6KN:~$ trivy repository https://github.com/prometheus/node_exporter --license-full --scanners license
2025-02-07T17:14:04Z INFO [license] Full license scanning is enabled
Enumerating objects: 7581, done.
Counting objects: 100% (7581/7581), done.
Compressing objects: 100% (3924/3924), done.
Total 7581 (delta 4145), reused 6333 (delta 3149), pack-reused 0 (from 0)
Loose File License(s) (license)
Total: 5 (UNKNOWN: 0, LOW: 5, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
┌────────────────┬──────────┬────────────┬─────────────────────────────┐
│ Classification │ Severity │ License │ File Location │
├────────────────┼──────────┼────────────┼─────────────────────────────┤
│ Notice │ LOW │ Apache-2.0 │ LICENSE │
│ │ │ ├─────────────────────────────┤
│ │ │ │ collector/devstat_freebsd.c │
│ │ │ ├─────────────────────────────┤
│ │ │ │ collector/devstat_freebsd.h │
│ │ │ ├─────────────────────────────┤
│ │ │ │ collector/kvm_bsd.c │
│ │ │ ├─────────────────────────────┤
│ │ │ │ collector/kvm_bsd.h │
└────────────────┴──────────┴────────────┴─────────────────────────────┘ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When trying to scan a public repository
https://github.com/prometheus/node_exporter
, trivy does not include any licenses in the resulting SBOM fileThe repo contains LICENSE in its root and that file contains Apache-2 License , which isn't mentioned anywhere in the output file
Desired Behavior
Running trivy against a repository with LICENSE file includes the license from that file in the resulting SBOM
Actual Behavior
Running trivy against a repository with LICENSE file ignores the license of the repository
Reproduction Steps
1.trivy repository https://github.com/prometheus/node_exporter --format spdx-json --license-full --scanners license -o /sboms-2/test.spdx.json 2.cat /sboms-2/test.spdx.json | grep license -i
Target
Git Repository
Scanner
License
Output Format
SPDX
Mode
None
Debug Output
Operating System
Linux, Ubuntu 20.04
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions