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 support for validating gradle installation #46

Open
leonard84 opened this issue May 7, 2021 · 2 comments
Open

Add support for validating gradle installation #46

leonard84 opened this issue May 7, 2021 · 2 comments

Comments

@leonard84
Copy link

leonard84 commented May 7, 2021

As gradle does not include the distributionSha256Sum by default in the gradle-wrapper.properties (gradle/gradle#12412) it would be great if gm could offer support for validating/injecting this as well. Especially if users are using a mirror url.

The version and type could be inferred from the url if it is just a transparent mirror.

The checksums can be retrieved here https://gradle.org/release-checksums/ or from https://services.gradle.org/versions/all

This is related to #39 which validates the committed gradle-wrapper.jar and shell scripts.

@aalmiray
Copy link
Contributor

aalmiray commented May 7, 2021

This implies:

  • parsing gradle-wrapper.properties to find out the target distribution.
  • parsing https://services.gradle.org/versions/all to locate the checksum.
  • validate checksum.
  • modify gradle-wrapper.properties if successful.

It also implies gm is trusted to download and apply the checksum. Typically the matching checksum is retrieved separately from the tool to avoid conflicts. I suppose the gm binary could be signed and somehow validate itself against a well known signature server. If it passes then it can proceed to download an update the checksum.

That or blindly trust gm to not inject a faulty checksum.

@leonard84
Copy link
Author

leonard84 commented May 7, 2021

A main usecase for me would be: I downloaded and validated gm manually, check out some third-party repository that uses gradle and be safe in regards to the infrastructure code. Of course this doesn't say anything about the actual code in the repository itself, but it is better than the status quo.

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

No branches or pull requests

2 participants