Files
syft/syft/formats/cyclonedxjson/test-fixtures/snapshot/TestCycloneDxDirectoryEncoder.golden
T
Christopher Angelo Phillips 42fa9e4965 feat: update syft license concept to complex struct (#1743)
this PR makes the following changes to update the underlying license model to have more expressive capabilities
it also provides some guarantee's surrounding the license values themselves

- Licenses are updated from string -> pkg.LicenseSet which contain pkg.License with the following fields:
- original `Value` read by syft
- If it's possible to construct licenses will always have a valid SPDX expression for downstream consumption
- the above is run against a generated list of SPDX license ID to try and find the correct ID
- SPDX concluded vs declared is added to the new struct
- URL source for license is added to the new struct
- Location source is added to the new struct to show where the expression was pulled from
2023-05-15 16:23:39 -04:00

121 lines
2.7 KiB
Plaintext

{
"$schema": "http://cyclonedx.org/schema/bom-1.4.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.4",
"serialNumber": "urn:uuid:1b71a5b4-4bc5-4548-a51a-212e631976cd",
"version": 1,
"metadata": {
"timestamp": "2023-05-08T14:40:32-04:00",
"tools": [
{
"vendor": "anchore",
"name": "syft",
"version": "v0.42.0-bogus"
}
],
"component": {
"bom-ref": "163686ac6e30c752",
"type": "file",
"name": "/some/path"
}
},
"components": [
{
"bom-ref": "8c7e1242588c971a",
"type": "library",
"name": "package-1",
"version": "1.0.1",
"licenses": [
{
"license": {
"id": "MIT"
}
}
],
"cpe": "cpe:2.3:*:some:package:2:*:*:*:*:*:*:*",
"purl": "a-purl-2",
"properties": [
{
"name": "syft:package:foundBy",
"value": "the-cataloger-1"
},
{
"name": "syft:package:language",
"value": "python"
},
{
"name": "syft:package:metadataType",
"value": "PythonPackageMetadata"
},
{
"name": "syft:package:type",
"value": "python"
},
{
"name": "syft:location:0:path",
"value": "/some/path/pkg1"
}
]
},
{
"bom-ref": "pkg:deb/debian/package-2@2.0.1?package-id=db4abfe497c180d3",
"type": "library",
"name": "package-2",
"version": "2.0.1",
"cpe": "cpe:2.3:*:some:package:2:*:*:*:*:*:*:*",
"purl": "pkg:deb/debian/package-2@2.0.1",
"properties": [
{
"name": "syft:package:foundBy",
"value": "the-cataloger-2"
},
{
"name": "syft:package:metadataType",
"value": "DpkgMetadata"
},
{
"name": "syft:package:type",
"value": "deb"
},
{
"name": "syft:location:0:path",
"value": "/some/path/pkg1"
},
{
"name": "syft:metadata:installedSize",
"value": "0"
}
]
},
{
"type": "operating-system",
"name": "debian",
"version": "1.2.3",
"description": "debian",
"swid": {
"tagId": "debian",
"name": "debian",
"version": "1.2.3"
},
"properties": [
{
"name": "syft:distro:id",
"value": "debian"
},
{
"name": "syft:distro:idLike:0",
"value": "like!"
},
{
"name": "syft:distro:prettyName",
"value": "debian"
},
{
"name": "syft:distro:versionID",
"value": "1.2.3"
}
]
}
]
}