Skip to content

Commit 7938b27

Browse files
yogeshhegdecshilwant
authored andcommitted
feat(linux): Add how to guide for working with SBOMs
Add How to guide for working with SBOM's with sections * Generating SBOM in SPDX and CycloneDX format * Tools and references for Working with SBOM i.e visualizing, merging, modifying SBOMs Signed-off-by: Yogesh Hegde <y-hegde@ti.com>
1 parent 31456b4 commit 7938b27

8 files changed

Lines changed: 184 additions & 4 deletions

File tree

configs/AM62LX/AM62LX_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ linux/How_to_Guides/Target/How_To_Enable_M2CC3301_in_linux
129129
linux/How_to_Guides/Target/Runtime_debug_unlock_on_secure_device
130130
linux/How_to_Guides/FAQ/How_to_Check_Device_Tree_Info
131131
linux/How_to_Guides/FAQ/How_to_Integrate_Open_Source_Software
132+
linux/How_to_Guides/FAQ/How_to_work_with_SBOM
132133
linux/How_to_Guides_Hardware_Setup_with_CCS
133134
linux/How_to_Guides/Hardware_Setup_with_CCS/AM62Lx_EVM_Hardware_Setup
134135
linux/Demo_User_Guides/index_Demos

configs/AM62PX/AM62PX_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ linux/How_to_Guides/Target/Runtime_debug_unlock_on_secure_device
174174
linux/How_to_Guides/Target/How_to_Tune_Real_Time_Linux
175175
linux/How_to_Guides/FAQ/How_to_Check_Device_Tree_Info
176176
linux/How_to_Guides/FAQ/How_to_Integrate_Open_Source_Software
177+
linux/How_to_Guides/FAQ/How_to_work_with_SBOM
177178
linux/How_to_Guides_Hardware_Setup_with_CCS
178179
linux/How_to_Guides/Hardware_Setup_with_CCS/AM62Px_EVM_Hardware_Setup
179180
linux/How_to_Guides/Target/How_To_Carve_Out_CMA

configs/AM62X/AM62X_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ linux/How_to_Guides/Target/Runtime_debug_unlock_on_secure_device
178178
linux/How_to_Guides/Target/How_to_Tune_Real_Time_Linux
179179
linux/How_to_Guides/FAQ/How_to_Check_Device_Tree_Info
180180
linux/How_to_Guides/FAQ/How_to_Integrate_Open_Source_Software
181+
linux/How_to_Guides/FAQ/How_to_work_with_SBOM
181182
linux/How_to_Guides_Hardware_Setup_with_CCS
182183
linux/How_to_Guides/Hardware_Setup_with_CCS/AM62x_EVM_Hardware_Setup
183184

configs/AM64X/AM64X_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ linux/How_to_Guides/Hardware_Setup_with_CCS/AM64x_EVM_Hardware_Setup
153153
linux/How_to_Guides/FAQ/How_to_Verify_Ipc_Linux_R5
154154
linux/How_to_Guides/FAQ/How_to_Check_Device_Tree_Info
155155
linux/How_to_Guides/FAQ/How_to_Integrate_Open_Source_Software
156+
linux/How_to_Guides/FAQ/How_to_work_with_SBOM
156157
linux/How_to_Guides/Target/Processor_SDK_Linux_File_System_Optimization_Customization
157158

158159
devices/AM64X/index_RTOS

source/devices/AM62PX/linux/Release_Specific_Release_Notes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ found on the SDK download page or in the installed directory as indicated below.
5151
Software Bill of Materials (SBOM)
5252
=================================
5353

54-
|SDK_FULL_NAME| releases include Software Bill of Materials (SBOM) files in SPDX 3.0
54+
|__SDK_FULL_NAME__| releases include Software Bill of Materials (SBOM) files in SPDX 3.0
5555
format by default. SBOMs for all released artifacts are bundled into a single
56-
archive and can be found on the |SDK_DOWNLOAD_URL|.
56+
archive and can be found on the |__SDK_DOWNLOAD_URL__|.
5757
Release 12.00.00.07.04
5858
======================
5959

source/devices/AM64X/linux/Release_Specific_Release_Notes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ found on the SDK download page or in the installed directory as indicated below.
5151
Software Bill of Materials (SBOM)
5252
=================================
5353

54-
|SDK_FULL_NAME| releases include Software Bill of Materials (SBOM) files in SPDX 3.0
54+
|__SDK_FULL_NAME__| releases include Software Bill of Materials (SBOM) files in SPDX 3.0
5555
format by default. SBOMs for all released artifacts are bundled into a single
56-
archive and can be found on the |SDK_DOWNLOAD_URL|.
56+
archive and can be found on the |__SDK_DOWNLOAD_URL__|.
5757

5858
Release 12.00.00.07.04
5959
======================
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
.. _how-to-work-with-sbom:
2+
3+
###############################################################
4+
How to Guide for working with Software Bill of Materials (SBOM)
5+
###############################################################
6+
7+
********
8+
Glossary
9+
********
10+
11+
.. glossary::
12+
13+
SBOM
14+
Software Bill of Materials - is a comprehensive list of all the software components, dependencies, and metadata associated with an application.
15+
16+
SPDX
17+
Software Package Data Exchange - is an open standard (or format) for communicating Software Bill of Materials (SBOM) information including components, licenses, copyrights, and security references.
18+
19+
CycloneDX
20+
CycloneDX is a full-stack Bill of Materials (BOM) standard that provides advanced supply chain capabilities for cyber risk reduction.
21+
22+
VEX
23+
Vulnerability Exploitability eXchange - is a standardized format for sharing information about vulnerabilities and their exploitability.
24+
25+
***************
26+
Generating SBOM
27+
***************
28+
29+
|__SDK_FULL_NAME__| Yocto build generates SBOMs in the following formats and versions:
30+
31+
.. list-table::
32+
:header-rows: 1
33+
34+
* - Format
35+
- Version
36+
* - SPDX
37+
- 3.0
38+
* - CycloneDX
39+
- 1.6
40+
41+
Follow the steps below based on your required format.
42+
43+
Generating SBOM in SPDX 3.0 Format
44+
==================================
45+
46+
SPDX 3.0 is generated by default when building |__SDK_FULL_NAME__| Yocto, no extra steps required.
47+
If you require additional vulnerability information, follow these steps:
48+
49+
1. Add the following line to your :file:`local.conf`:
50+
51+
.. code-block:: text
52+
53+
INHERIT += "vex"
54+
55+
2. Build Yocto according to the build instructions in :ref:`Processor SDK - Building the SDK with Yocto <building-the-sdk-with-yocto>`.
56+
57+
The following artifacts will be generated in the Yocto deploy directory:
58+
59+
.. list-table::
60+
:header-rows: 1
61+
:widths: 50 50
62+
63+
* - File
64+
- Description
65+
* - :file:`${IMAGE_NAME}.rootfs.spdx.json`
66+
- The SPDX v3.0 SBOM file
67+
* - :file:`${IMAGE_NAME}.rootfs.json`
68+
- Vulnerability information file generated by :file:`vex.bbclass`
69+
70+
71+
Generating SBOM in CycloneDX Format
72+
===================================
73+
74+
To generate SBOM in CycloneDX format, follow these steps:
75+
76+
#. Start with the build instructions in :ref:`Processor SDK - Building the SDK with Yocto <building-the-sdk-with-yocto>`
77+
#. After cloning ``oe-layersetup``, uncomment the ``meta-cyclonedx`` line in
78+
the layer configuration file, for example:
79+
80+
.. code-block:: text
81+
82+
meta-cyclonedx,https://github.com/iris-GmbH/meta-cyclonedx.git,main,0170751b487162f8e476fd32d441ddfcf24ca78a,layers=
83+
84+
#. Add the following line to your :file:`local.conf`:
85+
86+
.. code-block:: text
87+
88+
INHERIT += "cyclonedx-export"
89+
90+
#. Continue to build Yocto according to the build instructions in :ref:`Processor SDK - Building the SDK with Yocto <building-the-sdk-with-yocto>`.
91+
92+
The following artifacts will be generated in the Yocto deploy directory:
93+
94+
.. list-table::
95+
:header-rows: 1
96+
:widths: 50 50
97+
98+
* - File
99+
- Description
100+
* - :file:`${IMAGE_NAME}.rootfs.cyclonedx.bom.json`
101+
- The CycloneDX SBOM file
102+
* - :file:`${IMAGE_NAME}.rootfs.cyclonedx.vex.json`
103+
- The CycloneDX VEX file
104+
105+
*****************
106+
Working with SBOM
107+
*****************
108+
109+
It is recommended to use open-source tools for working with SBOMs.
110+
The following open-source tools are recommended for working with SBOMs:
111+
112+
.. list-table::
113+
:header-rows: 1
114+
:widths: 20 40 40
115+
116+
* - Format
117+
- Tool
118+
- Description
119+
* - CycloneDX
120+
- `CycloneDX Sunshine <https://github.com/CycloneDX/Sunshine/>`_
121+
- Visualize CycloneDX SBOMs in a human-readable format
122+
* - CycloneDX
123+
- `CycloneDX CLI <https://github.com/CycloneDX/cyclonedx-cli>`_
124+
- BOM analysis, modification, diffing, merging, format conversion, signing and verification.
125+
* - SPDX
126+
- `SPDX Open Source Tools <https://spdx.dev/tools/open-source-tools/>`_
127+
- A collection of open-source tools for working with SPDX SBOMs
128+
129+
.. note::
130+
131+
SPDX 3.0 is not yet widely supported by SPDX tools. Using such tools with
132+
SPDX 3.0 files may give varied or unexpected results.
133+
134+
************
135+
CVE Analysis
136+
************
137+
138+
The `sbom-cve-check <https://pypi.org/project/sbom-cve-check/>`_ tool can be
139+
used to perform CVE analysis on the generated SPDX SBOM.
140+
141+
#. Install the tool:
142+
143+
.. code-block:: console
144+
145+
pip install sbom-cve-check
146+
147+
.. note::
148+
149+
It is recommended to install this tool in a Python virtual environment.
150+
151+
#. Retrieve the following artifacts from the Yocto deploy directory:
152+
153+
.. list-table::
154+
:header-rows: 1
155+
:widths: 50 50
156+
157+
* - File
158+
- Description
159+
* - :file:`${IMAGE_NAME}.rootfs.spdx.json`
160+
- The SPDX v3.0 SBOM file
161+
* - :file:`${IMAGE_NAME}.rootfs.json`
162+
- Vulnerability information file generated by :file:`vex.bbclass`
163+
164+
#. Run the CVE analysis:
165+
166+
.. code-block:: console
167+
168+
sbom-cve-check --sbom-path ${IMAGE_NAME}.rootfs.spdx.json \
169+
--yocto-vex-manifest ${IMAGE_NAME}.rootfs.json \
170+
--export-type yocto-cve-check-manifest \
171+
--export-path cve-check.json
172+
173+
.. note::
174+
175+
:file:`sbom-cve-check` only supports SPDX format and does not support CycloneDX.

source/linux/How_to_Guides_Developer_Notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Developer Notes
3838
How_to_Guides/FAQ/How_to_Configure_MSMC_memory
3939
How_to_Guides/FAQ/How_to_Check_Device_Tree_Info
4040
How_to_Guides/FAQ/How_to_Integrate_Open_Source_Software
41+
How_to_Guides/FAQ/How_to_work_with_SBOM
4142
How_to_Guides/Host/How_to_Build_a_Ubuntu_Linux_host_under_VMware
4243
How_to_Guides/Host/K3_Resource_Partitioning_Tool
4344
How_to_Guides/Host/How_to_Setup_and_Debug_using_Lauterbach

0 commit comments

Comments
 (0)