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 Gradle distribution verification to project #1770

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

asos-edgeorge
Copy link
Contributor

Proposed Changes

It's a security best practice to verify the Gradle distribution used within the project to protect against a supply-chain-style attack. These have been observed in the wild previously and are easily mitigated through the use of the distributionSha256Sum Gradle property 1

This PR adds the expected Gradle distro verification for Gradle Wrapper 7.6 by calling the gradlew wrapper task as follows:

./gradlew wrapper --gradle-version=7.6 --distribution-type=bin --gradle-distribution-sha256-sum=7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b

The checksums for Gradle distributions are available via Gradle's website2 and the above can be verified.

Important

Post-merging, whenever the Gradle version is updated, the above command should be repeated with the checksum for the new version

Testing

Verified the project builds correctly and downloads Gradle Wrapper with the expected checksum

Footnotes

  1. https://www.spght.dev/articles/23-07-2023/gradle-security

  2. https://gradle.org/release-checksums/

Copy link
Member

@bartekpacia bartekpacia left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

Let's also use this GitHub action for added safety. Done.

@bartekpacia bartekpacia merged commit 9b68a2b into mobile-dev-inc:main Jul 10, 2024
2 checks passed
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

2 participants