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 hashes to requirements.txt #247

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

bact
Copy link
Collaborator

@bact bact commented Jan 28, 2025

Use pip-compile --generate-hashes to help pin dependencies by hash.

"Human-readable" file for dependencies (using version numbers) are now in ./github/requirements/*.in.

Hashes will be generated and written to ./github/requirements/*.txt (very long files and difficult to be comprehend by human). These *.txt files will be used by pip install -r.

Hopefully will improve OpenSSF Scorecard score for Pinned-Dependencies category.

Use pip-compile --generate-hashes

Signed-off-by: Arthit Suriyawongkul <[email protected]>
@bact bact added security github_actions Pull requests that update GitHub Actions code labels Jan 28, 2025
@bact bact requested a review from jspeed-meyers January 28, 2025 03:44
@bact bact mentioned this pull request Jan 28, 2025
1 task
Copy link
Collaborator

@jspeed-meyers jspeed-meyers left a comment

Choose a reason for hiding this comment

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

Whoa! Okay, worth a try. But if this ends up creating toil for you or others, I'm fine with reverting it. But thank you for your thorough investigation and implementation.

@jspeed-meyers jspeed-meyers merged commit f5df85d into spdx:main Jan 28, 2025
6 checks passed
@bact bact deleted the add-hash-to-requirements-txt branch January 28, 2025 17:07
@bact
Copy link
Collaborator Author

bact commented Jan 28, 2025

Looks like it does not work. The Pinned-Dependencies score stay the same at 5.
I think if this complicated thing doesn't improve anything, we better revert to the original much simpler pip.

@jspeed-meyers
Copy link
Collaborator

Yes, please. That sounds good to me. LMK if I need to do anything.

@bact
Copy link
Collaborator Author

bact commented Jan 28, 2025

Thanks for confirming, I will proceed with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants