summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/sbom.rst
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2022-11-24 17:50:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-01 19:20:29 +0000
commit945c669138a76be18c6b4da4f8f907d2a5cfd83f (patch)
treecebff3cae5021d4fcceb5aa51fce1c2aead97ed2 /documentation/dev-manual/sbom.rst
parent6fe3143800925463279d0664fc7f3372b53c6c52 (diff)
downloadpoky-945c669138a76be18c6b4da4f8f907d2a5cfd83f.tar.gz
manuals: split dev-manual/common-tasks.rst
A 500 KB source file is always harder to manage, and can have section title conflicts. So, the "Common Tasks" document is gone and all its constituents are moved up one level. You now have 40 chapters in the Development Tasks Manual. (From yocto-docs rev: 8a45bc469411410020b8e688c137395fcaf3761b) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/sbom.rst')
-rw-r--r--documentation/dev-manual/sbom.rst68
1 files changed, 68 insertions, 0 deletions
diff --git a/documentation/dev-manual/sbom.rst b/documentation/dev-manual/sbom.rst
new file mode 100644
index 0000000000..f80e81279a
--- /dev/null
+++ b/documentation/dev-manual/sbom.rst
@@ -0,0 +1,68 @@
1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3Creating a Software Bill of Materials
4*************************************
5
6Once you are able to build an image for your project, once the licenses for
7each software component are all identified (see
8":ref:`dev-manual/licenses:working with licenses`") and once vulnerability
9fixes are applied (see ":ref:`dev-manual/vulnerabilities:checking
10for vulnerabilities`"), the OpenEmbedded build system can generate
11a description of all the components you used, their licenses, their dependencies,
12the changes that were applied and the known vulnerabilities that were fixed.
13
14This description is generated in the form of a *Software Bill of Materials*
15(:term:`SBOM`), using the :term:`SPDX` standard.
16
17When you release software, this is the most standard way to provide information
18about the Software Supply Chain of your software image and SDK. The
19:term:`SBOM` tooling is often used to ensure open source license compliance by
20providing the license texts used in the product which legal departments and end
21users can read in standardized format.
22
23:term:`SBOM` information is also critical to performing vulnerability exposure
24assessments, as all the components used in the Software Supply Chain are listed.
25
26The OpenEmbedded build system doesn't generate such information by default.
27To make this happen, you must inherit the
28:ref:`create-spdx <ref-classes-create-spdx>` class from a configuration file::
29
30 INHERIT += "create-spdx"
31
32You then get :term:`SPDX` output in JSON format as an
33``IMAGE-MACHINE.spdx.json`` file in ``tmp/deploy/images/MACHINE/`` inside the
34:term:`Build Directory`.
35
36This is a toplevel file accompanied by an ``IMAGE-MACHINE.spdx.index.json``
37containing an index of JSON :term:`SPDX` files for individual recipes, together
38with an ``IMAGE-MACHINE.spdx.tar.zst`` compressed archive containing all such
39files.
40
41The :ref:`create-spdx <ref-classes-create-spdx>` class offers options to include
42more information in the output :term:`SPDX` data, such as making the generated
43files more human readable (:term:`SPDX_PRETTY`), adding compressed archives of
44the files in the generated target packages (:term:`SPDX_ARCHIVE_PACKAGED`),
45adding a description of the source files handled by the target recipes
46(:term:`SPDX_INCLUDE_SOURCES`) and adding archives of these source files
47themselves (:term:`SPDX_ARCHIVE_SOURCES`).
48
49Though the toplevel :term:`SPDX` output is available in
50``tmp/deploy/images/MACHINE/`` inside the :term:`Build Directory`, ancillary
51generated files are available in ``tmp/deploy/spdx/MACHINE`` too, such as:
52
53- The individual :term:`SPDX` JSON files in the ``IMAGE-MACHINE.spdx.tar.zst``
54 archive.
55
56- Compressed archives of the files in the generated target packages,
57 in ``packages/packagename.tar.zst`` (when :term:`SPDX_ARCHIVE_PACKAGED`
58 is set).
59
60- Compressed archives of the source files used to build the host tools
61 and the target packages in ``recipes/recipe-packagename.tar.zst``
62 (when :term:`SPDX_ARCHIVE_SOURCES` is set). Those are needed to fulfill
63 "source code access" license requirements.
64
65See the `tools page <https://spdx.dev/resources/tools/>`__ on the :term:`SPDX`
66project website for a list of tools to consume and transform the :term:`SPDX`
67data generated by the OpenEmbedded build system.
68