-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
build(deps): Generate Gradle Wrapper 8.14.5 instead of 8.7 and 8.14.3 (SECURITY) #24396
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-all.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| {{#useSpringBoot4}}distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip{{/useSpringBoot4}}{{^useSpringBoot4}}distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip{{/useSpringBoot4}} | ||
| {{#useSpringBoot4}}distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip{{/useSpringBoot4}}{{^useSpringBoot4}}distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip{{/useSpringBoot4}} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Generated Spring Cloud projects download the new Gradle distribution without verifying its SHA-256, so a compromised or misrouted distribution endpoint can supply code that runs during the build despite this security-focused upgrade. Adding the verified Prompt for AI agents |
||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The updated wrapper still executes a downloaded Gradle ZIP without pinning its digest, so a compromised distribution path or artifact could be accepted as the build tool. Adding the official SHA-256 for Prompt for AI agents |
||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Builds now download and execute Gradle 8.14.5 without pinning the archive's SHA-256, so a compromised upstream artifact or delivery path could run arbitrary build code. Adding the official checksum for the 8.14.5 binary distribution would preserve the security goal while protecting the wrapper supply chain. Prompt for AI agents |
||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: Android-targeted Java clients will fail during Gradle configuration after this shared wrapper is upgraded: the
target=androidbranch still appliescom.android.tools.build:gradle:2.3.+, which cannot run on Gradle 8.14.5. Keeping a compatible wrapper for that branch or upgrading/splitting the Android build configuration would avoid breaking generated Android projects.Prompt for AI agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkubowicz The short answer: Probably none of the 8.x series.
The
target=androidtemplate in this project pinscom.android.tools.build:gradle:2.3.+— that's the Android Gradle Plugin (AGP) 2.3.x, which was released in 2017. AGP 2.3.x requires Gradle 3.3–4.10 at most. Even Gradle 5.x won't work, let alone 8.x.If you wanted to keep the Android template functional with the new wrapper, you'd need to:
target=androidand the new 8.14.5 wrapper for all other Java targets.That said, looking at the PR more carefully: there's already a separate Android-specific template at
modules/openapi-generator/src/main/resources/android/gradle-wrapper.properties.mustachewhich is also being bumped to 8.14.5. That one would face the same incompatibility if its build script still uses AGP 2.3.+.Worth checking whether the Android template's
build.gradlestill references that old AGP version — if someone already modernized it, 8.14.5 might work there.Tip: get faster answers by chatting with cubic’s review copilot in the review UI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is AI hallucination.
I know little of Android development. But AGP 2.3 is something pre-historic, mentioning Gradle 3.3: https://developer.android.com/build/releases/agp-2-3-0-release-notes
I don't see any evidence I am breaking something more by using Gradle 8.14.5 compared to using Gradle 8.7.