Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: curl GPG keys for Yarn and Nodejs #1509

Closed
wants to merge 2 commits into from

Conversation

nschonni
Copy link
Member

@nschonni nschonni commented Jul 1, 2021

There is some mix of the security updates in here, so opening as a draft. Can cleanup before landing

Copy link
Member Author

@nschonni nschonni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass based on the work done in #1507

gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -s https://raw.githubusercontent.com/nodejs/release-keys/HEAD/cli.sh | bash -s import \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should HEAD instead be pinned to a commit has in the versions.json for stability? The CLI itself currently just pulls keys from the default branch, so I'm not sure if it buys much

@@ -57,6 +52,7 @@ RUN addgroup -g 1000 node \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
&& curl -s https://raw.githubusercontent.com/nodejs/release-keys/HEAD/cli.sh | bash -s clear \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the first curl of the script keep it around and then clean it up after this instead of downloading it twice?

gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --import \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the Yarn key get cleaned up at the end?

@nschonni
Copy link
Member Author

nschonni commented Jul 1, 2021

@tianon @yosifkit does this approach have any downsides for the official images building?

@tianon
Copy link
Contributor

tianon commented Jul 1, 2021

@tianon @yosifkit does this approach have any downsides for the official images building?

Unfortunately, both this approach and #1507 are DOA from the downstream perspective (https://github.com/docker-library/official-images#image-build and/or https://github.com/docker-library/official-images#clarity) -- the way I'd prefer to see https://github.com/nodejs/release-keys used is in update.sh in order to generate the list of "canonical" fingerprints, but even then it'd be much better if we could know the specific key that signed each release so it could embed that one directly instead of fetching the full list every time.

@nschonni
Copy link
Member Author

nschonni commented Jul 1, 2021

OK, closing in favour of #1510

@nschonni nschonni closed this Jul 1, 2021
@nschonni nschonni deleted the release-keys branch July 1, 2021 23:34
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.

None yet

2 participants