Skip to content

fix: use Microsoft Go for FIPS-compliant release builds - #1887

Merged
Alex Leites (tallaxes) merged 4 commits into
mainfrom
tallaxes/fips-ms-go
Sep 3, 2026
Merged

Alex Leites (tallaxes) merged 4 commits into
mainfrom
tallaxes/fips-ms-go

Conversation

@tallaxes

@tallaxes Alex Leites (tallaxes) commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Configure the shared dependency setup action to download the Go toolchain from the Microsoft Go distribution while continuing to resolve the version from go.mod. This ensures release builds use Microsoft Go systemcrypto/OpenSSL on Linux. Also update the toolchain cache namespace to avoid collisions with caches produced by the standard Go distribution.

The Microsoft shortlink redirects to download.visualstudio.microsoft.com (with download.microsoft.com also allowed), so all blocked HardenRunner workflows using the shared installer permit the redirect targets.

Update the pinned Azure Linux 3 distroless base image digest to the newer 3.0.20260809 release.

How was this change tested?

  • actionlint on the edited workflows
  • git diff --check
  • Verified the Microsoft Go redirect chain and Azure Linux base image manifest digest.

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

Release Note

NONE

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 3, 2026 01:34
@tallaxes Alex Leites (tallaxes) changed the title Use Microsoft Go for FIPS-compliant release builds fix: use Microsoft Go for FIPS-compliant release builds Sep 3, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟑 Changes recommended

The workflow change can fail when go.mod pins a Go version that no longer matches the Microsoft β€œlatest” endpoint due to removing check-latest: true.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the shared GitHub composite action used for dependency/toolchain setup so that release builds install Go from Microsoft’s official distribution endpoint (to support FIPS-compliant builds using systemcrypto/OpenSSL on Linux).

Changes:

  • Configures actions/setup-go to download Go from https://aka.ms/golang/release/latest.
  • Updates the toolchain cache key to avoid collisions with caches produced by the non-Microsoft Go distribution.
File summaries
File Description
.github/actions/install-deps/action.yaml Switches setup-go download source to Microsoft Go and updates the toolchain cache key accordingly.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

πŸ’‘ Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 3, 2026 01:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟒 Approval recommended

The changes are narrowly scoped to CI/toolchain configuration and an image digest update, and the repo’s workflows consistently use the shared install-deps action.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 01:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟑 Changes recommended

Harden-runner allowlists add aka.ms but omit the typical redirect target (download.microsoft.com), which can break Go toolchain downloads under egress-policy: block.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

Previously missed (1) β€” in code that hasn't changed since the last review.

.github/actions/install-deps/action.yaml:15

  • Severity: High | Category: Security β€” go-download-base-url: https://aka.ms/golang/release/latest uses a redirecting shortlink; the actual Microsoft Go binaries are commonly served from download.microsoft.com. Any workflow using harden-runner with egress-policy: block will need to allowlist the redirect target (and any other redirect host) or actions/setup-go can fail when it tries to fetch the toolchain.

Update the harden-runner allowed-endpoints lists accordingly (notably .github/workflows/e2e.yaml currently has aka.ms:443 but not download.microsoft.com:443).

  • Files reviewed: 7/7 changed files
  • Comments generated: 5
  • Review effort level: Lite

Comment thread .github/workflows/ci-test.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/codeql-analysis.yml Resolved
Comment thread .github/workflows/deflake.yml Resolved
Comment thread .github/workflows/label-sync.yaml Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 02:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟑 Changes recommended

The install-deps action now follows aka.ms redirects for Go downloads, but the egress-blocked E2E workflow allowlist is not updated to permit the redirect target hosts, which will break E2E runs.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

Previously missed (1) β€” in code that hasn't changed since the last review.

.github/workflows/label-sync.yaml:26

  • Severity: Low | Category: Correctness β€” The allowed-endpoints list contains duplicated entries (azure.archive.ubuntu.com, packages.microsoft.com, esm.ubuntu.com). This makes the allowlist harder to audit and maintain, especially now that more endpoints are being added for Microsoft Go downloads.
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

@tallaxes
Alex Leites (tallaxes) merged commit e32246d into main Sep 3, 2026
16 checks passed
@tallaxes
Alex Leites (tallaxes) deleted the tallaxes/fips-ms-go branch September 3, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants