All Projects → gradle → Wrapper Validation Action

gradle / Wrapper Validation Action

Licence: mit
Gradle Wrapper Validation Action

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Wrapper Validation Action

Hidden Secrets Gradle Plugin
🔒 Deeply hide secrets on Android
Stars: ✭ 79 (-20.2%)
Mutual labels:  gradle
Gradle Util Plugins
Fix for windows gradle long classpath issue. Fixes JavaExec tasks that error out with message "CreateProcess error=206, The filename or extension is too long"
Stars: ✭ 87 (-12.12%)
Mutual labels:  gradle
Androidnote
Android and Java Note
Stars: ✭ 94 (-5.05%)
Mutual labels:  gradle
Hex Arch Kotlin Spring Boot
Reference JVM multi module project for a reactive micro service and lambda using a hexagonal architecture, DDD, Kotlin, Spring Boot, Quarkus, Lambda, Gradle.
Stars: ✭ 83 (-16.16%)
Mutual labels:  gradle
Easypermissions Android
A simple library that will remove all the boilerplate code and speed up your work with new Runtime Permissions introduced in Android M.
Stars: ✭ 85 (-14.14%)
Mutual labels:  gradle
Xvideo
一个能自动进行压缩的小视频录制库
Stars: ✭ 90 (-9.09%)
Mutual labels:  gradle
Android Linq
Manipulate collections easily using C# LINQ style queries and Java 8 closures.
Stars: ✭ 76 (-23.23%)
Mutual labels:  gradle
Sample Boot Hibernate
Spring Boot + JPA ( Hibernate ) + Java8 [ DDD Sample ]
Stars: ✭ 97 (-2.02%)
Mutual labels:  gradle
Appstorelibrary
Android AppStore library for Play, Amazon, and OneStore(one of the korean appstore) app store
Stars: ✭ 86 (-13.13%)
Mutual labels:  gradle
Kotlin Mpp Standard
A standard setup for Kotlin multiplatform projects.
Stars: ✭ 92 (-7.07%)
Mutual labels:  gradle
Gradle Plugins
Gradle Plugin Collection
Stars: ✭ 84 (-15.15%)
Mutual labels:  gradle
Gradle Buildconfig Plugin
A plugin for generating BuildConstants for any kind of Gradle projects: Java, Kotlin, Groovy, etc. Designed for KTS scripts.
Stars: ✭ 85 (-14.14%)
Mutual labels:  gradle
Vertx Gradle Starter
Gradle project template for Vert.x
Stars: ✭ 91 (-8.08%)
Mutual labels:  gradle
Circleci Orbs
The source code for some of the orbs published by CircleCI
Stars: ✭ 82 (-17.17%)
Mutual labels:  gradle
Bintray Publish
Super easy way to publish your Android and Java artifacts to bintray.
Stars: ✭ 97 (-2.02%)
Mutual labels:  gradle
Advancedasynctask
Enhanced AsyncTask library for Android
Stars: ✭ 77 (-22.22%)
Mutual labels:  gradle
Ffmpegandroidlibrary
One line integration for FFMPEG Library in Android
Stars: ✭ 88 (-11.11%)
Mutual labels:  gradle
Vertx Gradle Plugin
An opinionated Gradle plugin for Vert.x projects
Stars: ✭ 98 (-1.01%)
Mutual labels:  gradle
Gradle Quality Plugin
Gradle quality plugin for Java and Groovy
Stars: ✭ 97 (-2.02%)
Mutual labels:  gradle
Cipher.so
A simple way to encrypt your secure data like passwords into a native .so library.
Stars: ✭ 1,308 (+1221.21%)
Mutual labels:  gradle

gradle/wrapper-validation-action status

Gradle Wrapper Validation Action

This action validates the checksums of Gradle Wrapper JAR files present in the source tree and fails if unknown Gradle Wrapper JAR files are found.

The Gradle Wrapper Problem in Open Source

The gradle-wrapper.jar is a binary blob of executable code that is checked into nearly 2.8 Million GitHub Repositories.

Searching across GitHub you can find many pull requests (PRs) with helpful titles like 'Update to Gradle xxx'. Many of these PRs are contributed by individuals outside of the organization maintaining the project.

Many maintainers are incredibly grateful for these kinds of contributions as it takes an item off of their backlog. We assume that most maintainers do not consider the security implications of accepting the Gradle Wrapper binary from external contributors. There is a certain amount of blind trust open source maintainers have. Further compounding the issue is that maintainers are most often greeted in these PRs with a diff to the gradle-wrapper.jar that looks like this.

Image of a GitHub Diff of Gradle Wrapper displaying text 'Binary file not shown.'

A fairly simple social engineering supply chain attack against open source would be contribute a helpful “Updated to Gradle xxx” PR that contains malicious code hidden inside this binary JAR. A malicious gradle-wrapper.jar could execute, download, or install arbitrary code while otherwise behaving like a completely normal gradle-wrapper.jar.

Solution

We have created a simple GitHub Action that can be applied to any GitHub repository. This GitHub Action will do one simple task: verify that any and all gradle-wrapper.jar files in the repository match the SHA-256 checksums of any of our official releases.

If any are found that do not match the SHA-256 checksums of our official releases, the action will fail.

Additionally, the action will find and SHA-256 hash all homoglyph variants of files named gradle-wrapper.jar, for example a file named gradlе-wrapper.jar (which uses a Cyrillic е instead of e). The goal is to prevent homoglyph attacks which may be very difficult to spot in a GitHub diff. We created an example Homoglyph attack PR here.

Usage

Add to an existing Workflow

Simply add this action to your workflow after having checked out your source tree and before running any Gradle build:

uses: gradle/[email protected]

Add a new dedicated Workflow

Here's a sample complete workflow you can add to your repositories:

.github/workflows/gradle-wrapper-validation.yml

name: "Validate Gradle Wrapper"
on: [push, pull_request]

jobs:
  validation:
    name: "Validation"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: gradle/[email protected]

Contributing to an external GitHub Repository

Since GitHub Actions are completely free for open source projects and are automatically enabled on almost all projects, adding this check to a project's build is as simple as contributing a PR. Enabling the check requires no overhead on behalf of the project maintainer beyond merging the action.

You can add this action to your favorite Gradle based project without checking out their source locally via the GitHub Web UI thanks to the 'Create new file' button.

GitHub 'Create new file' Button bar picture

Simply add a new file named .github/workflows/gradle-wrapper-validation.yml with the contents mentioned above.

We recommend the message commit contents of:

  • Title: Official Gradle Wrapper Validation Action
  • Body (at minimum): See: https://github.com/gradle/wrapper-validation-action

From there, you can easily follow the rest of the prompts to create a Pull Request against the project.

Reporting Failures

If this GitHub action fails because a gradle-wrapper.jar doesn't match one of our published SHA-256 checksums, we highly recommend that you reach out to us at [email protected].

Note: gradle-wrapper.jar generated by Gradle 3.3 to 4.0 are not verifiable because those files were dynamically generated by Gradle in a non-reproducible way. It's not possible to verify the gradle-wrapper.jar for those versions are legitimate using a hash comparison. You should try to determine if the gradle-wrapper.jar was generated by one of these versions before running the build.

If the Gradle version in gradle-wrapper.properties is out of this range, you may need to regenerate the gradle-wrapper.jar by running ./gradlew wrapper. If you need to use a version of Gradle between 3.3 and 4.0, you can use a newer version of Gradle to generate the gradle-wrapper.jar.

If you're curious and want to explore what the differences are between the gradle-wrapper.jar in your possession and one of our valid release, you can compare them using this online utility: DiffScope. Regardless of what you find, we still kindly request that you reach out to us and let us know.

Resources

To learn more about verifying the Gradle Wrapper JAR locally, see our guide on the topic.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].