Skip to content

pipeline-orchestrator installs spored without signature verification, outside the verified-installer gate #1173

Closed

Description

@scttfrdmn

Summary

The pipeline orchestrator Lambda generates stage user-data that installs spored with its own inline curl, not with pkg/sporedinstall. That path checks a sha256 served from the same bucket and never verifies the signature, which is the gap GHSA-3x4q-99gh-fxhx / #819 closed for the other three install paths. The gate that was meant to stop a fourth path from appearing does not look in lambda/.

Evidence (main @ bdf86b9)

  • lambda/pipeline-orchestrator/main.go:1291-1328 (generatePipelineUserData, called from main.go:1005 for every stage instance) runs curl -f -o /usr/local/bin/spored ... straight into the destination, then curl -f -o /tmp/spored.sha256, a sha256 comparison, and chmod +x. There is no .sig fetch and no openssl dgst -verify, and the file does not reference spore_install_verified_spored.
  • cmd/spored_install_test.go:40-43 (TestEverySporedDownloaderUsesTheVerifiedInstaller) walks only cmd/ and pkg/, so this file is never checked. That gate's own comment says the walk exists so "a fourth path cannot be added quietly".
  • Smaller points in the same block: it downloads straight to /usr/local/bin/spored, so a failed checksum leaves the unverified binary in place (and it is later run as spored run-pipeline-stage). It also compares $(cat /tmp/spored.sha256) with the bare hash, while pkg/sporedinstall takes awk '{print $1}'. I have not checked which format the published .sha256 uses, because that needs a fetch from S3. If it is hash filename, this comparison would always fail.

Suggested fix

Splice sporedinstall.KeySetupScript() + sporedinstall.VerifiedInstallFunc() into the stage user-data and call spore_install_verified_spored "$BINARY" <bases...>, the same as pkg/launcher/bootstrap.go. Widen the gate's walk to the whole module, including lambda/, and fail if it finds no downloader there.

Found while working on #1052/#1056; out of scope for that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions