mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 22:12:28 +01:00
Include default config licenses (#3900)
* fix: the licenses config was not being carried through causing content to show by default --------- Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
This commit is contained in:
@@ -169,7 +169,7 @@ func assertUnknownLicenseContent(required bool) traitAssertion {
|
||||
|
||||
for _, pkg := range data.Artifacts {
|
||||
for _, lic := range pkg.Licenses {
|
||||
if strings.Contains(lic.SPDXExpression, "UNKNOWN") && required {
|
||||
if strings.Contains(lic.Value, "sha256") && required {
|
||||
assert.NotZero(tb, len(lic.Contents))
|
||||
} else {
|
||||
assert.Empty(tb, lic.Contents)
|
||||
|
||||
Reference in New Issue
Block a user