Repository navigation
fix: [APPSEC-327] run Docker formatter without root privileges - #282
Merged
Merged
Conversation
JimmyPettersson85
previously approved these changes
Nov 10, 2026
Added Java 11 setup step to CI workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Docker formatter defaults to root. Run it as an unprivileged formatter account and keep Gradle's writable cache under /tmp. The Makefile passes the host UID/GID so formatting can update bind-mounted source files without creating root-owned files on Linux.
Install shadow-utils to create the account and findutils because the current amazoncorretto:11 base lacks xargs, which the Gradle wrapper requires. The base image and Java version are unchanged.
Pin the PR CI workflow to Amazon Corretto 11 with actions/setup-java. The runner's default Java 25 cannot execute this repository's Gradle 8.4; Java 11 also matches the existing project toolchain and formatter image.
Validation:
Trivy DS-0002 passes. The Java 25 / Gradle 8.4 CI startup failure is addressed by the explicit Java 11 setup step.
GitHub CI passes: formatting, Javadoc and jacocoTestReport/full test suite on Java 11, plus CodeQL.