Supported ecosystems
A hands-on guide using the per-language example projects under examples/. Run each example to see the SBOM output right away.
How BomLens runs each ecosystem’s build tool, and how it narrows the result to what ships, is explained in How dependencies are resolved.
Example directory structure
Section titled “Example directory structure”examples/├── java-maven/ # Java + Maven├── java-gradle/ # Java + Gradle├── nodejs/ # Node.js + npm├── python/ # Python + pip / Poetry├── go/ # Go modules├── ruby/ # Ruby + Bundler├── php/ # PHP + Composer├── rust/ # Rust + Cargo├── dotnet/ # .NET + NuGet├── swift/ # Swift + SPM (Swift Package Manager)├── modelica/ # Modelica (.mo) uses() declarations└── docker/ # Docker image analysisCommon run steps
Section titled “Common run steps”Every source-code example runs the same way from the repository root: point --target at the example folder and pick a project name. The results are saved in a {Project}_{Version}/ subfolder. For the Node.js example:
# 1. Generate the SBOM (from the repository root)./scripts/scan-sbom.sh --project "NodeExample" --version "1.0.0" --target examples/nodejs --generate-only
# 2. Check the resultjq '.components | length' NodeExample_1.0.0/NodeExample_1.0.0_bom.jsonBy default a source scan leaves out the manifests under test, fixture, example, benchmark and demo folders (test, tests, spec, fixtures, testdata, __tests__, e2e, example, examples, sample, samples, bench, benches, benchmark, benchmarks, demo, demos, playground), the GitHub Actions workflows in .github/workflows and the Gradle wrapper in gradle/wrapper (its gradle-wrapper.jar), because none of them ship with the product. The SBOM records the patterns in the bomlens:excluded-paths property and the files it left out in bomlens:excluded-manifests. To include them, set BOMLENS_INCLUDE_NON_SHIPPED=1 (Docker image environment variables).
A source scan also drops the development-only components that cdxgen marks: npm, pnpm, yarn and bun development packages, uv and Poetry dependency groups other than main, Cargo dev-dependencies, and sbt, Crystal and Gleam development dependencies. For Ruby, BomLens reads the Gemfile groups itself (see Ruby). When cdxgen gives a component the same marker more than once, the component counts as development-only only if every value is a development one. A marked component, and a dependency that only marked components reach, is dropped only when nothing else in the dependency graph reaches it: every unmarked component keeps what it depends on, including a component the root does not reach, and a workspace member keeps its own dependencies, so the dev-dependencies of a Cargo workspace member crate and the dependency groups of a uv workspace member stay. npm development packages are the exception: cdxgen 13.5.0 sets that marker over the whole workspace, so a package that carries it is one no member’s production dependencies reach, and it is dropped even when a member lists it. The SBOM records the dropped components in the bomlens:excluded-components property. To keep them, set BOMLENS_INCLUDE_DEV_DEPENDENCIES=1 (Docker image environment variables). The language sections below say what this means for each ecosystem.
For npm, Python (pip), Go and Rust (Cargo) packages, a source scan also fills each component’s copyright from the license files the installed package ships (LICENSE, LICENCE, COPYING, NOTICE, COPYRIGHT), so the NOTICE can print an attribution line. Only a line that begins with Copyright followed directly by (c), the copyright sign, a year or by (or with (c) or the sign followed by a year), and that names a holder, is used. A notice with no year, such as Copyright Acme, Inc., is not taken. Lines come from the package’s own folder only (its .dist-info folder for Python; for Go the folder go list reports, which is the module cache, the replacement’s folder for a replaced module, or vendor/; for Rust the folder cargo metadata reports, which is the cargo registry, a git checkout or a path dependency), at most 6 files, the first 64 KiB and 400 lines of each, and at most 5 statements per component, joined with ; . Lines that are an unfilled template (<year>, [fullname]) or the text of a license itself (for example the Free Software Foundation’s own line in a GNU license) are skipped, and so are files that link outside the package. A component that already has a copyright is not changed, a package with no such line stays empty, and each value set carries the property bomlens:copyrightSource. Set BOMLENS_NO_COPYRIGHT=1 to turn this off. Java (Maven) is not covered: Maven downloads jar files rather than source folders, so the license files of a dependency are not on disk to read. A replaced Go module carries the statement of the code that is actually built, which can be a different version from the one the component names. The scanned project’s own Go module and Rust workspace crates are not filled. The Rust step reads the crate sources that are already on disk and never goes to the network for them, so with FETCH_LICENSE=false or --byte-stable a crate that was not downloaded stays empty. A Go or Rust component whose folder is not on disk, for example because the download failed, stays empty. When no folder of an ecosystem could be listed at all, the SBOM records it in the bomlens:copyrightUnread metadata property (golang, cargo), so that a missing copyright can be told from a step that did not run.
The sections below give the ready-to-paste command for each language.
Java (Maven)
Section titled “Java (Maven)”./scripts/scan-sbom.sh --project "JavaMavenExample" --version "1.0.0" --target examples/java-maven --generate-onlyDetected file: pom.xml
<!-- example pom.xml --><dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>3.2.0</version> </dependency></dependencies>Note: cdxgen resolves the whole build graph, so BomLens filters the SBOM to the deployable set — compile and runtime scope — and drops the test and provided toolchain (JUnit, Lombok, and the like) so the result reflects what ships rather than the full build. To keep the complete resolved graph instead, set
BOMLENS_MAVEN_FULL_GRAPH=1(Docker image environment variables). A runtime dependency declared with<optional>true</optional>is dropped as well, because cdxgen gives it the same tag as a test-scope one. A multi-module reactor can carry modules that never get deployed alongside the ones that do: a demo, or a module the project itself excludes frommvn deploy(maven-deploy-plugin’sskipresolving totrue, however it is set). Such a module’s own component is left out. A dependency only that module needs is left out too, but only when no deployed module in the same reactor declares it at any scope (a deployed module’s ownprovidedortestdeclaration of it, not just acompile/runtimeone, is enough to keep it, since the SBOM’s dependency graph does not record which scope each edge represents).BOMLENS_MAVEN_FULL_GRAPH=1keeps everything this leaves out. The excluded modules and the components dropped because of them are recorded on the SBOM asbomlens:excluded-modulesandbomlens:excluded-components.
Note: cdxgen reads a Maven component’s license from its own
pom.xmlonly, so one that declares no<licenses>and relies on Maven’s own inheritance from a parent POM comes through with none. BomLens now walks that parent chain itself (the reactor’s own modules, then the local repository for a parent outside it) and fills the license from the first ancestor that declares one, leaving the component untouched if none do or if it already carries a license. The filled component is recorded with abomlens:licenseSourceproperty set toparent POM.
Note: dependency and license resolution need the container to reach Maven Central, or your mirror. When it cannot, the result holds only the dependencies written in
pom.xml, with no transitive dependencies and no licenses, and the scan finishes without a warning. The test, provided, system and<optional>true</optional>ones among them are left out, as in a full resolution;BOMLENS_MAVEN_FULL_GRAPH=1keeps them. If the component count is far below what you expect, check network access first.
Note: Maven 3.10 and later refuse a
pom.xmlthat declares the same dependency twice ('dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique, or the same fordependencyManagement), where Maven 3.9 only warns, and the cdxgen images ship Maven 3.10. A project with a Maven wrapper (mvnwand.mvn/wrapper/) is always read with that wrapper, so a wrapper that names a Maven before 3.10 accepts the POM. When BomLens still sees this error before cdxgen runs, it retries with Apache Maven 3.9.16. That Maven is fetched through the image’s Maven, so the mirror, proxy and offline settings of yoursettings.xmlapply, or from Maven Central when that fails and Maven is not offline. The archive is used only when it matches the SHA-512 checksum built into BomLens. cdxgen then builds the dependency tree with it. A project whose ownmvnwruns Maven 3.10 or later is an exception when the tree also holds a Gradle build: cdxgen would then have to skip the Gradle wrappers as well to use Maven 3.9.16, so BomLens leaves the wrappers alone, prints a warning and records the step as failed. When no Maven reads the POM, the result holds only the dependencies written inpom.xml(without the test, provided, system and optional ones), the failed stepmaven-dependency-treeis recorded, andgeneratereadsdegraded. Removing the repeated<dependency>entries fixes this for every Maven version.
Java (Gradle)
Section titled “Java (Gradle)”./scripts/scan-sbom.sh --project "JavaGradleExample" --version "1.0.0" --target examples/java-gradle --generate-onlyDetected file: build.gradle or build.gradle.kts
Note: as with Maven, resolution needs the container to reach Maven Central, or your mirror. When it cannot, the result can hold only the direct dependencies, with no licenses. If the component count is far below what you expect, check network access first.
Note: the SBOM lists what the
runtimeClasspathof each project resolves, so a dependency only on the compile classpath (compileOnly,annotationProcessor, or a library’s compile-only annotations such as Guava’sj2objc-annotations) or only on a test classpath (JUnit, Mockito) is left out. The full graph stays when the build includes other builds for their code (includeBuild; a build included only throughpluginManagementdoes not count), when a runtime classpath cannot be resolved, or when the Gradle run fails;BOMLENS_GRADLE_FULL_GRAPH=1keeps it (Docker image environment variables). The limits are in Keeping only what ships.
Note: cdxgen is pointed at the Gradle cache of the scan (
GRADLE_CACHE_DIR), which the CLI keeps between scans. A component whose jar is already in it gets MD5, SHA-1, SHA-256 and SHA-512 hashes, and its license is read from the POMs there when Maven Central cannot be reached. A component whose files are not in the cache has neither, so hashes and licenses vary with the cache’s content, as they do for Maven. Hashing took about 0.16 s per jar on a loaded machine (60 s for 369 jars, 354 MB).
Each cdxgen Java image has one JDK, and two things in a Gradle build decide which one it needs. A toolchain asks for that exact JDK version. A Gradle wrapper (gradlew with gradle/wrapper/gradle-wrapper.properties) runs only on the JDKs its Gradle version supports; a 6.9.4 wrapper, for example, fails on Java 21 with “Unsupported class file major version 65”. The scan reads both:
- the toolchain from
JavaLanguageVersion.of(N)(aslanguageVersion = ...orlanguageVersion.set(...)) or KotlinjvmToolchain(N), in the*.gradleand*.gradle.ktsfiles of the scanned folder and up to five folders below it,buildSrcand convention plugins included. The highest version counts. The argument can also be a variable defined in the same file, optionally converted with.toInteger(),.toInt(),.toString()oras int. Its value is the Gradle property it reads (hasProperty,getProperty,findProperty,property,providers.gradleProperty("p"),properties["p"], or Kotlinval p: String by project) from the nearestgradle.properties, else the default it gives (after?:or the ternary’s:, or ingetOrElse("N")), else the number it is set to. Only regulargradle.propertiesfiles are read, and a definition outside any block counts before one inside a block. - the wrapper’s Gradle version from the file name at the end of
distributionUrl, in Gradle’s own formgradle-X.Y[.Z]-bin.zipor-all.zip(a milestone, release candidate or snapshot counts as its release). A wrapper counts only wheregradlewsits beside it; without one the image’s own Gradle 8.14.5 runs. Which wrappers count depends on the scanned folder:- with
gradlew, its own wrapper alone. When its version cannot be read (a custom file name, for example), the scan says so in an[INFO]line and chooses by the toolchain alone. - with a Gradle settings or build file and no
gradlew, none: the image’s Gradle runs there, once. - with neither, the wrapper of every build below it that has
gradlewbeside a settings or build file, up to five folders down.buildSrc,build-logic, dot folders and the builds another build names inincludeBuild(...)are skipped. The image must run every one of them; when no image does, the scan picks for the lowest version and says so in a[WARN]line.
- with
Comments and the non-shipped folders listed above are skipped (BOMLENS_INCLUDE_NON_SHIPPED=1 reads those folders too). The images and the Gradle versions that run on their JDK, from Gradle’s compatibility matrix:
| Image | JDK | Wrapper versions that run on it |
|---|---|---|
cdxgen-temurin-java8 |
8 | below 9.0 |
cdxgen-java11 |
11 | 5.0 to 8.14.x |
cdxgen-java17 |
17 | 7.3 and later |
cdxgen-temurin-java21 |
21 | 8.5 and later |
cdxgen-temurin-java24 |
24 | 8.14 and later |
cdxgen-temurin-java25 |
25 | 9.1.0 and later |
The scan takes the toolchain’s image when the wrapper runs on it. Otherwise it takes cdxgen-temurin-java21 when the wrapper runs on Java 21, and the newest image the wrapper runs on when it does not (Java 17 for a 7.3 to 8.4 wrapper, 11 for 5.0 to 7.2, 8 below 5.0). With no toolchain and no wrapper it stays on cdxgen-temurin-java21. A choice other than Java 21 prints an [INFO] line that says why.
A [WARN] says when the build cannot get what it asks for: a toolchain no image has (22, 23, 26 and so on), or one the wrapper cannot run on (a Java 25 toolchain with an 8.14 wrapper). Gradle then cannot find the toolchain’s JDK, and dependency resolution can fail unless the build configures toolchain auto-provisioning. A mixed-language tree runs in the all-in-one image whatever the toolchain, and warns the same way for a toolchain other than 21. A version from a version catalog, from a variable of another file or from a longer expression is not read. When Gradle then fails because no JDK matches the toolchain, and an image has that JDK and runs the wrapper, the dependency step runs once more in that image ([INFO] Gradle asked for Java N; rerunning in <image>). An image that is not here is pulled with its progress shown, and SBOM_PULL=always pulls it first. If that run leaves no SBOM, the first result is kept. There is no rerun when CDXGEN_JAVA_IMAGE is set, or when the image is not here and cannot be pulled (SBOM_PULL=never does not pull). The execution plan (MODE=PLAN) does not rerun. When the build still cannot get its JDK, set CDXGEN_JAVA_IMAGE to an image that has the JDK (CLI reference). Maven needs no such choice: maven.compiler.release and the toolchains plugin apply when the build compiles, and dependency resolution runs without them.
Android
Section titled “Android”Detected when the project has a Gradle root (settings.gradle[.kts] or build.gradle[.kts] at the root) and shows a sign of the Android Gradle plugin: the plugin id in the version catalog (gradle/libs.versions.toml), the plugin id or a catalog alias in a build script (root or app/), a Kotlin DSL namespace declaration, or an AndroidManifest.xml a few levels down. A manifest with no Gradle root does not count on its own, which also keeps a .NET MAUI app’s Platforms/Android/AndroidManifest.xml from being misread as an Android project.
Android needs an SDK platform image BomLens does not publish: the Android SDK it contains is not open source, and Google’s terms do not allow redistributing it, so the image is built locally instead. The project’s compileSdk/compileSdkVersion picks the API level (34 if none is found); the scan then looks for bomlens-android-sdk<API>:latest, and if it is missing, prints the build command instead of failing on a missing image:
docker build --build-arg ANDROID_API=<API> -t bomlens-android-sdk<API> docker/androidBuilding it means accepting Google’s SDK terms yourself. Set ANDROID_IMAGE_PREFIX to use an image built elsewhere.
Note: images published under
ghcr.io/sktelecom/bomlens-android-sdk<API>up to v1.9.0 still work for scans on that release line, but nothing new is pushed to them; a current scan needs a locally built image.
Node.js
Section titled “Node.js”./scripts/scan-sbom.sh --project "NodeExample" --version "1.0.0" --target examples/nodejs --generate-onlyDetected file: package.json + package-lock.json (or yarn.lock, pnpm-lock.yaml)
Note: a lock file pins the exact installed versions. Dependencies are still captured from
package.jsonwithout one, but committing a lock file makes the result reproducible.
Note: the SBOM is filtered to the production dependency set, so devDependencies are dropped and the result reflects what ships. To keep the full dev-plus-production graph instead, set
BOMLENS_NODE_FULL_GRAPH=1(Docker image environment variables).
Note: an npm workspace member registered in
package-lock.jsonsurvives the file-level exclusion above even when its own directory sits under an excluded tree, because cdxgen readspackage-lock.jsondirectly. Such a member’s own component is left out too, along with a dependency only that member needs, unless a kept member reaches it as well.BOMLENS_INCLUDE_NON_SHIPPED=1(the same switch as the file-level exclusion above) keeps everything this leaves out. The excluded members and the components dropped because of them are recorded on the SBOM asbomlens:excluded-membersandbomlens:excluded-components. A yarn workspace member is not caught the same way yet.
Note: on top of the production filter, a component cdxgen marks as a development package (npm, pnpm, yarn or bun) is dropped when no production dependency path reaches it, together with what only it reaches. This also covers a pnpm workspace, which the production filter does not read. A package a production dependency also uses stays.
BOMLENS_NODE_FULL_GRAPH=1orBOMLENS_INCLUDE_DEV_DEPENDENCIES=1keeps these too.
Python
Section titled “Python”./scripts/scan-sbom.sh --project "PythonExample" --version "1.0.0" --target examples/python --generate-onlyDetected file: requirements.txt, or pyproject.toml + poetry.lock
Note: a Poetry project without
poetry.lockis scanned from the exact pins in[tool.poetry.dependencies](requests = "2.31.0"); ranges such as^2.0and path or git entries are left out. The pins are linked from the project and come with their own dependencies; when some entries were left out, or the dependencies could not be resolved (no network), the SBOM declares its dependency graph incomplete. Pin versions with==or commit a lock file such aspoetry.lock. Without them the SBOM lists the versions available at scan time, not the ones you run. The bundled example pins its versions, and every component carries a license.
Note: with uv (
uv.lock) or Poetry, a component cdxgen places only in dependency groups other thanmain, such asdevortest, is dropped when no production dependency path reaches it, together with what only it reaches. A package the production dependencies also use stays, and so does a package that anypyproject.tomlin the project names in its[project]dependenciesoroptional-dependenciesor in[tool.poetry.dependencies], even when a dependency group lists it too. BomLens reads these files with a small reader of its own: when the scan root has nopyproject.toml, or a file uses a form the reader does not follow (for exampledynamic = ["dependencies"]), no Python package is dropped and the build log says so. The same happens when arequirements*.txt,setup.py,setup.cfgorPipfileis in the project outsidevendorand the folders a source scan leaves out by default (see above), since it may declare production dependencies the reader does not see. The search goes 8 folders deep and skipsvendor,node_modules,.gitand virtual environments (.venv,venv); a deeper folder outside those and the non-shipped folders also means no Python package is dropped.
./scripts/scan-sbom.sh --project "GoExample" --version "1.0.0" --target examples/go --generate-onlyDetected file: go.mod + go.sum
Note:
go.sumis required for accurate version hashes. Rungo mod tidyfirst, then try again.
./scripts/scan-sbom.sh --project "RubyExample" --version "1.0.0" --target examples/ruby --generate-onlyDetected file: Gemfile.lock
Note: with no
Gemfile.lockcommitted, BomLens runsbundle lockbefore scanning. Commit the lock file so the SBOM matches what you deploy.
Note: cdxgen does not mark Bundler groups, so BomLens reads the
Gemfileat the scan root itself. A gem declared only in thedevelopmentandtestgroups (in agroup ... doblock or with agroup:orgroups:option) is dropped, along with what only those gems need, unless a production gem also needs it. TheGemfileis read conservatively: a condition,gemspec,eval_gemfile, a declaration over several lines or any other line the reader does not recognise, or aGemfile.lockthat names a gem theGemfiledoes not, leaves every gem in place, and the log saysGemfile groups not read. So does anotherGemfileorGemfile.lockbelow the scan root, or a.gemspecfile anywhere in the project, since it may declare the same gems for production. That search goes 8 folders deep and skipsvendor(with the installed gems invendor/bundle),node_modules,.git,.venvandvenv; a deeper folder outside those also leaves every gem in place.
./scripts/scan-sbom.sh --project "PHPExample" --version "1.0.0" --target examples/php --generate-onlyDetected file: composer.lock
Note: with no
composer.lockcommitted, BomLens resolves one itself (composer update --no-dev, on a copy ofcomposer.jsonwithoutrequire-devandconfig.lock, with platform requirements ignored) before scanning, the same as it does for Ruby’sGemfile.lock. Yourcomposer.jsonis put back afterwards. A dependency version that needs a newer PHP than the project declares can be picked, because the PHP version is not enforced. cdxgen already tags each composer component with its resolved scope (requirebecomes required,require-devbecomes optional), so BomLens filters the SBOM to the required set, the same way it does for Maven. To keep the full require-plus-require-dev graph instead, setBOMLENS_PHP_FULL_GRAPH=1(Docker image environment variables).
./scripts/scan-sbom.sh --project "RustExample" --version "1.0.0" --target examples/rust --generate-onlyDetected file: Cargo.lock
Note: cdxgen reads only
Cargo.lock, which carries no licenses, so BomLens fills them fromcargo metadata, which reads each crate’s own manifest (your own workspace crates included). The container needs a route to the crate registry (crates.io or your mirror) for this. Without one, the SBOM records a license for almost no Cargo packages and the notice file built from the scan is nearly empty. The scan then records the stepcargo-license-metadataas failed on the SBOM, which the result screen and the conformance check report show, and the log sayscould not read crate licenses. A crate that declares its license only as a file (license-file) stays without one. Alternatives such asMIT OR Apache-2.0are written in a fixed order, so the same pair is one entry in the notice however a crate spells it, and a value that is not an SPDX expression is kept as a plain license name. The bundled example lists 147 libraries and 146 of them carry a license.BOMLENS_NO_CARGO_LICENSE=1turns this off, and so doesFETCH_LICENSE=falseon the command line.--deep-licensedoes not help here: it scans your own source files, not the dependencies, and writes a separate report.
Note: a Cargo workspace member registered in
Cargo.locksurvives the file-level exclusion above even when its own directory sits under an excluded tree, because cdxgen readsCargo.lockdirectly. Such a member’s own component is left out too, along with a dependency only that member needs, unless a kept member reaches it as well (any way at all).BOMLENS_INCLUDE_NON_SHIPPED=1(the same switch as the file-level exclusion above) keeps everything this leaves out. The excluded members and the components dropped because of them are recorded on the SBOM asbomlens:excluded-membersandbomlens:excluded-components.
Note: a crate cdxgen marks only as a dev-dependency (
[dev-dependencies]) is dropped when no production dependency path reaches it, together with what only it reaches. A crate the production dependencies also use stays, and so does one listed in both[dependencies]and[dev-dependencies]. cdxgen sets this marker with or without a committedCargo.lock, since BomLens resolves one when it is missing. In a workspace, the dev-dependencies of a member crate stay, because what a member depends on is kept whatever its marker; only the dev-dependencies of the root package can be dropped.
./scripts/scan-sbom.sh --project "DotNetExample" --version "1.0.0" --target examples/dotnet --generate-onlyDetected files: *.csproj, *.fsproj, *.sln or *.slnx, at the root or in folders up to three levels below it. packages.lock.json is read when present
Note: detection needs a project or solution file.
packages.lock.jsonis not required, but committing one (dotnet restore --use-lock-file) pins the resolved versions so the SBOM is reproducible.
Swift / iOS
Section titled “Swift / iOS”./scripts/scan-sbom.sh --project "SwiftExample" --version "1.0.0" --target examples/swift --generate-onlyDetected files: Package.swift (+ Package.resolved) for Swift Package Manager, or Podfile.lock for CocoaPods.
Dependencies are read from the committed lockfiles, so include them in the scan:
- Swift Package Manager:
Package.resolved(runswift package resolvefirst if it is missing). - CocoaPods:
Podfile.lock(produced bypod install). BomLens parses it directly, so the scanning machine needs neither macOS nor a CocoaPods install.
Note: UIKit and other Xcode-driven platform dependencies require macOS and are not resolved in the Linux scanner.
Note: the bundled example lists 6 components, of which 5 carry a PURL (83%) and 2 a license (33%). Both are below the default thresholds of the conformance checks: the PURL check fails and the license check warns. The two resolved packages (
swift-argument-parser,swift-log) have a PURL and a license. The rest are the package itself and the platform modules it imports (Foundation,XCTest,dispatch), which have no license to declare. BomLens drops the versionless duplicates of a resolved package that the import scan adds, so a package is counted once.
Modelica
Section titled “Modelica”./scripts/scan-sbom.sh --project "ModelicaExample" --version "1.0.0" --target examples/modelica --generate-onlyDetected files: *.mo
cdxgen has no Modelica cataloger, so the usual package-manager approach reads no dependencies. Instead, BomLens parses the annotation(uses(...)) block a .mo package declares directly, picking up each library named there together with its version. A uses() declaration carries only a name and a version, so a license comes from BomLens’s own table of known libraries (docker/lib/modelica-library-map.json), not from your project. The table records the license read from each library’s upstream license file (Modelica Standard Library 3.2.3 and later: BSD-3-Clause; Buildings 13.0.0 and later: BSD-3-Clause-LBNL). Both libraries in the bundled example get a license this way (2 of 2), recorded with the property bomlens:licenseSource = modelica-library-map. A library outside the table, or a version older than the recorded one, has no license.
annotation(uses(Modelica(version="4.0.0"), Buildings(version="13.0.0")));Note: only the libraries declared directly in
uses()are identified. Modelica has no lockfile, so transitive dependencies are not resolved, and the model’s own internal structure (its components, parameters, connections) is not open-source dependency data, so it is left out.
./scripts/scan-sbom.sh --project "CondaExample" --version "1.0.0" --target . --generate-onlyDetected files: environment.yml or environment.yaml at the root of the scanned folder.
cdxgen has no Conda cataloger, so BomLens reads the dependencies: list of the environment file itself. Each conda entry becomes a pkg:conda/... component, and each entry under a pip: item becomes a pkg:pypi/... component.
dependencies: - python=3.11 - numpy=1.26.4 - pip: - requests==2.31.0When the file is read successfully, BomLens turns off cdxgen’s Python step for that scan. Otherwise a setup.py or requirements.txt elsewhere in the tree would replace the environment file as the source of truth.
Note: only the two-level layout shown above is recognized, with
dependencies:at the left edge, entries indented by two spaces andpip:items by four. A file that uses another layout (a different indent width, a flow-style list, a tab) is not partly read. It is skipped as a whole and cdxgen’s Python step runs as before. An entry with no version or only a range such as>=1.0does not name a version, so it is recorded without a version or PURL and carries the propertybomlens:versionUnpinned. Editable and VCS installs underpip:are left out.
Docker image analysis
Section titled “Docker image analysis”Run Docker image analysis from the project root.
# Analyze a public image./scripts/scan-sbom.sh \ --project "NginxSBOM" \ --version "1.25" \ --target "nginx:1.25-alpine" \ --generate-only
# Ubuntu-based image./scripts/scan-sbom.sh \ --project "UbuntuSBOM" \ --version "22.04" \ --target "ubuntu:22.04" \ --generate-onlyNote:
--targettakes an image name or an image tar here. Pointing it at theexamples/dockerfolder, which holds no dependency manifest, finds no components.
Files required for detection
Section titled “Files required for detection”If source analysis finds no dependencies, check for the lock file below.
| Language | Required file |
|---|---|
| Java (Maven) | pom.xml |
| Java (Gradle) | build.gradle or build.gradle.kts |
| Node.js | package.json + package-lock.json or yarn.lock |
| Python | requirements.txt or pyproject.toml + poetry.lock |
| Go | go.mod + go.sum |
| Conda | environment.yml or environment.yaml (root folder) |
| Rust | Cargo.lock |
| Ruby | Gemfile.lock |
| PHP | composer.lock |
| .NET | *.csproj, *.fsproj, *.sln or *.slnx (root or up to three folders down); packages.lock.json is optional |
| Swift | Package.swift (+ Package.resolved) or Podfile.lock |
| Modelica | a .mo file with an annotation(uses(...)) block |
| Android | a Gradle root (settings.gradle[.kts] or build.gradle[.kts]) plus a sign of the Android Gradle plugin, see Android |
| Docker image | no file: pass an image name or an image tar as --target |
Results on the bundled examples
Section titled “Results on the bundled examples”The bundled examples were scanned on 2026-09-21 with BomLens 1.12.0 and the source-scan changes made after it. The table counts software components only. The Copyright column is the share of components whose copyright is filled (see above); Ruby, PHP, .NET, Swift and Modelica are not covered. The default conformance thresholds are 90% for PURL and 80% for license.
| Example | Components | PURL | License | Copyright |
|---|---|---|---|---|
| Node.js | 120 | 100% | 100% | 95% |
| Python | 39 | 100% | 100% | 82% |
| Go | 19 | 100% | 100% | 94% |
| Ruby | 9 | 100% | 100% | 0% |
| PHP | 16 | 100% | 100% | 0% |
| .NET | 70 | 100% | 98% | 0% |
| Rust | 157 | 100% | 99% | 83% |
| Swift | 6 | 83% | 33% | 0% |
| Modelica | 2 | 100% | 100% | 0% |
Java (Maven), Java (Gradle) and Docker are not in the table. The Java scans could not be measured on the network used, where Maven Central did not serve artifacts (see the notes above). The Docker example is an image-scan example and finds nothing when scanned as a folder. These are results on small example projects, not a forecast for yours: a real project’s coverage depends on its own dependencies.
Comparing results
Section titled “Comparing results”The PURL (Package URL) format in the generated SBOM differs by language.
| Language | PURL example |
|---|---|
| Java | pkg:maven/org.springframework.boot/spring-boot@3.2.0 |
| Node.js | pkg:npm/express@4.18.2 |
| Python | pkg:pypi/requests@2.31.0 |
| Go | pkg:golang/github.com/gin-gonic/gin@v1.9.1 |
| Rust | pkg:cargo/serde@1.0.193 |
| Ruby | pkg:gem/rails@7.1.2 |
| PHP | pkg:composer/laravel/laravel@10.3.3 |
| .NET | pkg:nuget/Newtonsoft.Json@13.0.3 |
| Swift | pkg:swift/github.com/apple/swift-log@1.5.0 |
| Docker (OS packages) | pkg:deb/debian/curl@7.88.1 |
Troubleshooting
Section titled “Troubleshooting”If you run into trouble running an example, see the troubleshooting section of the CLI reference.
Related: First scan | CLI reference
OWASP BomLens, an OWASP Incubator Project ·Contributing
Copyright © 2026 SK Telecom Co., Ltd. ·Apache-2.0 ·Third-party licenses