Repository navigation
fix(package): verify ASAR payload integrity before shipping Windows builds - #69
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Extract the verified ASAR corruption guard from Draft startup-investigation PR #51 without merging its tracing/QA-startup experiments or changing Electron/ADB/Gnirehtet runtime behavior.
A documented local packaging race previously produced an
electron-builderexit-0 package with inconsistent embeddedapp.asarpayload offsets. This change makes a Windows build fail when an ASAR file's content does not match its SHA-256 metadata.Changes
scripts/qa/verify-packaged-asar.cjsand tamper regressionverify-packaged-asar.nodecheck.cjsfrom PR fix(package): verify ASAR integrity and investigate Electron startup (#44) #51.docs/**from the distributed ASAR (QA documents are not runtime assets, and this reduces the surface of concurrent-edit packaging races).build:win,build:unpack,package:check; run regression + actual package scanner in hosted Windows CI.npm run build:win, so the release-path package is verified.Evidence
NODE_PATHresolving the same lockfile-installed@electron/asar;npm run qa:asar:testPASS, including deliberate byte corruption rejection.resources/app.asar: 3,988/3,988 SHA-256 entries verified, 0 failures.git diff --check: PASS.Scope boundaries
This is a build-time payload integrity test, not the Electron runtime ASAR-integrity fuse, not Authenticode signing, and not a fix for intermittent renderer/BrowserWindow startup delays in issue #44. Keep startup PR #51 Draft for its separate investigation; this narrowly reusable packaging guard can be merged independently after CI passes. No real-device test required for this packaging-only change.