Skip to content

Conversation

@Amxx
Copy link

@Amxx Amxx commented Mar 20, 2025

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

@Amxx Amxx requested a review from elopez as a code owner March 20, 2025 09:16
@CLAassistant
Copy link

CLAassistant commented Mar 20, 2025

CLA assistant check
All committers have signed the CLA.

@elopez elopez force-pushed the dev-foundrup-update branch from d86660f to 3eef552 Compare March 21, 2025 22:48
Copy link
Member

@elopez elopez left a 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

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
Copy link
Member

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

Copy link
Author

@Amxx Amxx Mar 26, 2025

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 ?

Copy link
Member

Choose a reason for hiding this comment

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

yes, thanks!

@Amxx Amxx changed the base branch from dev-foundrup-update to main March 26, 2025 10:42
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.

3 participants