Skip to content

SSCSI-98: Add required go build flags for FIPS #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2025

Conversation

chiragkyal
Copy link
Member

Description:

  • Enable FIPS-compliant builds via GOEXPERIMENT=strictfipsruntime, CGO_ENABLED=1, and appropriate build tags.
    • -tags "strictfipsruntime,openssl"
  • Update Dockerfile to print Go module build info using go version -m.

The change will modify the make build target from

go build -trimpath -ldflags ...

to

CGO_ENABLED=1 GOEXPERIMENT=strictfipsruntime go build -trimpath -tags strictfipsruntime,openssl -ldflags ...

CI Changes

Note: Currently, we're relying on the ART golang builder to intercept the non-compliant flags forcefully. This PR is intended to make the binary FIPS compliant by default.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 19, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented May 19, 2025

@chiragkyal: This pull request references SSCSI-98 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

Description:

  • Enable FIPS-compliant builds via GOEXPERIMENT=strictfipsruntime, CGO_ENABLED=1, and appropriate build tags.
    • -tags "strictfipsruntime,openssl"
  • Update Dockerfile to print Go module build info using go version -m.

The change will modify the make build target from

go build -trimpath -ldflags ...

to

CGO_ENABLED=1 GOEXPERIMENT=strictfipsruntime go build -trimpath -tags strictfipsruntime,openssl -ldflags ...

CI Changes

Note: Currently, we're relying on the ART golang builder to intercept the non-compliant flags forcefully. This PR is intended to make the binary FIPS compliant by default.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from mytreya-rh and TrilokGeer May 19, 2025 06:54
@chiragkyal
Copy link
Member Author

/hold
for openshift/release#64430

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 19, 2025
@chiragkyal
Copy link
Member Author

/assign @arkadeepsen @mytreya-rh

@chiragkyal
Copy link
Member Author

/test all

@chiragkyal
Copy link
Member Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 21, 2025
@mytreya-rh
Copy link

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2025
Copy link
Contributor

openshift-ci bot commented May 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chiragkyal, mytreya-rh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 21, 2025
@chiragkyal
Copy link
Member Author

/retest

@emmajiafan
Copy link

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label May 26, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented May 26, 2025

@chiragkyal: This pull request references SSCSI-98 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

Description:

  • Enable FIPS-compliant builds via GOEXPERIMENT=strictfipsruntime, CGO_ENABLED=1, and appropriate build tags.
    • -tags "strictfipsruntime,openssl"
  • Update Dockerfile to print Go module build info using go version -m.

The change will modify the make build target from

go build -trimpath -ldflags ...

to

CGO_ENABLED=1 GOEXPERIMENT=strictfipsruntime go build -trimpath -tags strictfipsruntime,openssl -ldflags ...

CI Changes

Note: Currently, we're relying on the ART golang builder to intercept the non-compliant flags forcefully. This PR is intended to make the binary FIPS compliant by default.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-merge-bot openshift-merge-bot bot merged commit aca8e37 into openshift:main May 26, 2025
12 of 13 checks passed
Copy link
Contributor

openshift-ci bot commented May 26, 2025

@chiragkyal: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@chiragkyal chiragkyal deleted the add-fips branch May 26, 2025 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants