Skip to content

Add SHA256 file hashes to release notes#912

Merged
lusassl-msft merged 10 commits into
mainfrom
lusassl-checksum
Feb 25, 2022
Merged

Add SHA256 file hashes to release notes#912
lusassl-msft merged 10 commits into
mainfrom
lusassl-checksum

Conversation

@lusassl-msft
Copy link
Copy Markdown
Contributor

@lusassl-msft lusassl-msft commented Feb 25, 2022

Description:
Write out the SHA256 checksum for each script on the release page. We must create the file hash post script signing to make sure that the hash is accurate. We simply read the ScriptVersions.csv file which was created during Build.ps1 run and overwrite create the ScriptVersions.txt which was also initially created during Build.ps1 run. We also add the file hash to the ScriptVersions.csv.

@bill-long
Copy link
Copy Markdown
Member

It's intended for the CSV and TXT files to have the same data. You can use the CSV for programmatic verification and the TXT file for visual. So I think it would be better to generate the SHA256 hash when building the CSV and add a new column to the CSV to hold those values. Then when converting the CSV to TXT we add the new column.

This way it's easy to verify the hash by script or other code - for example if we want our scripts that update themselves to start verifying hashes after downloading.

@bill-long
Copy link
Copy Markdown
Member

Oh, but it has to be after signing. I guess we need to generate the CSV, sign, then rewrite the CSV with hashes, then convert to TXT.

@bill-long
Copy link
Copy Markdown
Member

Pushed 2 lines of code to add the hash to CSV.

@lusassl-msft
Copy link
Copy Markdown
Contributor Author

Looks good. Should do the job. Thanks @bill-long

Comment thread .build/BuildScriptVersions.ps1 Outdated
@dpaulson45 dpaulson45 self-requested a review February 25, 2022 16:03
@lusassl-msft lusassl-msft merged commit 3db64de into main Feb 25, 2022
@lusassl-msft lusassl-msft deleted the lusassl-checksum branch February 25, 2022 16:07
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