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 the source on download #373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ammernico
Copy link
Collaborator

Fixes #371

@ammernico ammernico marked this pull request as draft April 30, 2024 15:13
@ammernico ammernico marked this pull request as ready for review May 23, 2024 07:44
Copy link
Member

@primeos-work primeos-work left a comment

Choose a reason for hiding this comment

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

I don't understand this based on the diff. The commit message should also (at least briefly) explain this.

I assume this is about the checksum/hash verification of the source download? If so we should definitely automatically verify it but errors should be propagated and IMO we should even delete the file if the checksum didn't match (can be a bit inconvenient sometimes but makes sense for security reasons).

Comment on lines 318 to 319
let verify_result = super::verify(matches, config, repo, progressbars).await;
debug!("verify_result = {:?}", verify_result);
Copy link
Member

Choose a reason for hiding this comment

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

Does this do anything? Looks like it only adds debug output (assuming verify hopefully doesn't panic).

Copy link
Collaborator

@christophprokop christophprokop left a comment

Choose a reason for hiding this comment

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

tested and behaves as expected but the exit code ist still 0 even when the verfication fails

Fixes science-computing#371

Signed-off-by: Nico Steinle <nico.steinle@eviden.com>
Copy link
Collaborator

@christophprokop christophprokop left a comment

Choose a reason for hiding this comment

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

Now we got an exit code of 1 if the verification fails.
Tested and works as expected :)
Thanks!

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.

trigger 'source verify' every time after 'source download'
3 participants