Description
What is the feature you want to request?
User story 1: global configuration with config.yml
As an ORT user, I want to set the SBOM author information globally for all reporters, so that I can maintain the author information globally for all repositories in one and only one place.
User story 2: repository configuration with .ort.yml
As an ORT user, I want to set the SBOM author information on a repository level for all reporters, so that I can overwrite the author information from the global config.yml
, and maintain the author information for the repository in one and only one place.
User story 3: command line arguments
As an ORT user, I want to set the SBOM author information with command line arguments for all reporters, so that I can overwrite the author information from the repositorie's .ort.yml
.
In the following, I use the two Software Bill of Materials (SBOMs) standards CycloneDX and SPDX examples on how the expected output should look. However, the author information should be included in all other reports as well. The following information is given
"Person: FirstName LastName (first_name.last_name@my_organisation.com)"
"Organization: MyOrganisation (opensource@my_organisation.com)"
SPDX
The following shows how the author information should be displayed for SPDX version 2.2.
<?xml version='1.0' encoding='UTF-8'?>
<Document>
<SPDXID>SPDXRef-DOCUMENT</SPDXID>
<spdxVersion>SPDX-2.2</spdxVersion>
<creationInfo>
<created>2024-08-20T10:41:42Z</created>
<creators>Tool: ort-22.3.0-054.sha.6298797</creators>
<creators>Organization: MyOrganisation (opensource@my_organisation.com)</creators>
<creators>Person: FirstName LastName (first_name.last_name@my_organisation.com)</creators>
<licenseListVersion>3.23</licenseListVersion>
</creationInfo>
....
CycloneDX
The following shows how the author information should be displayed for CycloneDX version 1.5.
<bom xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cyclonedx.org/schema/bom/1.5" serialNumber="urn:uuid:2911d30c-8cbb-42e5-9ad3-1c46749f6a0e" version="2">
<metadata>
<timestamp>2024-08-14T09:17:29Z</timestamp>
<tools>
<components>
....
</components>
</tools>
<authors>
<author>
<name>MyOrganisation</name>
<email>opensource@my_organisation.com</email>
</author>
<author>
<name>FirstName LastName</name>
<email>first_name.last_name@my_organisation.com</email>
</author>
</authors>
<component type="application" bom-ref="pkg:npm/[email protected]">
....
Describe the solution you would like
To address the three user stories from above, I would like to set the author information in config.yml
file globally, on the repository level in .ort.yml
, and on the command line with options. The following shows a yml
file which sets the author information. Please note that I would expect the configuration for the global and repository level to be identical.
ort:
....
reporter:
config:
options:
author.person: FirstName LastName
author.person.email: first_name.last_name@my_organisation.com
author.organization: MyOrganisation
author.organization.email: opensource@my_organisation.com
....
And in the case of multiple authors, I would expect the following.
ort:
....
reporter:
config:
options:
author.person: FirstNameA LastNameA
author.person.email: first_nameA.last_nameA@my_organisationA.com
author.person: FirstNameB LastNameB
author.person.email: first_nameB.last_nameB@my_organisationB.com
author.organization: MyOrganisationA
author.organization.email: opensource@my_organisationA.com
author.organization: MyOrganisationB
author.organization.email: opensource@my_organisationB.com
....
For the command line arguments, I would expect it to work as follows.
./ort/cli/build/install/ort/bin/ort \
report \
....
--report-formats=PlainTextTemplate,PdfTemplate,WebApp,SpdxDocument,CycloneDx \
--report-option=reporters=author.person=FirstName LastName \
--report-option=reporters=author.person.email=first_name.last_nameA@my_organisation.com \
--report-option=reporters=author.organization=MyOrganisation \
--report-option=reporters=author.organization.email=opensource@my_organisation.com \
And for multiple authors the following.
./ort/cli/build/install/ort/bin/ort \
report \
....
--report-formats=PlainTextTemplate,PdfTemplate,WebApp,SpdxDocument,CycloneDx \
--report-option=reporters=author.person=FirstNameA LastNameA,FirstNameB LastNameB \
--report-option=reporters=author.person.email=first_nameA.last_nameA@my_organisationA.com,first_nameB.last_nameB@my_organisationB.com \
--report-option=reporters=author.organization=MyOrganisationA,MyOrganisationB \
--report-option=reporters=author.organization.email=opensource@my_organisationA.com,opensource@my_organisationB.com \
Alternatives you have considered
Within the tool, there are no alternatives to set the author information. Neither can you set it globally, nor can you set it on a repository level. In addition, this information can also not be set as a command line argument. See discussion at #9003.
Outside of the tool, there are ways on how to include the information. Apart from the obvious way to copy and paste the information manually into the file, it is possible to use software from other parties to automatically insert author information. See for example the following code that uses xmlstarlet
to insert the author information into a CycloneDX SBOM created by ORT.
xmlstarlet edit --inplace --omit-decl \
-N ns="http://cyclonedx.org/schema/bom/1.5" \
--subnode /ns:bom/ns:metadata/ \
-type elem -n "authors" --value "" \
--subnode /ns:bom/ns:metadata/authors \
-type elem -n "author" --value "" \
--subnode /ns:bom/ns:metadata/authors/author[1] \
-type elem -n "name" --value "FirstName LastName" \
--subnode /ns:bom/ns:metadata/authors/author[1] \
-type elem -n "email" --value "[email protected]" \
--subnode /ns:bom/ns:metadata/authors \
-type elem -n "author" --value "" \
--subnode /ns:bom/ns:metadata/authors/author[2] \
-type elem -n "name" --value "MyCompany" \
--subnode /ns:bom/ns:metadata/authors/author[2] \
-type elem -n "email" --value "[email protected]" \
my-project-sbom.xml
Additional context
Relevance
The relevance of this feature is high. First, the Cyber Resilience Act (CRA) mandates a Software Bill of Materials (SBOM) for all digital products that are put on the market place within the European Union. Technical requirement documents of the CRA, such as the BSI-TR-03183-2, define minimum data fields for a Software Bill of Materials (SBOMs). And one of the minimum required data fields is the Creator of the SBOM. See the following verbatim Table 2 from the document.
Data field | Description |
---|---|
Creator of the SBOM | Email address of the entity that created the SBOM. If no email address is available this MUST be a “Uniform Resource Locator (URL)”. |
Timestamp | Date and time of the SBOM data compilation according to the specification of the formats (see chapter 4) |
Similarely, for the USA, the National Telecommunications and Information Administration (NTIA) and the Department of Commerce published the minimal requirements for a SBOM as well in The Minimum Elements For a Software Bill of Materials (SBOM). This publication is in the legal context of Executive Order 14028. These minimum elements also declare the author of an SBOM as being part of the minimum elements - see Author of SBOM Data within the linked document.
In short, two jurisdictions of hugh market places mandate the inclusion of SBOM author information in the SBOM. And as a result, all ORT users are potential beneficiaries of such a feature.
Bigger picture
I would argue that this feature request should be part of a larger effort with the goal to be 100% compliant with the two jurisdictions, and also with different CycloneDX and SPDX versions. The bigger effort, and hence long term goal, would hence include adding more supported versions for CycloneDX and SPDX and making sure that ORT can produce compliant SBOMs right out the box with test cases for all CycloneDX and SPDX.
ToDo List
A rough to do list might be the following
- [] Add author information configs to
config.yml
and associated tests. - [] Add author information configs to
.ort.yml
and associated tests. - [] Add command line options and associated tests.
- [] Add tests to test priority of command line >
.ort.yml
>config.yml
.