Skip to content

fix(scripts/ironbank): rebuild bundled Terraform from source with Go 1.25.10#25250

Merged
f0ssel merged 1 commit into
release/2.33from
fix/ironbank-terraform-go-toolchain-v2.33
May 18, 2026
Merged

fix(scripts/ironbank): rebuild bundled Terraform from source with Go 1.25.10#25250
f0ssel merged 1 commit into
release/2.33from
fix/ironbank-terraform-go-toolchain-v2.33

Conversation

@coder-tasks
Copy link
Copy Markdown
Contributor

@coder-tasks coder-tasks Bot commented May 13, 2026

Build Terraform from source during the IronBank image build instead of downloading pre-built binaries from HashiCorp. This controls the Go toolchain version, ensuring Go stdlib CVEs (1 Critical, 5 High, 3 Medium) fixed in Go 1.25.9 are addressed in the bundled Terraform binary.

No upstream Terraform release (including 1.14.9 and 1.15.2) is compiled with Go 1.25.9+; all use Go 1.25.8. Building from source with GOTOOLCHAIN=go1.25.10 (read from go.mod) is the only path forward without waiting for an upstream toolchain bump.

Changes:

  • hardening_manifest.yaml: Replace pre-built Terraform 1.3.7 binary with Terraform 1.14.5 source tarball (matches install.go). Update terraform-provider-coder from 0.6.10 to 2.16.0 (matches go.mod).
  • build_ironbank.sh: Download Terraform source, compile with the project's Go toolchain (1.25.10), package as terraform.zip. Add go to dependencies. Update base image to UBI9.
  • Dockerfile: Update base image from UBI8 8.7 to UBI9 9.6. Remove python3-urllib3 to address CVE-2026-44431.

Refs ENT-30

Note

Generated by Coder Agents

Context and decision log

Problem

The bundled Terraform binary in v2.33.x IronBank images was compiled with Go 1.25.8, exposing 9 CVEs. No upstream Terraform release uses Go 1.25.9+:

Terraform Version Go Toolchain
1.14.5 go1.25.6
1.14.9 go1.25.8
1.15.2 go1.25.8

Approach chosen

Build Terraform from source instead of downloading pre-built binaries, using GOTOOLCHAIN=go<version from go.mod> to pin the Go toolchain. Verified this produces a binary with go1.25.10 embedded.

Why not just update the Terraform version?

Even the latest Terraform (1.15.2) is compiled with Go 1.25.8. Updating to a newer version alone does not resolve the CVEs.

Additional fixes included

  • UBI9 base image migration (aligns with IronBank UBI9 adoption)
  • python3-urllib3 removal (CVE-2026-44431)
  • Provider version sync (0.6.10 -> 2.16.0 to match go.mod)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label May 13, 2026
@Shelnutt2 Shelnutt2 added dependencies Pull requests that update a dependency file cherry-pick/v2.33 and removed community Pull Requests and issues created by the community. labels May 13, 2026
…1.25.10

Build Terraform from source during the IronBank image build instead of
downloading pre-built binaries from HashiCorp. This controls the Go
toolchain version, ensuring Go stdlib CVEs (1 Critical, 5 High, 3
Medium) fixed in Go 1.25.9 are addressed in the bundled Terraform
binary.

No upstream Terraform release (including 1.14.9 and 1.15.2) is compiled
with Go 1.25.9+; all use Go 1.25.8. Building from source with
GOTOOLCHAIN=go1.25.10 (read from go.mod) is the only path forward
without waiting for an upstream toolchain bump.

Changes:
- hardening_manifest.yaml: Replace pre-built Terraform 1.3.7 binary with
  Terraform 1.14.5 source tarball (matches install.go). Update
  terraform-provider-coder from 0.6.10 to 2.16.0 (matches go.mod).
- build_ironbank.sh: Download Terraform source, compile with the
  project's Go toolchain (1.25.10), package as terraform.zip. Add go to
  dependencies. Update base image to UBI9.
- Dockerfile: Update base image from UBI8 8.7 to UBI9 9.6. Remove
  python3-urllib3 to address CVE-2026-44431.

Refs ENT-30
f0ssel pushed a commit that referenced this pull request May 13, 2026
…1.25.9 (#25260)

Build Terraform from source during the IronBank image build instead of
downloading pre-built binaries from HashiCorp. This controls the Go
toolchain version, ensuring Go stdlib CVEs (1 Critical, 5 High, 3
Medium) fixed in Go 1.25.9 are addressed in the bundled Terraform
binary.

No upstream Terraform release is compiled with Go 1.25.9+; all use Go
1.25.8. Building from source with GOTOOLCHAIN=go1.25.9 (read from
go.mod) is the only path forward without waiting for an upstream
toolchain bump.

### Changes
- **hardening_manifest.yaml**: Replace pre-built Terraform 1.3.7 binary
with Terraform 1.14.5 source tarball (matches `install.go`). Update
terraform-provider-coder from 0.6.10 to 2.13.1 (matches `go.mod`). Add
`TERRAFORM_VERSION` build arg.
- **build_ironbank.sh**: Download Terraform source, compile with the
project's Go toolchain (1.25.9), package as terraform.zip. Add `go` to
dependencies. Update base image to UBI9.
- **Dockerfile**: Update base image from UBI8 8.7 to UBI9 9.6. Remove
python3-urllib3 to address CVE-2026-44431.

Refs ENT-1

> [!NOTE]
> Generated by Coder Agents

<details>
<summary>Implementation context (Coder Agents generated)</summary>

### Go toolchain analysis
| Component | Before | After |
|-----------|--------|-------|
| Terraform binary | Go 1.19.4 (v1.3.7 pre-built) | Go 1.25.9 (v1.14.5
built from source) |
| terraform-provider-coder | old (v0.6.10) | Go 1.24.6 (v2.13.1) |
| Coder binary | Go 1.25.9 | Go 1.25.9 (unchanged) |

### Related PRs
- #25219 — main
- #25250 — release/2.33
- #25259 — release/2.32
</details>
@f0ssel f0ssel merged commit 868fa09 into release/2.33 May 18, 2026
31 checks passed
@f0ssel f0ssel deleted the fix/ironbank-terraform-go-toolchain-v2.33 branch May 18, 2026 16:32
@github-actions github-actions Bot locked and limited conversation to collaborators May 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cherry-pick/v2.33 dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants