microsoft / microsoft/go

Double-check FIPS mode is enabled during FIPS mode test jobs

Open
#340 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

fips Test
Dominant language
Go
Stars
431
Forks
44
Avg merge
21h 18m
Merged PRs (30d)
30

Description

As of writing, https://github.com/microsoft/go-infra-images/blob/main/src/cbl-mariner/1.0.20211027/fips/Dockerfile sets GOLANG_FIPS=1, so we can use that image to test Go under FIPS mode. If FIPS mode engages but hits a problem (incompatible OpenSSL, bad changes in PR, etc.) we would know because Go would fail tests trying to initialize it.

Potential brittleness that could get through:

  • If GOLANG_FIPS=1 is renamed in the prereq image, or somehow not set properly, we wouldn't end up testing in FIPS mode in the Go repo. We'd just be running non-FIPS tests twice.
  • If the GOLANG_FIPS env variable is renamed in Go, or somehow not detected properly, we would be in the same situation.

We can manually confirm that FIPS tests are running by looking for "Passed" tests in the CI results UI that only run in FIPS mode, like TestUnreachable in https://github.com/microsoft/go/pull/324#issuecomment-996104548. Our CI should do something like that.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the FIPS test jobs and the prereq image's fips/Dockerfile, then inspect the FIPS-only TestUnreachable example and existing CI result handling. Done means CI reliably fails when FIPS mode is not actually engaged, including when GOLANG_FIPS is renamed or missing.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ci-cd, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.