Skip to content

Commit 64d6741

Browse files
committed
fix(container): make source tree world-readable for non-root coverage
The fuzzing platform runs containers as UID 65534 (nobody). Source files and build artifacts copied from the builder stage were only readable by root, causing llvm-cov to emit "Permission denied" for every file during HTML report generation. - Move CRS into /home/fuzzer/aztec-packages/.bb-crs so one chmod covers source tree, build-fuzzing-cov, and CRS in a single layer - Replace chmod -R 755 with chmod -R a+rX (adds read for all, execute only on dirs and already-executable files — no over-grant on data)
1 parent 44c4a29 commit 64d6741

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

container-builds/fuzzing-container/src/Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,15 @@ WORKDIR /home/fuzzer/aztec-packages/barretenberg/cpp
104104
# Copy full cov-build to keep LLVM links and external dependencies for coverage report
105105
COPY --from=builder /home/fuzzer/aztec-packages/barretenberg/cpp/build-fuzzing-cov/ ./build-fuzzing-cov/
106106

107-
# Copy CRS to a world-readable location so non-root containers can access it
108-
COPY --from=builder /root/.bb-crs /opt/bb-crs
109-
RUN chmod -R 755 /opt/bb-crs
110-
ENV CRS_PATH=/opt/bb-crs
107+
# Copy CRS into the source tree so one chmod covers everything
108+
COPY --from=builder /root/.bb-crs /home/fuzzer/aztec-packages/.bb-crs
109+
ENV CRS_PATH=/home/fuzzer/aztec-packages/.bb-crs
110+
111+
# The container runs as a non-root UID (65534/nobody) on the fuzzing platform.
112+
# Source files, build artifacts, and CRS must be world-readable so llvm-cov
113+
# can read them when generating HTML coverage reports. Without this, llvm-cov
114+
# emits "Permission denied" for every source file and produces empty reports.
115+
RUN chmod -R a+rX /home/fuzzer/aztec-packages/
111116

112117
# Copy flattened target binaries
113118
COPY --from=builder /targets/ /targets/

0 commit comments

Comments
 (0)