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-wrapper.jar checksum verification #39

Open
vlsi opened this issue Mar 17, 2021 · 7 comments
Open

Add gradle-wrapper.jar checksum verification #39

vlsi opened this issue Mar 17, 2021 · 7 comments

Comments

@vlsi
Copy link

vlsi commented Mar 17, 2021

What do you think if gm verifies the checksum of gradle/wrapper/gradle-wrapper.jar file?

Of course, it won't make the build completely secure (e.g. a malicious repository could augment gradlew to use a different jar for classpath), however it might improve things since text files (e.g. build scripts, batch scripts are easier to review than binary jars).

An alternative (or additional) option is to verify the integrity of gradlew and gradlew.bat (e.g. hard-code well-known good checksums)

An alternative option is to use gw-controlled set of gradlew executables (and gradle-wrapper.jar) so gw uses a trusted wrapper.

@vlsi
Copy link
Author

vlsi commented Mar 17, 2021

/cc @JLLeitschuh

@vlsi
Copy link
Author

vlsi commented Mar 17, 2021

Relevant issues: gradle/actions#283, gdubw/gng#15

@vlsi
Copy link
Author

vlsi commented Mar 17, 2021

Gradle distribution validation might be relevant as well: gradle/actions#286

@aalmiray
Copy link
Contributor

Such improvement should be offered for the Maven and Jbang wrappers as well.

@vlsi
Copy link
Author

vlsi commented Mar 17, 2021

Of course, if you think it is worth integrating the verification to gm, then it would be great to integrate it for all the build systems.

@aalmiray
Copy link
Contributor

Before doing it on gm the question is why don't the original tools provide such verification ootb? I know gradle does it with a Github Action on CI. Does it work with other CIs as well? Can the gradle or gradlew commands perform the check? Is it secure to do so or does this verification requires another party?

@vlsi
Copy link
Author

vlsi commented Mar 17, 2021

gm is the tool for end-users rather than a CI tool, so I guess CI questions are irrelevant here

Can the gradle or gradlew commands perform the check?

The key question here is: do you trust gradlew to validate itself?

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