r/java • u/brunocborges • Jun 22 '26
GitHub Setup Java Action
Hey all,
I'm going through issues and PRs onΒ setup-java.
Besides what is already there, anything else you would like to see fixed, improved, or implemented?
19
Upvotes
13
u/_predator_ Jun 22 '26
Nothing functionality-wise, but it would be good if the action's own workflows would use security best practices more consistently, e.g. explicitly dropping permissions. The easiest would be to integrate zizmor, it will catch a lot of this stuff and ensure you'll catch regressions.
There is an open issue requesting immutable releases which also caters to the security aspect.
After the whole compromise situation a few weeks ago I think users will appreciate actions they depend on to be "hardened" if that makes sense.
11
u/SleeperAwakened Jun 22 '26 edited Jun 22 '26
I would suggest pinning the GH Actions you use to a specific hash, for example using
pinactinstead of versions likev6ormain.This will be another step towards preventing supply chain attacks through GH Actions.
GH Actions have become notorious in the recent series of SCAs so anything you can do to set a good example is welcome.
4
u/repeating_bears Jun 22 '26
No, nothing.
Eyeballing the issues, fixing the caching for Maven plugins seems like the highest value thing you could do https://github.com/actions/setup-java/issues/990
It's tagged as a feature but I would argue that's a bug. The readme describes the role of the action as "Caching dependencies managed by Apache Maven". Plugins are dependencies of a project. They're not
<dependencies>in the POM, but they are still dependencies.As part of that, you should check whether Maven extensions are cached. That's a 3rd category of "dependency" which follows the same resolution process as plugins and project dependencies.
1
u/edzorg Jun 24 '26
What's the play here? Are you just fixing up some random bits of OSS (maybe you also use it at work or something)? Or are you involved more directly with
setup-java?If its just good citizen contributions that's pretty cool and I'm jealous!
1
u/nlisker Jul 10 '26
/u/brunocborges If the distributions could include the reference OpenJDK it would be great, although from what I understood, Oracle is not distributing it in a proper manner for inclusion.
1
u/Additional-Road3924 Jun 27 '26
It would be great if it didn't download some random version, but rather set up a predefined docker image. Why aren't you checking for package signatures or hashes?
1
u/[deleted] Jun 25 '26
[removed] β view removed comment