Good news everyone,
You can now generate a Software Bill of Materials (SBOM) for your MicroEJ Applications!
Thanks to two recently announced releases, the SBOM now includes every module that your Application gets from the Central Repository, including legacy SDK 5 modules:
- MicroEJ SDK 6 1.8.0 adds a Maven descriptor to SDK 5 modules when it builds a Module Repository. SBOM tools for Gradle need this descriptor to list a module.
- The Central Repository is built with SDK 6 1.8.0, so its SDK 5 modules now have Maven descriptors.
The SBOM lists the Managed Code embedded in your Executable: your Application dependencies and the VEE Port components. You can generate it in the two standard formats, SPDX and CycloneDX, with the usual Gradle plugins.
SPDX in Practice
The setup only consists of applying the SPDX plugin and declaring a target on the microejSbomClasspath configuration:
plugins {
id("com.microej.gradle.application") version "1.8.0"
id("org.spdx.sbom") version "0.12.0"
}
spdxSbom {
targets {
create("release") {
configurations.set(listOf("microejSbomClasspath"))
document {
name.set("My Product SBOM")
namespace.set("https://my.company.org/spdx/")
creator.set("Organization: My Company")
packageSupplier.set("Organization: My Company")
}
}
}
}
Then generate the SBOM with:
./gradlew spdxSbom
The plugin writes SPDX 2.3 directly. SPDX 3.0.1 is available through a conversion with the SPDX Java Tools.
Learn more: Generate the SBOM — MicroEJ Documentation
Happy coding!
The MicroEJ Team.