[Open Source] A CLI tool for generating software bills of materials (SBOMs) for software projects across multiple dimensions
![[Open Source] A CLI tool for generating software bills of materials (SBOMs) for software projects across multiple dimensions](https://yy123.ink/api/img/1782607398015-jmnnln.jpg)
1. Project Overview
SBOM-TOOL
SBOM-TOOL is a CLI tool that generates Software Bills of Materials (SBOM) for software projects using information from multiple dimensions, including source code repositories, code fingerprints, build environments, artifact information, artifact contents, and dependencies.
2. Open Source License
Using MulanPSL-2.0 open source protocol
3. Screenshots
4. Feature Overview
Functional characteristics
Information Collection
-
Collect source code project information, including repository URLs, version information, and more.
-
Collect and generate code fingerprints using specific algorithms.
-
Collect project build dependency environment information, including operating systems, kernels, compilers, build tools, and more.
-
Collect project build dependencies, supporting dependency collection across multiple programming languages and package managers.
-
Collect final artifact package information, including package names, types, unique checksums, and more.
-
Collect artifact content information, including file names, types, unique checksums, and more.
SBOM Documents
-
Assemble standard SBOM documents based on the information collected above.
-
Standard format conversion: Supports XSPDX, SPDX, and other standards, as well as formats such as JSON.
-
Standard format validation: Supports XSPDX, SPDX, and other standards, as well as formats such as JSON.
Code Fingerprint Generation
|
Development Language |
Supported? |
|
C/C++ |
Yes |
|
Java |
Yes |
|
C# |
Yes |
|
Dart |
Yes |
|
Golang |
Yes |
|
Javascript |
Yes |
|
Objective-C |
Yes |
|
Php |
Yes |
|
Python |
Yes |
|
Ruby |
Yes |
|
Rust |
Yes |
|
Swift |
Yes |
|
Lua |
Yes |
Dependency Package Scanning
The following programming language configuration file parsing and binary package parsing capabilities are currently supported. Support for additional programming languages will be added gradually.
|
Package Type |
Package Manager |
Parsing Files |
Dependency Graph Supported |
|
maven |
Maven |
|
Yes |
|
maven |
Gradle |
|
Yes |
|
conan |
Conan |
|
Yes |
|
npm |
NPM |
|
No |
|
npm |
Yarn |
|
Yes |
|
npm |
PNPM |
|
Yes |
|
golang |
Go Module |
|
Yes |
|
golang |
Glide |
|
No |
|
golang |
GoDep |
|
No |
|
golang |
Dep |
|
No |
|
golang |
GVT |
|
No |
|
pypi |
PIP |
|
Yes |
|
pypi |
Poetry |
|
Yes |
|
conda |
Conda |
|
No |
|
composer |
Composer |
|
No |
|
cargo |
Cargo |
|
Yes |
|
carthage |
Carthage |
|
No |
|
swift |
SwiftPM |
|
No |
|
cocoapods |
Cocoapods |
|
Yes |
|
gem |
Gem |
|
Yes |
|
nuget |
NuGet |
|
Yes |
|
pub |
Pub |
|
Yes |
|
rpm |
RPM |
|
No |
|
lua |
LuaRocks |
|
No |
|
bower |
Bower |
|
No |
5. Tech Stack
Software Architecture

Download and Install
1. Download and Compile the Source Code (Requires Go 1.18 or Later)
By default, executable binaries are generated for multiple system architectures.
-
Linux X86_64:sbom-tool-linux-amd64
-
Linux arm64:sbom-tool-linux-arm64
-
Windows X86_64:sbom-tool-windows-amd64.exe
-
Windows arm64:sbom-tool-windows-arm64.exe
-
MacOS amd64: sbom-tool-darwin-amd64
-
MacOS arm64: sbom-tool-darwin-arm64
Subcommand Reference
|
Subcommand |
Function |
|
help |
Tool Help Manual |
|
artifact |
Collect software package artifact information |
|
assembly |
Assemble documents generated at each stage into an SBOM document |
|
completion |
Generate an autocompletion script for the specified shell |
|
convert |
Convert the SBOM document format |
|
env |
Generate environment information |
|
generate |
Generate an SBOM document |
|
package |
Collect package dependencies |
|
source |
Collect source code information |
|
validate |
Validate the SBOM document format |
|
info |
Retrieve tool introduction information |
|
modify |
Modify SBOM document properties |
Parameter Description
|
Parameters |
Short Option |
Description |
Usage examples |
|
--log-level |
Specify the log level, including debug, info, warn, and error |
--log-level info |
|
|
--log-path |
Specify the log path. By default, a log directory and log file are automatically generated under the user's home directory ($home/sbom-tool/sbom-tool.log). |
--log-path /tmp/sbom.log |
|
|
--quiet |
-q |
Disable console output |
--quiet -q |
|
--ignore-dirs |
Directories to ignore. Skip all dot directories. Separate entries with commas. Example: NODE_MODULES,LOGS |
--ignore-dirs log,logs |
|
|
--language |
-l |
Specify the language (currently supported: java, cpp; default: "*") |
--language java -l cpp |
|
--parallelism |
-m |
Concurrency level (default: 8) |
--parallelism 4 -m 9 |
|
--output |
-o |
Specify the path and filename for the output file. By default, it is automatically generated in the current directory. |
--output /tmp/sbom.json |
|
--src |
-s |
Specify the source code directory (defaults to the current directory) |
--src /tmp/sbomtool/src/ |
|
--path |
-p |
Specify the project root directory; in the assembly subcommand, this specifies the temporary document directory for each stage. |
--path /tmp/sbomtool/ |
|
--dist |
-d |
Specify the artifact directory (defaults to the current directory) |
--dist /tmp/sbomtool/bin/ |
|
--format |
-f |
Specify the SBOM document format (currently supported: xspdx-json, spdx-json, spdx-tagvalue; default: spdx-json) |
--format spdx-json -f spdx-json |
|
--input |
-i |
Specify the SBOM document as input |
--input /tmp/sbom.jsom |
|
--algorithm |
-a |
Specify the algorithm used to generate the SBOM document identifier (currently supported: SHA1, SHA256, SM3; default: SM3) |
--algorithm SHA256 |
SBOM Document Standards and Formats
|
Standard |
Type |
SBOM Document Format |
Supported? |
|
XSPDX |
JSON |
xspdx-json |
Supported |
|
SPDX |
JSON |
spdx-json |
Supported |
|
SPDX |
TagValue |
spdx-tagvalue |
Supported |
XSPDX is an SBOM format specification based on an extension of SPDX
Usage Examples
Generate SBOM documents and specify the format
Retrieve tool introduction information
For more usage examples, see the documentation
Development guide
See the Developer Guide for details