Skip to content

Pin signing keys used by scripts that Dockerfiles run #1854

Backlog

Description

@richlander

#1852 establishes the pattern for signing keys: keys are checked in with a hash file, staged into the build context, and never downloaded during an image build. That PR applies the pattern to Dockerfiles only. This issue tracks applying it to the scripts that Dockerfiles copy in and run.

Known case

setup-node-24.x.sh downloads the NodeSource APT key during the build:

if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then

The same script is used by three images:

  • src/ubuntu/22.04/helix/webassembly/amd64
  • src/ubuntu/24.04/helix/webassembly/amd64
  • src/ubuntu/26.04/helix/webassembly/amd64

It is the only script under src/ that downloads a key today.

Work

  • Check in the NodeSource key and its hash file, following eng/signing-keys/README.md.
  • Change the three images to use the staged key instead of downloading it.
  • Decide whether SigningKeyTests should also read the scripts next to a Dockerfile. It reads only Dockerfiles today, which is why it did not find this case.

Out of scope

eng/common/cross/build-rootfs.sh comes from dotnet/arcade. It does not download keys, but several of its downloads (OpenBSD, illumos, Haiku, GNU sources) are not verified. Any change there belongs in dotnet/arcade.

Raised in review: #1852 (comment)

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions