You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A script to generate an SPDX-format Software Bill of Materials (SBOM) for the linux kernel build.
9
-
The eventual goal is to integrate the `sbom/` directory into the `linux/scripts/` directory in the official [linux](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git) source tree.
9
+
The eventual goal is to integrate the `sbom/` directory into the `linux/tools/` directory in the official [linux](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git) source tree.
10
10
11
11
## How to use
12
12
1. Provide a linux source and object tree, e.g., by downloading precompiled test data from [KernelSbom-TestData](https://fileshare.tngtech.com/d/e69946da808b41f88047/files)
@@ -36,7 +36,8 @@ The eventual goal is to integrate the `sbom/` directory into the `linux/scripts/
36
36
--roots arch/x86/boot/bzImage \
37
37
--generate-spdx \
38
38
--generate-used-files \
39
-
--prettify-json
39
+
--prettify-json \
40
+
--debug
40
41
```
41
42
42
43
Starting from the provided root artifact (`bzImage`), the script constructs a **cmd graph**: a directed acyclic graph whose nodes are filenames and whose edges represent build dependencies extracted from the corresponding `.<filename>.cmd` files.
@@ -70,6 +71,22 @@ python3 sbom/sbom.py \
70
71
--prettify-json
71
72
```
72
73
74
+
### Reproducibility
75
+
By default, SPDX documents are non-deterministic. The spdxIds are generated using random UUIDs, and the `CreationInfo.created` field is set to the current datetime. To produce deterministic outputs, the options `--spdxId-uuid` and `--created` must be provided:
The following diagrams illustrate the structure of the generated SPDX documents: `sbom-source.spdx.json`, `sbom-build.spdx.json`, and `sbom-output.spdx.json`.
- [sbom_analysis/cmd_graph_visualization/](sbom_analysis/cmd_graph_visualization/README.md) - Interactive visualization of the cmd graph
277
294
- `testdata_generation/` - Describes how the precompiled kernel builds in [KernelSbom-TestData](https://fileshare.tngtech.com/library/98e7e6f8-bffe-4a55-a8d2-817d4f3e51e8/KernelSbom-TestData/) were generated.
278
295
279
-
The main contribution of this repository is the content of the `sbom` directory which eventually should be moved into the `linux/scripts/` directory in the official [linux](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git) source tree.
296
+
The main contribution of this repository is the content of the `sbom` directory which eventually should be moved into the `linux/tools/` directory in the official [linux](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git) source tree.
0 commit comments