Skip to content

[native-image-utils] Add extract embedded SBOM tool #13374

@jerboaa

Description

@jerboaa

Feature request

The GraalVM docs describe a tool for extracting embedded SBOMs from a built native image. Namely:

native-image-utils extract-sbom --image-path=/path/to/image

Unfortunately, the tool doesn't seem to be part of GraalVM CE and we'd like to contribute such a tool.

Is your feature request related to a problem? Please describe.

Oracle GraalVM supports the --enable-sbom option and embeds an SBOM in the produce native image in the binary. A similar feature is being discussed to get added to Mandrel 25 (embed an SBOM in native image that Quarkus generated). Provided somebody was able to generate a native image with an SBOM embedded it's hard to extract it from the binary. Having such a tool available would be helpful.

Describe the solution you'd like.

Add a tool, part of GraalVM, that works as described by the GraalVM docs to extract an gzip-compressed SBOM using the sbom and sbom_length symbols in an native image.

Describe who do you think will benefit the most.

All native-image users who care about what ended up in a native image binary (by the app dependencies).

Describe alternatives you've considered.

Use Oracle GraalVM, but that's not open source unfortunately. An alternative would be to open-source the Oracle GraalVM tool.

Aditional Context
An initial implementation should at least support Linux.

Express whether you'd like to help contributing this feature
We have a prototype of this for Linux (using libelf) and would be willing to contribute it. The tool could be optionally built (depending on the downstream distributor).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions