Skip to content

Add Software Bill of Materials (SBOM) for Python releases #112302

Closed
@sethmlarson

Description

@sethmlarson

Feature or enhancement

Proposal:

Software Bill of Materials (SBOM) is a format for tracking software and its components. This information will also soon become relevant for Python users due to this Executive Order and other requirements elsewhere in the world. Instead of requiring each individual consumer and redistributor to create their own documents we can provide an authoritative document for each Python release.

This would not require a change to Python itself, instead I imagine the SBOM files would be provided alongside the release artifacts on python.org/downloads.

My goal with this project is to provide this information to consumers with minimal modification to core developer workflows. I've experimented with creating SBOMs for past and present Python versions and have found that most of the work comes when dependencies are updated and in those cases the SBOM metadata needs to also be updated (ie: versions, hashes). Beyond that the rest can be automated downstream with the Python release tooling.

I'm happy to make all the changes required to implement this proposal. I'm also happy to be the reviewer for all SBOM related PRs while I'm the Security Developer-in-Residence.

Proposed changes

  • Create a file which tracks all bundled dependency paths and ignored files (ie Modules/_hacl/...)
  • Add a new makefile target regen-sbom which regenerates the SBOM file containing hashes
  • Run this target as a part of CI (via regen-all) to ensure that all updates to dependencies require an update to the SBOM metadata.

Then downstream in the release-tools repository:

Example of updating dependencies

  • Pull a new version of hacl-star, for example.
  • make regen-all would cause changes to the checked in SBOM file. This would either fail in CI or require user to inspect the SBOM locally.
  • Dev would read the instructions on how to update the version of the SBOM. Usually this would only require updating the version number and committing the generated changes to file checksums.
  • Tool would check consistency of version information in other identifiers (PURL, CPE, download URL, etc)

Sub-issues

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

I've created a Discourse topic to discuss the impact to core developers and maintenance.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions