-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update security of Dockerfile #18
Conversation
jstuder-gh
commented
Aug 9, 2018
- Use https to retrieve archive from Rakudo server
- Retrieve PGP signature from Rakudo server (https)
- Retrieve PGP public key over hkps and using full fingerprint
- Verify archive using signature (explicitly using gpg2)
Makes for easy cleanup.
* Use https to retrieve archive from Rakudo server * Retrieve PGP signature from Rakudo server (https) * Retrieve PGP public key over hkps and using full fingerprint * Verify archive using signature (explicitly with gpg2)
Dockerfile
Outdated
@@ -12,19 +12,29 @@ RUN buildDeps=' \ | |||
libencode-perl \ | |||
make \ | |||
' \ | |||
url="https://rakudo.org/downloads/star/rakudo-star-${rakudo_version}.tar.gz" \ | |||
keyserver='hkps.pool.sks-keyservers.net' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As written, this won't actually use hkps (it'll use hkp against the hkps pool, which will generally work), but I'd also argue that when using a full fingerprint, hkps doesn't provide additional benefit since gpg will verify the fingerprint of the key after fetching which is a stronger guarantee, and not using hkps allows us to intentionally mitm for increased reliability (see docker-library/php#666), which we do on all the official build servers for the official images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the insight! I'll update the branch to use the 'ha' pool as suggested on the official image readme.
Use the 'ha' keyserver pool as... * GPG already provides strong guaranty when using a full fingerprint * Using hkps reduces reliability enhancements Docker provides for official images Thanks to tianon++ for the review. See [here](https://github.com/perl6/docker/pull/18/files#r208803260) for more details.
@tianon, I noticed that the Travis build is failing with Would it be best to use plain 'gpg' here? Given the base image, I believe gpg is an alias for gpg2, but if not and GPG v1.* were used would that greatly affect security in this instance? Thanks. |
@jstuder-gh
So better use |
Travis was failing due to being unable to find 'gpg2' and gpg is already an alias for gpg2 in the base image. Thanks to zakame++ for verification.
Thanks @zakame for confirming on your end. I've updated the branch accordingly. |
If all looks good to @tianon, I can merge this! |
Looks great to me! 👌 The |
Ok, thanks @jstuder-gh for the contribution, and thanks to @tianon and @zakame for reviewing! |