Skip to content

Commit 64e2124

Browse files
fix(fips): resolve failing stig check (#21435) (#21436)
* fix(fips): resolve failing stig check * Update Dockerfile.fips (cherry picked from commit 31898f8) Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com>
1 parent 5f33aba commit 64e2124

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
@@ -59,6 +60,12 @@ ENV LIBBEAT_MONITORING_CGROUPS_HIERARCHY_OVERRIDE=/
5960
# running in Docker.
6061
ENV BEAT_STRICT_PERMS=false
6162

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

0 commit comments

Comments
 (0)