]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ukify: show .sbom sections as text 29996/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 13 Nov 2023 09:41:52 +0000 (10:41 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 13 Nov 2023 09:59:30 +0000 (10:59 +0100)
There are draft proposals to embed SBOM metadata in the .sbom section of PE
binaries [1], in the coSWID XML format. Some details of how this is actually
implemented might change, but it seems very likely that both section name and
it being text will stay. Let's show the section as text to make such binaries
easier to inspect. ([1] recommends using 'objcopy -j .sbom' which isn't
particularly readable.)  Once there's more standarization of the actual
format, we can add pretty-printing and/or syntax highlighting.

[1] https://uefi.org/blog/firmware-sbom-proposal
[2] https://www.ietf.org/archive/id/draft-ietf-sacm-coswid-21.html

src/ukify/ukify.py

index 8006624f0a15e18631ea6dd83d3d1d3952636336..2ab9c5894ce4fd6a2d5dc413f6f43fd1d2c38c5e 100755 (executable)
@@ -265,6 +265,7 @@ DEFAULT_SECTIONS_TO_SHOW = {
         '.pcrpkey'  : 'text',
         '.pcrsig'   : 'text',
         '.sbat'     : 'text',
+        '.sbom'     : 'text',
 }
 
 @dataclasses.dataclass