feat: report unknowns in sbom (#2998)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
Keith Zantow
2024-10-07 16:11:37 -04:00
committed by GitHub
co-authored by Alex Goodman
parent 4d7ed9f749
commit ccbee94b87
145 changed files with 4420 additions and 233 deletions
+4
View File
@@ -26,6 +26,7 @@ type Artifacts struct {
FileContents map[file.Coordinates]string
FileLicenses map[file.Coordinates][]file.License
Executables map[file.Coordinates]file.Executable
Unknowns map[file.Coordinates][]string
LinuxDistribution *linux.Release
}
@@ -62,6 +63,9 @@ func (s SBOM) AllCoordinates() []file.Coordinates {
for coordinates := range s.Artifacts.FileDigests {
set.Add(coordinates)
}
for coordinates := range s.Artifacts.Unknowns {
set.Add(coordinates)
}
for _, relationship := range s.Relationships {
for _, coordinates := range extractCoordinates(relationship) {
set.Add(coordinates)