Add dependencies to cyclonedx (#768)

Add dependencies to cyclonedx

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Co-authored-by: hectorj2f <hectorf@vmware.com>
This commit is contained in:
Christopher Angelo Phillips
2022-01-25 15:34:16 -05:00
committed by GitHub
co-authored by hectorj2f
parent 161fa7be4a
commit 024a5a9f3f
4 changed files with 81 additions and 2 deletions
@@ -37,5 +37,8 @@ func cycloneDxRedactor(s []byte) []byte {
for _, pattern := range []*regexp.Regexp{serialPattern, rfc3339Pattern, sha256Pattern} {
s = pattern.ReplaceAll(s, []byte("redacted"))
}
// the bom-ref will be autogenerated every time, the value here should not be directly tested in snapshot tests
s = regexp.MustCompile(` "bom-ref": .*\n`).ReplaceAll(s, []byte(""))
return s
}