Repository navigation
feat: support for Go's native FIPS 140-3 module - #4522
Conversation
Taking this over for review. Pulling the branch, reading the diff against |
itxaka-agent
left a comment
There was a problem hiding this comment.
Automated triage agent (
kairos-triage-agent) running as@itxaka-agent.
This comment was generated by software. A human maintainer can override
any action taken here.
Verdict: changes-requested.
The FIPS migration itself is sound. Dropping the arm64 cross-compiler install and CC=aarch64-linux-gnu-gcc is safe since these builds already run with CGO_ENABLED=0, and the new verify-fips Makefile target does propagate a non-zero exit correctly and fails closed when the dist directory is empty or missing.
Two blocking findings are inline on the diff below: the deleted osv-scanner normalization step in release-scan.yml only covers half of the case it used to filter (a nodwarf5-suffixed version from the bundled edgevpn binary is untouched by this PR and would still trip the release gate), and the new --fips validation check in kairos-init/pkg/validation/validate.go can never run because --fips is registered as a local flag on the root command, not passed through to the validate subcommand. Two smaller riders: kcrypt/.goreleaser.yaml drops CGO_LDFLAGS="-ldl" from the non-FIPS build too, outside this PR's stated scope, and there's a stray extra blank line in the Makefile.
No new tests are owed here (rule 14): this is CI/build-config work verified by the new verify-fips target running in CI, not by Go unit tests. The one Go code change in validate.go has no practical unit-test seam without a larger refactor, so the review asks for the flag to be reachable rather than for new test coverage.
One residual uncertainty I could not close from this workspace: I cannot confirm offline that a Go 1.26.8 binary built with GOFIPS140=v1.0.0 actually emits the exact go version -m substrings the new verify-fips check greps for (GOFIPS140=v1.0.0 and a DefaultGODEBUG= line containing fips140=on). The check is fail-closed, so a mismatched pattern would turn the FIPS build matrix red rather than pass silently -- worth a first real CI run to confirm.
e22609b to
0d520fe
Compare
Audit summary -- round 0
Findings (all posted inline on the diff)
No new tests were requested (rule 14): this is CI/build-config work verified by the PR's own new The PR stays assigned to nobody and unmerged; this ticket moves to |
Signed-off-by: klaymen47 <klaymen47@gmail.com>
0d520fe to
9f46904
Compare
itxaka-agent
left a comment
There was a problem hiding this comment.
Automated triage agent (
kairos-triage-agent) running as@itxaka-agent.
This comment was generated by software. A human maintainer can override
any action taken here.
Round 1 review. Three of the four round-0 findings are resolved: the unreachable --fips validation branch is gone (replaced with an accurate TODO), the double blank line in the Makefile is fixed, and the kcrypt/.goreleaser.yaml CGO_LDFLAGS="-ldl" removal turns out to be correctly scoped after all (my round-0 read of that hunk was wrong โ it stays on the default build). One finding is still open: the Normalize GOEXPERIMENT stdlib versions step in release-scan.yml is still deleted outright rather than narrowed, and it still guards a real case (the prebuilt edgevpn binary) that this PR doesn't touch.
Audit trail โ round 1
Round 1 re-reviewed the branch after two force-pushes (
One finding carries over unresolved, posted inline again this round:
Ticket stays in |
@Itxaka @klaymen47 โ you're right, my round-1 finding was wrong. Verified locally with Go 1.25.4: The Retracting the round-1 finding and approving in the next comment. Apologies for the noise. |
itxaka-agent
left a comment
There was a problem hiding this comment.
Automated triage agent (
kairos-triage-agent) running as@itxaka-agent.
This comment was generated by software. A human maintainer can override any action taken here.
Retracting the round-1 Normalize GOEXPERIMENT stdlib versions finding โ verified locally that GOFIPS140 does not append X:... to the Go version string, so the normalize step has nothing to normalize and the deletion is correct. See the comment I just posted for the empirical trace.
All prior findings are addressed. No blocking issues remain from my side; approving.
good bot |
The reviewer is read-only on purpose. It cannot compile anything, so any finding whose truth depends on how a compiler or linker actually behaves at build time was previously reasoned-out from source-reading and shipped as a live blocker. That failure mode just cost us a wrong review on kairos-io/kairos#4522: the reviewer said the `Normalize GOEXPERIMENT stdlib versions` step in release-scan.yml would keep needing to run under GOFIPS140, the author built the bundle locally and posted 7 binaries with no version suffix, and Itxaka asked us to verify locally. The claim was already contradicted by empirical output the reviewer had read; the review shipped anyway because we had no path from "reviewer suspects X" to "toolchain observably does X" other than the reviewer's own reasoning. Add a fifth role, `kairos-triage-builder`. It gets Bash, reads one `build_claim` per invocation, writes the smallest possible program that either confirms or contradicts the claim, and reports what its output actually says. The reviewer flags a finding with `needs_build_verification: true` and a testable `build_claim` sentence; the manager dispatches the builder before publication and routes the verdict: - confirmed -> the finding survives and the builder's one-line goes into the published comment as evidence - contradicted -> the finding is dropped, the audit trail records the retraction, the PR author never sees the wrong claim - inconclusive -> the finding is dropped for this round with a note and can be re-raised next round with more context Also promote `changes-requested` to `approve` when all the round's findings get dropped this way, so a review whose sole blocker was a toolchain misread ends up approved instead of stuck at awaiting-author. Ships: - .claude/agents/kairos-triage-builder.md - rule 9b in RULES.md - `needs_build_verification` + `build_claim` in the reviewer verdict JSON - builder dispatch step in the manager's reviewing phase - roles.builder_wallclock_seconds config knob (default 900) - entry in docs/agent-roles.md Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
|
Triage: approved with the whole matrix green except two cells, and neither is your diff. Both died in the harness before a single spec ran.
Worth noting for the reviewers that |
|
Picking this up for QA. |
QA Result: PASS
Summary: the migration works and the new gate is genuinely load-bearing. Verified on a booted and installed FIPS node, not only in the build. Step 1: the
|
Every other setup step in this script goes through the retry helper, but the cluster create does not. It is the step that fails: on #4522 docker refused to start the k3s server container, and the encryption cell went red before a single spec ran. k3d rolls its own creation back on failure, so the retry starts from a clean slate rather than from a half-built cluster. Signed-off-by: ci-robbot <ci-robbot@users.noreply.github.com> Co-authored-by: ci-robbot <ci-robbot@users.noreply.github.com>


This PR implements #4502.
Since Go's native FIPS module does not rely on CGO at all, I've also done some cleanup related to cross-compiling FIPS for arm64 and the C toolchain itself.
One important limitation - I've only added the metadata check for whether FIPS module is enabled or not. The runtime check is still to be done - I think it's best to implement it under a separate issue. This approach allows for this particular PR to focus mostly on build/CI-related matters.
Same goes for riscv64 support which is mentioned in #4419.
Please kindly review and provide your feedback :)