Title: Add Software Bill of Materials (SBOM) for Python releases · Issue #112302 · python/cpython · GitHub
Open Graph Title: Add Software Bill of Materials (SBOM) for Python releases · Issue #112302 · python/cpython
X Title: Add Software Bill of Materials (SBOM) for Python releases · Issue #112302 · python/cpython
Description: 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 ...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/python/cpython/issues/112302
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add Software Bill of Materials (SBOM) for Python releases","articleBody":"# Feature or enhancement\r\n\r\n### Proposal:\r\n\r\nSoftware 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](https://www.federalregister.gov/documents/2021/06/02/2021-11592/software-bill-of-materials-elements-and-considerations) 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.\r\n\r\nThis 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.\r\n\r\nMy 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](https://github.com/sethmlarson/cpython-sbom) 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.\r\n\r\nI'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.\r\n\r\n## Proposed changes\r\n\r\n* Create a file which tracks all bundled dependency paths and ignored files (ie `Modules/_hacl/...`)\r\n* Add a new makefile target `regen-sbom` which regenerates the SBOM file containing hashes\r\n* 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.\r\n\r\nThen downstream in the release-tools repository:\r\n\r\n* Grab the SBOM file for each tagged release to use as a base for each artifact\r\n* Generate metadata for that Python release (files, relationships, etc).\r\n* For each artifact, there may be specific dependencies pulled in that will be recorded (ie https://github.com/python/cpython-source-deps, https://github.com/python/cpython-bin-deps)\r\n* Upload SBOM files to python.org/downloads similar to Sigstore signatures.\r\n\r\n## Example of updating dependencies\r\n\r\n* Pull a new version of hacl-star, for example.\r\n* `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.\r\n* 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.\r\n* Tool would check consistency of version information in other identifiers (PURL, CPE, download URL, etc)\r\n\r\n### Sub-issues\r\n\r\n- Create an informational PEP on SBOMs in CPython\r\n- Create a \"What's New\" entry for Python 3.13\r\n- https://github.com/python/pythondotorg/issues/2339\r\n- https://github.com/python/devguide/issues/1241\r\n- https://github.com/python/cpython/issues/112844\r\n- https://github.com/python/pythondotorg/issues/2340\r\n\r\n### Has this already been discussed elsewhere?\r\n\r\nI have already discussed this feature proposal on Discourse\r\n\r\n### Links to previous discussion of this feature:\r\n\r\nI've created [a Discourse topic](https://discuss.python.org/t/create-and-distribute-software-bill-of-materials-sbom-for-python-artifacts/39293) to discuss the impact to core developers and maintenance.\r\n\r\n\u003c!-- gh-linked-prs -->\r\n### Linked PRs\r\n* gh-112303\r\n* gh-112854\r\n* gh-113490\n* gh-114730\n* gh-115038\n* gh-115088\n* gh-115360\n* gh-115486\n\u003c!-- /gh-linked-prs -->\r\n","author":{"url":"https://github.com/sethmlarson","@type":"Person","name":"sethmlarson"},"datePublished":"2023-11-21T20:00:15Z","url":"https://github.com/python/cpython/issues/112302"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b4ada9fd-829f-ce11-18cf-b2998a3ccf01 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8EE4:6B7DC:DB6B56:115ED35:6B023625 |
| html-safe-nonce | ef3c792a4f53b5b27068b246ace10a7377789b4ae38346a88c18d6cdc4a40ca7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUU0OjZCN0RDOkRCNkI1NjoxMTVFRDM1OjZCMDIzNjI1IiwidmlzaXRvcl9pZCI6Ijc5MzM2MTMxNDIyODA2NDgyMjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6f5b8a3fac29c956a2cfb64301a445681176f36615cc54fc1c7103e3c20c8b7a |
| hovercard-subject-tag | issue:2005036245 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/112302/issue_layout |
| twitter:image | https://opengraph.githubassets.com/acf37f14fb795f7ec5544fdcbaffc204fa55b5e8eca6a5ba35c547465d247a6a/python/cpython/issues/112302 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/acf37f14fb795f7ec5544fdcbaffc204fa55b5e8eca6a5ba35c547465d247a6a/python/cpython/issues/112302 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sethmlarson |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width