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

Verify download checksum #26

Closed
morancj opened this issue Feb 23, 2021 · 1 comment · Fixed by #27
Closed

Verify download checksum #26

morancj opened this issue Feb 23, 2021 · 1 comment · Fixed by #27
Labels
enhancement New feature or request

Comments

@morancj
Copy link

morancj commented Feb 23, 2021

Is your feature request related to a problem? Please describe.
Downloads should be verified against at least their checksums (currently sha256) before execution.

Describe the solution you'd like
Compare the downloaded file to the checksum. If verification fails, retry some number of times, then fail the job.

Describe alternatives you've considered
chtf, which validates the checksums:

https://github.com/Yleisradio/chtf/blob/c34f6265b47dda812cc1936871ed79d250933ed1/chtf/__chtf_terraform-install.sh#L202-L212

tfenv, which validates checksum and GPG signature:

https://github.com/tfutils/tfenv/blob/6d16fa586a991b94b1dcb6dd7e4597b24b8b2a1e/libexec/tfenv-install#L148-L160

terraform-exec : tfinstall, which also doesn't validate the download.

Additional context
Currently, we're using a Docker image for Debian Buster and installing terraform. Addressing this issue would be a step toward allowing us to migrate to this Orb, allowing for a simpler CircleCI customer config.

@morancj morancj added the enhancement New feature or request label Feb 23, 2021
@gmemstr
Copy link
Contributor

gmemstr commented Feb 24, 2021

Typically we recommend people use a relevant or custom Docker image with the tools required pre-installed, as it helps reduce overhead of having to install things on-the-fly. Install steps aren't encouraged but are added to help in the case it might really be necessary (e.g using one of our machine or macos images).

I agree we should checksum stuff we download, and will definitely look at other orbs to see which ones we should incorporate this idea into. However installing things during runtime in our Docker executor is discouraged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants