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
@@ -234,6 +234,7 @@ func Test_toSyftFiles(t *testing.T) {
FileMetadata: map[file.Coordinates]file.Metadata{},
FileDigests: map[file.Coordinates][]file.Digest{},
Executables: map[file.Coordinates]file.Executable{},
Unknowns: make(map[file.Coordinates][]string),
},
},
{
@@ -349,6 +350,7 @@ func Test_toSyftFiles(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
tt.want.FileContents = make(map[file.Coordinates]string)
tt.want.FileLicenses = make(map[file.Coordinates][]file.License)
tt.want.Unknowns = make(map[file.Coordinates][]string)
assert.Equal(t, tt.want, toSyftFiles(tt.files))
})
}