chore(deps): bump actions/setup-java from 5.6.0 to 6.0.0 - #95
Conversation
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.6.0 to 6.0.0. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@v5.6.0...v6.0.0) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - uses: actions/setup-java@v5.6.0 | ||
| - uses: actions/setup-java@v6.0.0 |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
The build runs actions/setup-java from the mutable v6.0.0 tag. If that tag is repointed, a future pull-request workflow can execute attacker-controlled code with access to the runner and any available workflow credentials.
More details about this
actions/setup-java@v6.0.0 selects a mutable release tag rather than an immutable commit. The action owner can move v6.0.0 to a different commit without changing this workflow, so a future run could execute attacker-controlled code before ./gradlew ktlintCheck, ./gradlew detekt, and ./gradlew build --info run.
A plausible attack is:
- An attacker compromises the
actions/setup-javarelease process or gains control of thev6.0.0tag. - They repoint
v6.0.0to code that runs during theactions/setup-javastep and reads the checkout, environment, and available GitHub Actions credentials. - When this
Buildworkflow runs for a pull request, the malicious step can alter files or Gradle configuration before the./gradlewcommands execute, capture accessibleGITHUB_TOKENor repository secrets, and send them to an attacker-controlled server. - The workflow still appears to perform the normal Java setup and build, making the compromise difficult to notice. The same workflow also uses mutable references for
actions/checkout@v7andactions/upload-artifact@v7, creating additional moving trust dependencies.
To resolve this comment:
✨ Commit fix suggestion
| - uses: actions/setup-java@v6.0.0 | |
| - uses: actions/setup-java@<VERIFIED_VALUE_REQUIRED> |
View step-by-step instructions
- Replace the mutable
v6.0.0reference with the full 40-character commit SHA that corresponds to theactions/setup-javav6.0.0 release:uses: actions/setup-java@<40-character-commit-SHA>. - Keep the existing
withconfiguration unchanged. A commit SHA cannot be silently moved to different code, unlike a version tag or branch name. - Apply the same SHA-pinning format to the other third-party actions in this workflow, such as
actions/checkoutandactions/upload-artifact, if they are also not pinned to full 40-character commit SHAs.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.
You can view more details about this finding in the Semgrep AppSec Platform.
Bumps actions/setup-java from 5.6.0 to 6.0.0.
Release notes
Sourced from actions/setup-java's releases.
... (truncated)
Commits
dd06d9cPrepare documentation for v6 release (#1253)59b3450chore(deps): combine open Dependabot npm updates (#1252)b96213dSet default signature verification for supported distributions (#1246)1dbac3cdocs: expose contributing guide to GitHub (#1245)11741d6ci: constrain cache e2e job modes (#1244)ff99aa1Fix Oracle macOS E2E version (#1243)416c6d1Add Red Hat Build of OpenJDK support (#1241)5f75b27Add Maven dependency-resolution repositories (#1240)a42a52cAdd multiple Maven server credentials (#1239)fb4abd7test: cover JDK 26 from SDKMAN (#1238)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)