Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sethmlarson opened this issue Nov 21, 2023 · 1 comment
Open

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

sethmlarson opened this issue Nov 21, 2023 · 1 comment
Labels
type-feature A feature request or enhancement type-security A security issue

Comments

@sethmlarson
Copy link
Contributor

sethmlarson commented Nov 21, 2023

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

@sethmlarson
Copy link
Contributor Author

I've created a PR which ports the tooling used on my experimental repository into a regen-sbom makefile target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement type-security A security issue
Projects
None yet
Development

No branches or pull requests

2 participants
@sethmlarson and others