mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 07:26:34 +01:00
add file source digest support (#1914)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/CycloneDX/cyclonedx-go"
|
||||
|
||||
"github.com/anchore/syft/internal/file"
|
||||
syftFile "github.com/anchore/syft/syft/file"
|
||||
"github.com/anchore/syft/syft/pkg"
|
||||
)
|
||||
@@ -116,7 +117,7 @@ func decodeExternalReferences(c *cyclonedx.Component, metadata interface{}) {
|
||||
if ref.Hashes != nil {
|
||||
for _, hash := range *ref.Hashes {
|
||||
digests = append(digests, syftFile.Digest{
|
||||
Algorithm: syftFile.CleanDigestAlgorithmName(string(hash.Algorithm)),
|
||||
Algorithm: file.CleanDigestAlgorithmName(string(hash.Algorithm)),
|
||||
Value: hash.Value,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user