-
Notifications
You must be signed in to change notification settings - Fork 52
Configure cpanm to install over HTTPS #115
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
Conversation
- pass `--from https://www.cpan.org` to cpanm by default - Ensure ca-certificates and curl are installed in slim builds so HTTPS installs work
Run this cpanm install test to ensure we have HTTPS capability.
1a291d2
to
622f104
Compare
Current and new tests are all passing, will merge and release this for Hub 💪 |
Setting
|
It also limits installs from backpan.perl.org |
Thanks @waterkip @skaji for the feedback! 💯 I'd suggest adding a section on https://github.com/docker-library/docs/tree/master/perl for this - I think we can also accommodate using Alternatively, would you have other suggestions for this such that we can mitigate supply-chain attacks? |
Personally I think this is a problem that cpanm and/or other package managers should deal with and not this project. |
@waterkip I'd normally agree, but the fact remains that this project is a package of Perl + OS dependencies unto itself - we are the package manager on behalf of Docker/container users, and thus we'd want to set a reasonable expectation that whatever additional CPAN packages we can fetch through the docker-perl container can be done so in good faith to the currently available secure means from CPAN. The new default is certainly reversible - I don't think it unreasonable for anyone to opt in and unset/change |
While I understand your point I do not agree with it. You are merely providing the same options as the already existing behavior on any default OS. cpanm (and others) should start offering HTTPS support by default. That is the actual problem, the current solution is a workaround that breaks any cpanfile where something depends on a version that is either on backpan or is a development version. The solution than requires additional build steps which are not easy to understand, because even if cpanm fails and it is not because of backpan or development releases, it will run again. To prevent this from happening, everyone would need to unset PERL_CPANM_OPT which is what the default now is and thus we don't gain a lot more than we currently have. We actually need to do more to get the same results. |
@waterkip valid points, yes, and it could be worse - as you say indeed, cpanm (and others) should start offering HTTPS support by default, and as we are merely including For now though since #116 already came up which supports your claim, I'll revert this change. Thanks again for the feedback! |
Follow up for #114 - we add
PERL_CPANM_OPT
configuration in the Dockerfile and ensure we have install tools forcpanm
that can pull over HTTPS.