Skip to content

feat(cli): enable GCP Shielded VM (Secure Boot) by default#3450

Merged
louisgv merged 1 commit into
mainfrom
gcp-secure-boot-default
Jun 6, 2026
Merged

feat(cli): enable GCP Shielded VM (Secure Boot) by default#3450
louisgv merged 1 commit into
mainfrom
gcp-secure-boot-default

Conversation

@spa-the-spawn-maintainer

Copy link
Copy Markdown
Contributor

What

Make GCP Shielded VM the default for every spawned GCP instance — Secure Boot + vTPM + integrity monitoring are now enabled automatically:

--shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring

This is what the Cloudflare (CF) skill needs to attest the VM, and it's good security hygiene for all spawns. GCP's default Ubuntu LTS images are Shielded-VM-compatible, so boots are unaffected.

Opt out

spawn claude gcp --no-secure-boot

The new --no-secure-boot flag sets GCP_NO_SECURE_BOOT=1, for the rare custom image that isn't UEFI/Secure-Boot-capable.

Why GCP only

Per discussion, default-on was requested for GCP and AWS. GCP is done here. AWS is not technically possible as-is: spawn's AWS provider runs on Lightsail, whose CreateInstances API exposes no Secure Boot / UEFI / NitroTPM option (that's EC2-only). Honoring "default-on for AWS" would require migrating the AWS provider from Lightsail → EC2 — a separate, much larger change. The flag is a no-op on non-GCP clouds.

Changes

  • packages/cli/src/gcp/gcp.ts — new pure buildShieldedArgs() helper (env-gated), spliced into createInstance args
  • packages/cli/src/flags.ts — register --no-secure-boot in KNOWN_FLAGS
  • packages/cli/src/index.ts — extract --no-secure-bootGCP_NO_SECURE_BOOT=1; add --help line
  • README.md — flags table row + "Secure Boot (GCP)" section
  • tests — gcp-cov.test.ts (default-on / opt-out / exact-value-match) + unknown-flags.test.ts (flag registration)

Testing

  • bun test — all 2269 tests pass
  • bunx @biomejs/biome check packages/cli/src/ packages/shared/src/ — clean (matches CI)

Filed from Slack by Spa

Provision every GCP instance as a Shielded VM (Secure Boot + vTPM +
integrity monitoring) by default. This is what the Cloudflare (CF) skill
needs to attest the VM, and is good hygiene for all spawns. GCP's default
Ubuntu LTS images are Shielded-VM-compatible, so boots are unaffected.

Opt out with the new --no-secure-boot flag (sets GCP_NO_SECURE_BOOT=1)
for custom images that are not UEFI/Secure-Boot-capable.

Secure Boot is GCP-only here; AWS spawns run on Lightsail, which does not
expose Secure Boot, so the flag is a no-op on other clouds.
@louisgv louisgv merged commit 5328205 into main Jun 6, 2026
6 checks passed
@louisgv louisgv deleted the gcp-secure-boot-default branch June 6, 2026 05:08
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.

1 participant