feat: add h1digest when scanning go.mod (#1405)

Fixes https://github.com/anchore/syft/issues/1277
This commit is contained in:
Keith Zantow
2022-12-20 02:18:35 +00:00
committed by GitHub
parent 82f32c7301
commit 7b08608adb
15 changed files with 247 additions and 94 deletions
@@ -313,7 +313,7 @@ func toPackageChecksums(p pkg.Package) ([]common.Checksum, bool) {
})
}
}
case pkg.GolangBinMetadata:
case pkg.GolangMetadata:
// because the H1 digest is found in the Golang metadata we cannot claim that the files were analyzed
algo, hexStr, err := util.HDigestToSHA(meta.H1Digest)
if err != nil {