Skip to content

Commit b39ea16

Browse files
kruskallmergify[bot]
authored andcommitted
fix(fips): resolve failing stig check (#21435)
* fix(fips): resolve failing stig check * Update Dockerfile.fips (cherry picked from commit 31898f8)
1 parent 1c16938 commit b39ea16

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packaging/docker/Dockerfile.fips

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN --mount=type=cache,target=/root/go/pkg/mod \
1717
COPY --chmod=0644 apm-server-fips.yml ./apm-server.yml
1818
RUN sed -i 's/127.0.0.1:8200/0.0.0.0:8200/' apm-server.yml
1919
RUN sed -i 's/localhost:9200/elasticsearch:9200/' apm-server.yml
20+
RUN rm -f empty && touch empty
2021

2122
################################################################################
2223
# Build stage 1
@@ -69,6 +70,12 @@ ENV LIBBEAT_MONITORING_CGROUPS_HIERARCHY_OVERRIDE=/
6970
# running in Docker.
7071
ENV BEAT_STRICT_PERMS=false
7172

73+
# STIG V-203716 requires that "The operating system must prohibit user installation
74+
# of system software without explicit privileged status." but this requirement does not
75+
# always apply cleanly to all base images, particularly Chainguard Static.
76+
# Since /usr/lib contains no files, the check fails, so we add an empty root-owned file to satisfy it.
77+
COPY --chmod=0755 --chown=0:0 --from=builder /src/empty /usr/lib/empty
78+
7279
COPY --chmod=0644 --chown=nonroot:nonroot licenses/ELASTIC-LICENSE-2.0.txt /licenses/
7380
COPY --chmod=0644 --chown=nonroot:nonroot NOTICE-fips.txt /licenses/NOTICE.txt
7481

0 commit comments

Comments
 (0)