Skip to content

Commit 8b19508

Browse files
chore: [SVLS-6279] we expect no goboring for non fips builds
1 parent c596544 commit 8b19508

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

.gitlab/scripts/Dockerfile.go_agent.alpine.compile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,15 @@ RUN /usr/lib/go/bin/go tool nm datadog-agent | grep -w 'github.com/DataDog/datad
4848
(echo "agentVersionDefault variable doesn't exist" && exit 1)
4949

5050
RUN if [ "$FIPS" = "1" ]; then \
51-
/usr/lib/go/bin/go tool nm datadog-agent | grep -i 'crypto/internal/boring/sig.FIPSOnly' || \
52-
(echo "boringcrypto not enabled" && exit 1); \
53-
fi;
51+
/usr/lib/go/bin/go tool nm datadog-agent | grep -i 'crypto/internal/boring/sig.FIPSOnly' || \
52+
(echo "boringcrypto not enabled" && exit 1); \
53+
else \
54+
/usr/lib/go/bin/go tool nm datadog-agent | grep -i 'crypto/internal/boring/sig.FIPSOnly'; \
55+
if [ $? -eq 0 ]; then \
56+
echo "boringcrypto incorrectly enabled"; \
57+
exit 1; \
58+
fi; \
59+
fi
5460

5561
RUN strip datadog-agent
5662
RUN arch="$(uname -m)"; \

.gitlab/scripts/Dockerfile.go_agent.compile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ RUN /usr/local/go/bin/go tool nm datadog-agent | grep -w 'github.com/DataDog/dat
4949
(echo "agentVersionDefault variable doesn't exist" && exit 1)
5050

5151
RUN if [ "$FIPS" = "1" ]; then \
52-
/usr/local/go/bin/go tool nm datadog-agent | grep -i 'crypto/internal/boring/sig.FIPSOnly' || \
53-
(echo "boringcrypto not enabled" && exit 1); \
54-
fi;
52+
/usr/local/go/bin/go tool nm datadog-agent | grep -i 'crypto/internal/boring/sig.FIPSOnly' || \
53+
(echo "boringcrypto not enabled" && exit 1); \
54+
else \
55+
/usr/local/go/bin/go tool nm datadog-agent | grep -i 'crypto/internal/boring/sig.FIPSOnly'; \
56+
if [ $? -eq 0 ]; then \
57+
echo "boringcrypto incorrectly enabled"; \
58+
exit 1; \
59+
fi; \
60+
fi
5561

5662
RUN strip datadog-agent
5763
RUN if [ "$arch" = "x86_64" ]; then apt-get install -y upx=3.96-r0 && upx -1 /datadog-agent; fi

0 commit comments

Comments
 (0)