Skip to content

security: spored signing key (kms:Sign) depends on a hand-managed GitHub OIDC role whose trust scope isn't in code #1601

Closed

Description

@scttfrdmn

From the pre-1.0 security audit (spore-host/spore-host#649, 2026-11-11), audit id secrets-12. Verified: plausible, severity info (reviewer said info).

Where: .github/workflows/release.yaml:87 (at origin/main on 2026-11-11)

Evidence

release.yaml:3-6 is triggered on push tags v*, id-token: write; :87 role-to-assume: arn:aws:iam::966362334030:role/GitHubActions-spore-host-release; :118 and :190 run aws kms sign. CHANGELOG.md:473 calls the role "hand-managed". pkg/sporedinstall/install.go:40-46: this key is the only authenticity root for spored on every instance. The signature covers only the binary bytes, not version or path (install.go:349-372), so an older signed spored can be replayed into a newer versions// path.

Scenario

If the role's trust allows sub repo:spore-host/spawn:* rather than tag refs or a protected environment, any branch workflow (a maintainer branch, a compromised Dependabot PR branch in the same repo) can obtain kms:Sign. It could then sign a malicious spored that every instance accepts as authentic, and anyone with bucket write could also downgrade instances.

Verifier

spawn/.github/workflows/release.yaml:3-6 is triggered by v* tags and :87,:348 assume GitHubActions-spore-host-release, with no environment: gate. deploy-lambdas.yaml does use 'environment: production', bound to that environment's OIDC sub. The role's trust policy is not in code, so whether sub is pinned to tag refs cannot be determined statically. The replay half overlaps supply-7.

Suggested fix

Pin the trust to repo:spore-host/spawn:ref:refs/tags/v* (or an environment with required reviewers), condition kms:Sign on that role only, and sign a manifest that binds version and filename to the hash.

Deployed-state check

Run aws iam get-role --role-name GitHubActions-spore-host-release in 966362334030. Inspect the token.actions.githubusercontent.com:sub condition and the KMS key policy for alias/spored-signing (who can kms:Sign).

Also raised as: supply-1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions