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

gh-112302: Add Software Bill-of-Materials (SBOM) tracking for dependencies #112303

Merged
merged 5 commits into from Dec 7, 2023

Conversation

sethmlarson
Copy link
Contributor

@sethmlarson sethmlarson commented Nov 21, 2023

This PR is a simple adaptation of the tooling used for my experiment to create SBOMs for past and current Python versions. I created a regen-sbom Makefile target. This PR needs some documentation for how core developers are expected to run the tooling when updating source dependencies.

@bedevere-app
Copy link

bedevere-app bot commented Nov 21, 2023

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link

bedevere-app bot commented Dec 6, 2023

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a NEWS file would be good here.

This PR needs some documentation for how core developers are expected to run the tooling when updating source dependencies.

Yep, would be good to know who should run it and when (running it now, I get about 20 new entries in the JSON). Maybe something for the devguide. Is it something that should be in the CI? Can also be in followups.

Tools/build/generate_sbom.py Show resolved Hide resolved
Tools/build/generate_sbom.py Outdated Show resolved Hide resolved
Tools/build/generate_sbom.py Outdated Show resolved Hide resolved
Tools/build/generate_sbom.py Outdated Show resolved Hide resolved
@sethmlarson
Copy link
Contributor Author

sethmlarson commented Dec 6, 2023

Thanks for the review @hugovk!

Yep, would be good to know who should run it and when (running it now, I get about 20 new entries in the JSON). Maybe something for the devguide. Is it something that should be in the CI? Can also be in followups.

I can certainly add something to the devguide, I've created a tracking issue for myself here: python/devguide#1241

For the 20 differences you are seeing, I believe I've pushed the update that would be required (in this case, updating pip). After fetching the latest branch are you seeing the same?

@hugovk
Copy link
Member

hugovk commented Dec 6, 2023

I'm still seeing it, looks like this: hugovk@06ed0fa

@sethmlarson
Copy link
Contributor Author

@hugovk Got it! I have to add filtering for gitignored files.

@sethmlarson
Copy link
Contributor Author

@hugovk Give acdd91b a try, that should be filtering out according to gitignore.

@hugovk
Copy link
Member

hugovk commented Dec 7, 2023

No change to the JSON file this time 👍

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Ready for merge, want to add more, or someone else to review?

Tools/build/generate_sbom.py Outdated Show resolved Hide resolved
Tools/build/generate_sbom.py Outdated Show resolved Hide resolved
Tools/build/generate_sbom.py Outdated Show resolved Hide resolved
@sethmlarson
Copy link
Contributor Author

@hugovk I'll add the trailing commas then I'm good to merge! Going to add more in followups :)

@sethmlarson
Copy link
Contributor Author

@hugovk Commas have been added! ab65fdd Ready to merge when you are :)

@hugovk hugovk merged commit 21221c3 into python:main Dec 7, 2023
35 checks passed
@hugovk
Copy link
Member

hugovk commented Dec 7, 2023

Thanks!

@sethmlarson sethmlarson deleted the sbom-gen branch December 7, 2023 16:37
@pitrou
Copy link
Member

pitrou commented Dec 7, 2023

It would be good to ensure the generated file is treated as such by review tools.

@sethmlarson
Copy link
Contributor Author

Thanks @pitrou, great suggestion. Here's the PR: #112854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants