Skip to content

Commit

Permalink
chore(deps): update gradle/gradle-build-action action to v2.4.2 [secu…
Browse files Browse the repository at this point in the history
…rity] (#229)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[gradle/gradle-build-action](https://github.com/gradle/gradle-build-action)
| action | minor | `v2.3.3` -> `v2.4.2` |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the
Dependency Dashboard for more information.

### GitHub Vulnerability Alerts

####
[CVE-2023-30853](https://github.com/gradle/gradle-build-action/security/advisories/GHSA-h3qr-39j9-4r5v)

### Impact

This vulnerability impacts GitHub workflows using the [Gradle Build
Action](https://github.com/marketplace/actions/gradle-build-action)
that have executed the Gradle Build Tool with the [configuration
cache](https://docs.gradle.org/current/userguide/configuration_cache.html)
enabled, potentially exposing secrets configured for the repository.

Secrets configured for GitHub Actions are normally passed to the Gradle
Build Tool via environment variables. Due to the way that the Gradle
Build Tool records these environment variables, they may be persisted
into an entry in the GitHub Actions cache. This data stored in the
GitHub Actions cache can be read by a GitHub Actions workflow running in
an untrusted context, such as that running for a Pull Request submitted
by a developer via a repository fork.

This vulnerability was discovered internally through code review, and we
have not seen any evidence of it being exploited in the wild. However,
in addition to upgrading the Gradle Build Action, you should delete any
potentially vulnerable cache entries and may choose to rotate any
potentially affected secrets ([see Remediation](#Remediation)).

### Patches

[Gradle Build Action
v2.4.2](https://github.com/gradle/gradle-build-action/releases/tag/v2.4.2)
(and newer) no longer save this sensitive data for later use, preventing
ongoing leakage of secrets via the GitHub Actions Cache. We strongly
recommend that all users of the Gradle Build Action upgrade to `v2.4.2`
(or simply `v2`) immediately.

### Remediation

While upgrading to the latest version of the Gradle Build Action will
prevent leakage of secrets going forward, additional actions may be
required due to current or previous GitHub Actions Cache entries
containing this information.

Current cache entries will remain vulnerable until they are forcibly
deleted or they expire naturally after 7 days of not being used.
Potentially vulnerable entries can be easily identified in the GitHub UI
by searching for a cache entry with key matching
`configuration-cache-*`. We recommend that users of the Gradle Build
Action inspect their list of cache entries and [manually delete any that
match this
pattern](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#deleting-cache-entries).

While we have not seen any evidence of this vulnerability being
exploited, we recommend cycling any repository secrets if you cannot be
certain that these have not been compromised. Compromise could occur if
you run a GitHub Actions workflow for a pull request attempting to
exploit this data.
Warning signs to look for in a pull request include:
- Making changes to GitHub Actions workflow files in a way that may
attempt to read/extract data from the Gradle User Home or
<project-root>/.gradle directories.
- Making changes to Gradle build files or other executable files that
may be invoked by a GitHub Actions workflow, in a way that may attempt
to read/extract information from these locations.

### Workarounds

We strongly recommend that all users upgrade to the latest version of
the Gradle Build Action as soon as possible, and delete any potentially
vulnerable cache entries from the GitHub Actions cache ([see
Remediation](#Remediation)).

If for some reason this is not possible, users can limit the impact of
this vulnerability:
- If the Gradle project does not opt-in to using the configuration
cache, then it is not vulnerable.
- If the Gradle project does opt-in to using the configuration-cache by
default, then the `--no-configuration-cache` command-line argument can
be used to disable this feature in a GitHub Actions workflow.

In any case, we recommend that users carefully inspect any pull request
before approving the execution of GitHub Actions workflows. It may be
prudent to require approval for all PRs from external contributors, as
described
[here](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#controlling-changes-from-forks-to-workflows-in-public-repositories).

---

### Release Notes

<details>
<summary>gradle/gradle-build-action</summary>

###
[`v2.4.2`](https://github.com/gradle/gradle-build-action/releases/tag/v2.4.2)

[Compare
Source](https://github.com/gradle/gradle-build-action/compare/v2.4.1...v2.4.2)

This release disables the save/restore of configuration-cache data,
since this functionality has been shown to be problematic.
Gradle 8.1 has made changes to this functionality which will require a
more comprehensive rework of the action before we can re-enable this.

###
[`v2.4.1`](https://github.com/gradle/gradle-build-action/releases/tag/v2.4.1)

[Compare
Source](https://github.com/gradle/gradle-build-action/compare/v2.4.0...v2.4.1)

This patch release updates a number of dependencies, including `xmljs`
which was reported to have a security vulnerability
(https://nvd.nist.gov/vuln/detail/CVE-2023-0842).
There is no evidence that this vulnerability affected the
`gradle-build-action`.

**Full changelog**:
gradle/gradle-build-action@v2.4.0...v2.4.1

###
[`v2.4.0`](https://github.com/gradle/gradle-build-action/releases/tag/v2.4.0)

[Compare
Source](https://github.com/gradle/gradle-build-action/compare/v2.3.3...v2.4.0)

#### What's new

The `v.2.4.0` release contains various library updates and fixes to
fully support Gradle 8.

Notable changes:

- Update to `@actions/cache: 3.1.3` should improve cache save/restore
performance on Windows by using gnu tar and zstd when available.
- Fix caching of extracted JDK toolchains for Gradle 7.6+
([`e444647`](https://github.com/gradle/gradle-build-action/commit/e4446473950007d0d0323adeed9f992824618be9))

**Full Changelog**:
gradle/gradle-build-action@v2.3.3...v2.4.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no
schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elide-dev/elide).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS42Ni4xIiwidXBkYXRlZEluVmVyIjoiMzUuNjYuMSIsInRhcmdldEJyYW5jaCI6InYzIn0=-->
  • Loading branch information
sgammon authored May 1, 2023
2 parents bc6b4f5 + cb72a93 commit ce39ea3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: "Setup: Yarn"
run: yarn
- name: "Run Benchmarks"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
id: gradlebench
continue-on-error: ${{ matrix.experimental }}
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: "Patch: Restore Yarn Lock"
run: mv kotlin-js-store/yarn.inert kotlin-js-store/yarn.lock
- name: "Check: Library ABI"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
id: abicheck
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'ci:ignore-abicheck') }}
env:
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
export_environment_variables: true
cleanup_credentials: true
- name: "🛠️ Build"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
id: gradlebuild
continue-on-error: ${{ matrix.mode == 'labs' }}
env:
Expand Down Expand Up @@ -256,7 +256,7 @@ jobs:
- name: "Setup: Yarn"
run: npm install -g [email protected] && yarn
- name: "Run Tests (JVM)"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
env:
CI: true
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down Expand Up @@ -366,7 +366,7 @@ jobs:
- name: "Setup: Yarn"
run: npm install -g [email protected] && yarn
- name: "Run Tests (Native)"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
continue-on-error: true
env:
CI: true
Expand Down Expand Up @@ -481,7 +481,7 @@ jobs:

## -- Samples -- ##
- name: "Build/Push: '${{ matrix.project }}' (JVM)"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
with:
arguments: |
--no-daemon
Expand Down Expand Up @@ -581,7 +581,7 @@ jobs:

## -- Samples -- ##
- name: "Build/Push: '${{ matrix.project }}' (Native)"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
continue-on-error: true
with:
arguments: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
echo "APP_VERSION=$(cat .version)" >> $GITHUB_ENV;
echo "Releasing version $APP_VERSION"
- name: "Publish: Conventions"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
if: ${{ inputs.conventions }}
with:
arguments: |
Expand All @@ -192,7 +192,7 @@ jobs:
-x test
:conventions:publish
- name: "Publish: Substrate"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
if: ${{ inputs.substrate }}
with:
arguments: |
Expand All @@ -210,7 +210,7 @@ jobs:
-x test
:substrate:publish
- name: "Publish: Processor"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
if: ${{ inputs.processor }}
with:
arguments: |
Expand All @@ -228,7 +228,7 @@ jobs:
-x test
:tools:processor:publish
- name: "Publish: Packages"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
if: ${{ inputs.packages }}
with:
arguments: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-checks.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
export_environment_variables: true
cleanup_credentials: true
- name: "🛠️ Build"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
id: gradlebuild
continue-on-error: ${{ matrix.mode == 'labs' }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/site.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
run: |
make docs reports CI=yes JVM=19
- name: "Build: Site"
uses: gradle/gradle-build-action@v2.3.3
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
env:
CI: true
GRADLE_CACHE_PUSH: true
Expand Down

0 comments on commit ce39ea3

Please sign in to comment.