Skip to main content

Welcome to apt2sbom

This package contains a library and a CLI tool to convert a Ubuntu software package inventory to a software bill of materials. You are in the wrong place if you are not running Ubuntu.

The package is under active development. Don't be surprised if something doesn't work quite right. please see CONTRIBUTING.md for details.

Building

Building is easy:

  1. Bop the version on setup.cfg
  2. python3 -m build -w
  3. cd dist
  4. pip3 install that file

Do this, of course, on a Ubuntu system.

Usage

To use the CLI tool:

% apt2sbom (--json|--yaml|--cyclonedx [--pip])

Will produce either JSON or YAML forms of an SPDX file, or the JSON form of a CycloneDX file . There is no default. Pick one.

To include python packages, add --pip.

There is also a werkzeug interface so that an SBOM file can be delivered via HTTP. To use, create a simple wsgi file as follows:

from apt2sbom.wsbom import app as application  
application = create_app(\_name\_)

and call that file from your httpd. An apache example follows:

WSGIScriptAlias /.well-known/sbom /usr/lib/cgi-bin/sbom.wsgi
WSGIPassAuthorization On

There is a configuration file: /etc/sbom.conf

It is in the form of a JSON object. It currently has the following parameters and defaults as follows:

{
   "do_auth": true,  # otherwise don't auth
   "passwd_file": "/etc/sbom.users",  # where to find the passwds
   "include_pip": false, # pip results take a long time
   "pregen_file": null # only open and read this file; otherwise gen.
   "sbom_type": null # the type of sbom.  must be set if using pre_gen file.
}

Note- don't put comments in. (ToDo)

When this is done, a very simple password file is expected by default in /etc/sbom.users:

{
   "user" : "password",
   "otheruser" : "otherpassword",
    ...
}

The passwords aren't hashed. This is clearly something that has to be addressed in the future.

The type of SBOM returned depends on the Accepts: header sent.

Metadata

Release files for apt2sbom 0.9.6

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

Source distribution (sdist)

Source distribution for apt2sbom 0.9.6
File Size Uploaded Provenance Actions
apt2sbom-0.9.6.tar.gz 8.6 kB Without provenance Details for apt2sbom-0.9.6.tar.gz

Built distribution (wheel)

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

Total release size: 19.8 kB

Release files / apt2sbom-0.9.6.tar.gz

Download URL apt2sbom-0.9.6.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cea24141bbaab6f330d8695441779209a905e046cf0f3ea19e60586be8bae973
BLAKE2b-256 checksum
How to use checksums
c2b58009b792be1467faea7287d2e94fddc7ad44c86780d6e7ee9adece62b56a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / apt2sbom-0.9.6-py3-none-any.whl

Download URL apt2sbom-0.9.6-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04c9c887251ab0832bd23e9d1c5a042415aa7991308cda73b4c9d072708a266b
BLAKE2b-256 checksum
How to use checksums
e5886375dcaf9580dcaeb33d7906ccfc43ddad923ef5b0c18cbbf1db16ea50a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for apt2sbom 0.9.6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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