]> git.ipfire.org Git - thirdparty/linux.git/commit
scripts/sbom: add JSON-LD serialization
authorLuis Augenstein <luis.augenstein@tngtech.com>
Mon, 18 May 2026 06:20:55 +0000 (08:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 May 2026 11:14:41 +0000 (13:14 +0200)
commita68a29a1cc3ae6c129acdf945964dea16c8a49dc
treef42f59c81770b158ef2d7a728aea47337384cb2f
parent06f4e57165caf3012876b211cb687ba802188aff
scripts/sbom: add JSON-LD serialization

Add infrastructure to serialize an SPDX graph as a JSON-LD
document. NamespaceMaps in the SPDX document are converted
to custom prefixes in the @context field of the JSON-LD output.

The SBOM tool uses NamespaceMaps solely to shorten SPDX IDs,
avoiding repetition of full namespace URIs by using short prefixes.

Assisted-by: Cursor:claude-sonnet-4-5
Assisted-by: OpenCode:GLM-4-7
Co-developed-by: Maximilian Huber <maximilian.huber@tngtech.com>
Signed-off-by: Maximilian Huber <maximilian.huber@tngtech.com>
Signed-off-by: Luis Augenstein <luis.augenstein@tngtech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Makefile
scripts/sbom/sbom.py
scripts/sbom/sbom/config.py
scripts/sbom/sbom/spdx_graph/__init__.py [new file with mode: 0644]
scripts/sbom/sbom/spdx_graph/build_spdx_graphs.py [new file with mode: 0644]
scripts/sbom/sbom/spdx_graph/spdx_graph_model.py [new file with mode: 0644]