Skip to main content

Tests Documentation

debsbom - SBOM generator for Debian-based distributions

debsbom generates SBOMs (Software Bill of Materials) for distributions based on Debian in the two standard formats SPDX and CycloneDX.

The generated SBOM includes all installed binary packages and also contains Debian Source packages.

Source packages are especially relevant for security as CVEs in the Debian ecosystem are filed not against the installed binary packages, but source packages. The names of source and binary packages must not always be the same, and in some cases a single source package builds a number of binary packages.

debsbom also provides a complete dependency graph for the analyzed system. This graph is useful for identification of crucial components in your distribution, or to identify which package pulled in vulnerabilites with its dependencies.

Usage

Please refer to the debsbom documentation.

usage: debsbom [-h] [--version] [-v] [--progress | --json] [--print-completion {bash,zsh,tcsh}] {generate,merge,download,source-merge,repack,export,delta,trace-path,filter,sec-scan} ...

SBOM tool for Debian systems.

positional arguments:
  {generate,merge,download,source-merge,repack,export,delta,trace-path,filter,sec-scan}
                        sub command help
    generate            generate a SBOM for a Debian system
    merge               merge multiple SBOMs
    download            download referenced packages
    source-merge        merge referenced source packages
    repack              repack sources and sbom
    export              export SBOM as graph
    delta               list components changed in target SBOM
    trace-path          trace path between components
    filter              filter SBOM by sources or binaries
    sec-scan            check SBOM for security vulnerabilities

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose         be more verbose
  --progress            report progress
  --json                make output machine readable
  --print-completion {bash,zsh,tcsh}
                        print shell completion script

Scope of the tool

The primary goal is to generate Software Bills of Materials (SBOMs) for Debian-based systems, focusing on security and license clearing requirements. The generate command operates entirely offline, making it suitable for use in air-gapped networks or environments where internet connectivity is restricted.

Goals

The generate command creates comprehensive SBOMs that include all installed software packages and their dependencies (binary, source package and built-using[1]). These SBOM outputs are designed to serve as reliable input for vulnerability management systems and license compliance checks.

The tool provides auxiliary commands for package source retrieval. These enable users to:

  1. Retrieve packages from Debian's upstream repositories and report missing packages.
  2. Convert the multi-archive source packages into a single artifact (one archive per source package)

At its core, this tool was designed to fulfill these SBOM generation requirements while maintaining:

  1. A minimal dependency footprint: avoid huge dependency graph of external software ecosystems (like Go or Rust)
  2. Strict focus on Debian-specific package formats
  3. Clear separation between binary packages and their corresponding source packages
  4. Use official SPDX / CycloneDX libraries to ensure syntactic and semantic correctness

Non Goals

  • License and copyright text extraction from source packages
  • Signing and attestation of generated artifacts

Package Relations

A Debian distribution is composed of source packages and binary packages. Binary packages are installed into the root filesystem, while the source packages are the originals from which those binaries are built.

Some binary packages are installed explicitly by the user; others appear automatically as dependencies of the explicitly‑installed packages. The SBOM mirrors this relationship, using the distro-package entry as the single central node for traversing the package graph.

distro-package
├─ binary-package-foo
├─── source-package-foo
├─── binary-dep-of-foo
├─ binary-package-bar
├─── source-package-bar
└─── binary-dep-of-bar

Source-Binary

To differentiate binary and source packages in the SBOM a different approach for each SBOM standard is required.

CycloneDX

In the CDX format it is currently not possible to mark a component as a source package. There is an ongoing discussion [2] which, while looking promising, will not land in the standard for quite some time. In the meantime source packages can only be identified by their PURL by looking at the arch=source qualifier. The relationships between a binary and its source package is done with a simple dependency.

SPDX

We differentiate a source package by setting "primaryPackagePurpose": "SOURCE" as opposed to LIBRARY for binary packages. Their relationship is expressed with the GENERATES relation. For packages that are marked as Built-Using in the dpkg status file, we use the GENERATED_FROM relation. This expresses the same semantic in SPDX, but this way it can still be identified if it is a proper source/binary relationship or a built-using one.

Limitations

Vendor Packages

Vendor packages are currently not identified. Identifying them is important to emit the correct PURL. Right now we make no difference between vendor and official packages. That means we emit potentially incorrect PURLs for vendor packages.

Reliably and correctly identifying if a package is a vendor package or not is non-trivial without access to the internet. For this reason we do not attempt it. If you have vendor packages in your distribution we assume you know them, and if not you can identify them in postprocessing. A simple way is to use debsbom download and look for any packages that failed to download, or whose checksums do not match.

Maintainer GPG Fingerprints

All release tags since v0.7.0 are signed by either one of these keys:

Metadata

Release files for debsbom 0.10.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for debsbom 0.10.2
File Size Uploaded Provenance Actions
debsbom-0.10.2.tar.gz 113.7 kB With provenance Details for debsbom-0.10.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for debsbom 0.10.2
File Interpreter ABI Platform Actions
debsbom-0.10.2-py3-none-any.whl Python 3 none any Details for debsbom-0.10.2-py3-none-any.whl

Total release size: 229.2 kB

Release files / debsbom-0.10.2.tar.gz

Download URL debsbom-0.10.2.tar.gz
Size 113.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e731447d8a88108b1bbba260f5ac891767c2b713544e2936c724b5c06fccbd0f
BLAKE2b-256 checksum
How to use checksums
a25b784df342be7091591de910bbdf1b5ea2472aba9964177093365ec7a45786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release files / debsbom-0.10.2-py3-none-any.whl

Download URL debsbom-0.10.2-py3-none-any.whl
Size 115.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
592bb404b87fa3e7877ae1ef041c97f339dc360ec60868a08374f54c0d89aeb0
BLAKE2b-256 checksum
How to use checksums
c23275572ae4cf9fcd8b2c1bfd63a3d82f507eb8da6cfe443999bf8240c57652
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Security for debsbom 0.10.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for debsbom-0.10.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page