Skip to content

fix(scripts/ironbank): rebuild bundled Terraform from source with Go 1.26.2#25219

Closed
Shelnutt2 wants to merge 1 commit into
mainfrom
ironbank/update-terraform-provider-versions
Closed

fix(scripts/ironbank): rebuild bundled Terraform from source with Go 1.26.2#25219
Shelnutt2 wants to merge 1 commit into
mainfrom
ironbank/update-terraform-provider-versions

Conversation

@Shelnutt2

@Shelnutt2 Shelnutt2 commented May 12, 2026

Copy link
Copy Markdown
Contributor

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.26.2 (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, built with Go 1.25.9). Add TERRAFORM_VERSION build arg.
  • build_ironbank.sh: Download Terraform source, compile with the project's Go toolchain (1.26.2), 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-18

Implementation context (Coder Agents generated)

Verification performed

  • Cloned Terraform v1.14.5 source and confirmed it builds successfully with Go 1.26.2
  • Resulting binary reports go1.26.2 via go version inspection
  • terraform-provider-coder v2.16.0 confirmed built with Go 1.25.9
  • SHA256 checksums verified for all artifacts
  • Terraform source tarball checksum: ac3faee7b1d301a4d12fe6b7f33b1ba57a183e080a2442f6f1466a30f257ba45

Go toolchain analysis

Component Before After
Terraform binary Go 1.19.4 (v1.3.7 pre-built) Go 1.26.2 (v1.14.5 built from source)
terraform-provider-coder Go ??? (v0.6.10) Go 1.25.9 (v2.16.0)
Coder binary Go 1.26.2 Go 1.26.2 (unchanged)

Related PRs (release branches)

@Shelnutt2 Shelnutt2 added the cherry-pick/v2.31 Needs to be cherry-picked to the 2.31 release branch label May 12, 2026
@Shelnutt2 Shelnutt2 marked this pull request as ready for review May 12, 2026 20:22
…1.26.2

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.26.2 (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, built
  with Go 1.25.9). Add TERRAFORM_VERSION build arg.
- build_ironbank.sh: Download Terraform source, compile with the
  project's Go toolchain (1.26.2), 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-18
@Shelnutt2 Shelnutt2 force-pushed the ironbank/update-terraform-provider-versions branch from b9589a6 to 689c775 Compare May 13, 2026 02:00
@Shelnutt2 Shelnutt2 changed the title fix(scripts/ironbank): upgrade bundled Terraform to 1.15.2 and provider to 2.16.0 fix(scripts/ironbank): rebuild bundled Terraform from source with Go 1.26.2 May 13, 2026
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 pushed a commit that referenced this pull request May 18, 2026
…1.25.10 (#25268)

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.

Supersedes #25248 which only did a version bump without source build.

### 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.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-37

> 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.10 (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.10 | Go 1.25.10 (unchanged) |

### Related PRs
- #25219 — main
- #25250 — release/2.33
- #25259 — release/2.32
- #25260 — release/2.31
- #25267 — release/2.29
</details>
f0ssel pushed a commit that referenced this pull request May 18, 2026
…1.25.9+ (#25267)

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.

On v2.29.x, both the Coder binary and the Terraform binary were compiled
with Go 1.25.8. The Coder binary's Go toolchain upgrade is handled
separately via go.mod changes. This commit addresses the Terraform
binary by building from source.

### 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, 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-48

> [!NOTE]
> Generated by Coder Agents

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

### Note on v2.29.x
v2.29.x is more severely affected than later branches: both the Coder
binary AND the Terraform binary were compiled with Go 1.25.8. The Coder
binary go.mod upgrade to 1.25.9+ is tracked separately (ENT-48). This PR
addresses the Terraform binary component.

### Go toolchain analysis
| Component | Before | After |
|-----------|--------|-------|
| Terraform binary | Go 1.19.4 (v1.3.7 pre-built) | Built from source
with project Go toolchain |
| terraform-provider-coder | old (v0.6.10) | Go 1.24.6 (v2.13.1) |
| Coder binary | Go 1.25.8 | Go 1.25.8 (unchanged by this PR) |

### Related PRs
- #25219 — main
- #25250 — release/2.33
- #25259 — release/2.32

</details>
@github-actions github-actions Bot added the stale This issue is like stale bread. label May 27, 2026
@github-actions github-actions Bot closed this May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/v2.31 Needs to be cherry-picked to the 2.31 release branch stale This issue is like stale bread.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant