Skip to content

Commit 7cda2f2

Browse files
committed
Verify the FIPS module in released binaries
1 parent 75020a5 commit 7cda2f2

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

‎.github/workflows/release-build.yml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,31 @@ jobs:
124124
echo
125125
done
126126
127+
- name: Verify FIPS module in binaries
128+
run: |
129+
shopt -s nullglob
130+
count=0
131+
for bin in dist/*/databricks dist/*/databricks.exe; do
132+
count=$((count + 1))
133+
info=$(go version -m "$bin")
134+
echo "=== $bin"
135+
echo "$info" | grep -E 'GOFIPS140|DefaultGODEBUG|-tags=fips140' || true
136+
echo "$info" | grep -q 'GOFIPS140=v1.0.0' || {
137+
echo "ERROR: $bin is not built against the validated FIPS module" >&2
138+
exit 1
139+
}
140+
echo "$info" | grep -q 'DefaultGODEBUG=fips140=on' || {
141+
echo "ERROR: $bin does not enable FIPS mode by default" >&2
142+
exit 1
143+
}
144+
done
145+
# Without this the loop is a no-op when the glob matches nothing.
146+
if [ "$count" -eq 0 ]; then
147+
echo "ERROR: no binaries found under dist/" >&2
148+
exit 1
149+
fi
150+
echo "verified $count binaries"
151+
127152
- name: Stage bundle JSON schema for upload
128153
run: cp bundle/schema/jsonschema.json dist/
129154

0 commit comments

Comments
 (0)