Skip to content

Commit cea4e42

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

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+
stamp=$(go version -m "$bin" | grep -E 'GOFIPS140|DefaultGODEBUG|-tags=fips140' || true)
134+
echo "=== $bin"
135+
echo "$stamp"
136+
[[ "$stamp" == *"GOFIPS140=v1.0.0"* ]] || {
137+
echo "ERROR: $bin is not built against the validated FIPS module" >&2
138+
exit 1
139+
}
140+
[[ "$stamp" == *"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)