Replies: 2 comments 2 replies
-
from my perspective, the answer is heavily depending on the actual architecture, and probably very debatable. but anyway, here are my 2cents:
my result would be: {
"metadata": { "component": { "type":"container", "name":"image", "bom-ref":"img" } },
"components": [
{ "type":"operating-system", "name":"debian", "bom-ref":"os",
"components": [
{ "type":"library", "name":"libc6" },
{ "type":"library", "name":"base-files" },
{ "type":"application", "name":"vim" }
]
},
{ "type":"application", "name":"myapp", "bom-ref":"bin",
"components": [
{ "type":"library", "name":"modA" },
{ "type":"library", "name":"modB" }
]
}
],
"dependencies": [
{ "ref":"img", "dependsOn":["os","bin", "vim"] },
{ "ref":"os", "dependsOn":["libc6","base-files"] },
{ "ref":"libc6" },
{ "ref":"base-files" },
{ "ref":"vim" },
{ "ref":"bin", "dependsOn":["modA","modB"] },
{ "ref":"modB","dependsOn":["modA"] }
{ "ref":"modA" }
]
} |
Beta Was this translation helpful? Give feedback.
-
I think this is very opinionated. I would not generalize this.
My opinion on this: manufacturer should be responsible for producing SBOM for their software as well as resolving ambiguities based on understanding of their product. That BOM becomes canonical for the specific product. I don't believe it is correct that other people will then try to recreate BOM for the same product. Instead, there should be a system in place to distribute manufacturer's BOM to other parties - look at TEA project here - https://github.com/CycloneDX/transparency-exchange-api/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to confirm the recommended CycloneDX layout for a container image produced from a simple Dockerfile:
Inventory:
libc6
,base-files
, …)plus the additional package (
vim
)myapp
modA
,modB
, …) with their own depends-on graphAfter reading the Relationships guide, I still see several plausible patterns.
Below are abbreviated CycloneDX JSON snippets for each (only the fields needed to illustrate the structure).
Pattern 1 — two parallel assemblies (OS and binary)
OS contains OS packages, and
myapp
is considered part of the image, not of the OS. The image contains two assemblies: the OS and the application.Pattern 2 — single nested assembly (everything under the OS)
Everything is nested under the OS assembly;
myapp
is treated as something contained by the OS.Pattern 3 — flat components + dependencies only
In this view, the entire image depends on both the OS and the binary.
The rationale is that, just as
nginx:latest
would not function without thenginx
binary, the image cannot run withoutmyapp
, so the binary can be modelled as a dependency of the container itself.Question
Which of these patterns does the CycloneDX community regard as the most idiomatic / interoperable way to represent such an everyday container image?
Side note
@jkowalleck commented below earlier:
If the choice really is “out of scope” for the CycloneDX spec, then every tool will encode the same image differently, and interoperability will suffer. Given such a common structure, would it make sense for CycloneDX to publish a recommended profile so that SBOMs converge on a single canonical layout?
Thank you for any guidance.
Beta Was this translation helpful? Give feedback.
All reactions