Skip to content

Commit eea4af5

Browse files
committed
[GR-62929] Update docs: embed SBOM by default
1 parent 6599406 commit eea4af5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

docs/reference-manual/native-image/BuildOutput.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,10 @@ If not included, the attack surface of the executable is reduced as the executab
264264
#### <a name="glossary-sbom"></a><a name="glossary-embedded-sbom"></a>Software Bill of Material (SBOM)
265265
This section indicates whether a SBOM was assembled and in what ways it was stored.
266266
The storage formats include: `embed`, which embeds the SBOM in the binary; `classpath`, which saves the SBOM to the classpath; and `export`, which includes the SBOM as a JSON build artifact.
267-
Use `--enable-sbom` to activate this feature which defaults to the `embed` option.
267+
The SBOM feature is enabled by default and defaults to the `embed` option.
268268
When embedded, the SBOM size is displayed.
269-
The number of components is always displayed.
269+
The number of components is always displayed.
270+
The SBOM feature can be disabled with `--enable-sbom=false`.
270271

271272
For more information, see [Software Bill of Materials](../../security/native-image.md).
272273

docs/security/SBOM.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ permalink: /security-guide/native-image/sbom/
77

88
# Software Bill of Materials (SBOM) in Native Image
99

10-
GraalVM Native Image can assemble a Software Bill of Materials (SBOM) at build time to detect any libraries that may be susceptible to known security vulnerabilities.
11-
Native Image provides the `--enable-sbom` option to embed an SBOM into a native executable (only available in Oracle GraalVM).
10+
GraalVM Native Image assembles a Software Bill of Materials (SBOM) at build time to detect any libraries that may be susceptible to known security vulnerabilities (only available in Oracle GraalVM).
11+
Pass the `--enable-sbom` option to the `native-image` command to configure the SBOM feature.
12+
The SBOM feature is enabled by default and defaults to the `embed` option which embeds an SBOM into the native executable.
1213
In addition to being embedded, the SBOM can be added to the classpath or exported as a JSON file by using `--enable-sbom=classpath,export`.
1314

1415
The CycloneDX format is supported and is the default.
15-
To embed a CycloneDX SBOM into a native executable, pass the `--enable-sbom` option to the `native-image` command.
1616

1717
The implementation constructs the SBOM by recovering all version information observable in external library manifests for classes included in a native executable.
1818
The SBOM is compressed to limit the SBOM's impact on the native executable size.
19+
The compressed size is typically less than 1/10,000 of the overall image size.
1920
The SBOM is stored in the `gzip` format with the exported `sbom` symbol referencing its start address and the `sbom_length` symbol referencing its size.
2021

22+
The SBOM feature can be disabled with `--enable-sbom=false`.
23+
2124
After embedding the compressed SBOM into the executable, the [Native Image Inspect Tool](../reference-manual/native-image/InspectTool.md) is able to extract the compressed SBOM using the `--sbom` parameter accessible through `$JAVA_HOME/bin/native-image-inspect --sbom <path_to_binary>` from both executables and shared libraries.
2225
It outputs the SBOM in the following format:
2326

0 commit comments

Comments
 (0)