Run the Gradle build as a non-root user #400
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 209 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.320
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #400"
general
weight: 0.35
pacmano1
The
builderstage in the rootDockerfilehas noUSERdirective, so Gradle runs as root. Root ignores POSIX permission bits, which breaksLog4jMigrationsTest.testMigrateLog4jFailsGracefullyWithReadOnlyFile— that test chmods a file read-only and asserts a write fails, but as root the write succeeds.The practical effect is that a from-scratch
docker buildof the published Dockerfile either fails on that test, or has to be run with tests skipped — so the image build loses its test signal.This drops to the
ubuntuuser (uid 1000) thatubuntu:noblealready ships, rather than creating a new one — it's the same account the runner stages already rename toengine.Notes on the details:
chown ubuntu:ubuntu /apphappens afterapt-get, which still needs root.$HOME/.sdkman; Docker setsHOME=/home/ubuntuonceUSER ubuntuis active, so no sdkman path changes were needed./root/.gradle/...to/home/ubuntu/.gradle/...withuid=1000,gid=1000.libnative-platform.sointo~/.gradle/native, outside both mounts. A plainmkdir -p /home/ubuntu/.gradlelayer before the build covers that. Without it the build fails withCould not initialize native services > Failed to load native library 'libnative-platform.so' for Linux aarch64.Verified on
linux/arm64with tests enabled (no skip flags): 636 tests, 0 failures, 0 errors, including all fourLog4jMigrationsTestcases. The runner stage is untouched and the final image size is unchanged.