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

build: embed binary checksums in the npm package #30611

Merged
merged 3 commits into from
Aug 19, 2021
Merged

Conversation

MarshallOfSound
Copy link
Member

In theory this isn't user facing.

Currently we download SHASUMS256.txt and the target Electron binary from GH releases and then use one to validate the other. In terms of "did the download get the right thing" it's a valid check, from a security perspective it's a little bit too close to self-validation than I'd like. The only thing protecting the SHASUMS256.txt file is GH write access and SSL during the download.

This change embeds the SHASUMS256.txt content in our electron npm package at publish time. This means the checksums are now (a) stored separately to the actual Electron binary and (b) protected by the integrity SHA in your yarn.lock / package-lock.json lockfile.

Tested locally, and we can test this on tomorrows nightly.

Notes: no-notes

@MarshallOfSound MarshallOfSound requested a review from a team as a code owner August 18, 2021 21:02
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
@MarshallOfSound MarshallOfSound merged commit aab5ea5 into main Aug 19, 2021
@MarshallOfSound MarshallOfSound deleted the embed-checksums branch August 19, 2021 18:26
@release-clerk
Copy link

release-clerk bot commented Aug 19, 2021

No Release Notes

@trop
Copy link
Contributor

trop bot commented Aug 19, 2021

I was unable to backport this PR to "14-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Aug 19, 2021

I have automatically backported this PR to "15-x-y", please check out #30647

BlackHole1 pushed a commit to BlackHole1/electron that referenced this pull request Aug 30, 2021
* build: embed binary checksums in the npm package

* Update docs/tutorial/installation.md

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* refactor: replace reduce with loop

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants