cyclonedx-conan
cyclonedx-conan copied to clipboard
Fix metadata (fix root test)
Fix the metadata component by fixing the test for the root component.
Closes: https://github.com/CycloneDX/cyclonedx-conan/issues/101
This is only an issue when used for conanfile.py (rather than conanfile.txt).
For the conanfile.py from https://github.com/CycloneDX/cyclonedx-conan/issues/101, it produces the following SBOM:
{
"bomFormat": "CycloneDX",
"specVersion": "1.3",
"serialNumber": "urn:uuid:92a2a7ad-2470-4d04-9e3c-def967bfc4e3",
"version": 1,
"metadata": {
"component": {
"bom-ref": "[email protected]",
"type": "application",
"name": "conan-test",
"version": "1.0.0"
}
},
"components": [
{
"bom-ref": "pkg:conan/[email protected]?repository_url=https://center.conan.io",
"type": "library",
"name": "fmt",
"version": "8.0.0",
"purl": "pkg:conan/[email protected]?repository_url=https://center.conan.io"
}
],
"dependencies": [
{
"ref": "pkg:conan/[email protected]?repository_url=https://center.conan.io",
"dependsOn": []
},
{
"ref": "[email protected]",
"dependsOn": [
"pkg:conan/[email protected]?repository_url=https://center.conan.io"
]
}
]
}