Skip to content

transformer: add component metadata following BSI TR-03183-2 taxonomy#1

Open
charludo wants to merge 1 commit into
mainfrom
bsi-components
Open

transformer: add component metadata following BSI TR-03183-2 taxonomy#1
charludo wants to merge 1 commit into
mainfrom
bsi-components

Conversation

@charludo

@charludo charludo commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Upstream PR: nikstur#207

.strip_prefix("/nix/store/")
.unwrap_or(&derivation.path),
),
Property::new("bsi:component:archive", "no archive"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this is the right classification: the TR seems to distinguish individual files and archives, so archive may be appropriate unless the store path is a file?

@charludo charludo Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is debatable. And just one of the cases there the BSI spec doesn't really match our usecase well. I found this a rather useful overview: https://github.com/BSI-Bund/tr-03183-cyclonedx-property-taxonomy - sadly pretty explicitly states that we MUST set this field.

Since a nix store path is always a dir, IMO "no archive" is more correct than "archive". Though to be fair: "An archive is a combination of multiple components."

This isn't just an issue with archive, a lot of the values are hard to set/guess.

Edit: hold on

.unwrap_or(&derivation.path),
),
Property::new("bsi:component:archive", "no archive"),
Property::new("bsi:component:structured", "structured"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the store path does not have the metadata anymore. Are we setting this to structured because the metadata is still available, but elsewhere?

}
Some(OrganizationalEntity {
bom_ref: None,
name: Some(NormalizedString::new(&names.join(", "))),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From 5.2.1 and 5.2.2:

Email address of the entity that created and, if applicable, maintains the
respective component. If no email address is available this MUST be a
“Uniform Resource Locator (URL)”, e.g. the creator’s home page or the
project’s web page.

Should this try the email field and fall back to constructing a Github link instead? Does the spec allow multiple entities?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants