-
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
Move checksum to a dedicated file #94
base: main
Are you sure you want to change the base?
Conversation
The newest `foundryup` now defaults to installing stable Foundry, see foundry-rs/foundry#9585 and https://github.com/foundry-rs/foundry/releases/tag/stable Closes crytic#92
d86660f
to
3eef552
Compare
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 PR! I've left you some comments inline -- I like the general idea, but there's some issues that should be resolved before we can move forward.
entrypoint.sh
Outdated
@@ -135,7 +135,8 @@ install_node() | |||
fi | |||
|
|||
wget -q -O nvm-install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | |||
if [ ! "fabc489b39a5e9c999c7cab4d281cdbbcbad10ec2f8b9a7f7144ad701b6bfdc7 nvm-install.sh" = "$(sha256sum nvm-install.sh)" ]; then | |||
sha256sum -c checksum --status --strict --ignore-missing |
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.
if this returns non-zero (i.e mismatched checksum), the execution will stop then because the script is run with set -e
and the user won't see the error message from below.
I believe you should be able to do if ! sha256sum .....; then ...
instead to have it working.
I am also not a fan of --ignore-missing
, as it could be error prone. If, for instance, the filename changes, the check may still pass silently, leaving the user unprotected. We could have two separate checksum files to avoid having to use --ignore-missing
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.
Does this the new syntax (with the grep) look good ?
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.
yes, thanks!
It is usually preferable to separate concerns. In particular, checksum are critical security values that should not be mixed up with the rest of the installation logic.
This is targetting #93