-
Notifications
You must be signed in to change notification settings - Fork 215
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
Test SHA1 hash of package to verify integrity of installers #148
Comments
Yeah I would like to get rid of the 7zip usage for verifying the zips (not always working anyways). We have to maintain the SHA1 of each downloads for our self since Sitecore does not supply any checksums. I think the best why to implement this is to add it to "sitecore-packages.json" like:
then during package restore we compare the value with What do you think about this? |
That's exactly how I imagined it to work. Amazing! |
cool! ... did a quick prototype and discovered an issue for users using SMB/UNC for storing the packages, it takes ~1 minute per file (my packages is on Azure File Sharew). I assume that |
I understand what you mean. For local development it's not an issue. Perhaps it can verify after download and before use in the installation? |
the problem with verifying before usage is that what should then happen if it fails? Should it then delete the file in context folder and in the install source folder? or not, but instruct the user to manually do it? |
Perhaps while running in interactive mode ask to redownload, ignore, or cancel. |
There is no such thing today as interactive mode :) ... I think we should download as today and then during build where each file is copied into build context, it will do the verification and if it fails delete the file (only in the build context). Thenfail the build with a message that the file should be manually deleted from the installation source (so it can be redownloaded at next run). |
OK I tried to do the validating just before build of each image and it works better, but now the problem is that it has to do it every time and it takes about 1 minute per "asset" image. I will try to defer the check and do it inside the containers instead so that the RUN statements can be cached (which makes since since if should only verify if any source files has been changed) |
switched to hash validation instead of 7-zip testing, fixes #148
While running into an issue related to the download of 7-zip, I realised that the download was only to verify that the zip file is not corrupt.
Would it be good to instead have SHA1 hashes for each of the Sitecore downloads, then test against that value instead? This would serve both the purpose of validating against corruption as well as ensure the expected packages are downloaded.
The text was updated successfully, but these errors were encountered: