[PR #3595] [CLOSED] fix(artifacts): admit ASAR headers with leading JSON whitespace #5844

Closed
opened 2026-10-31 01:09:51 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3595
Author: @BeqaKs
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/asar-json-whitespace-header


📝 Commits (1)

  • e39c8e3 fix(artifacts): admit ASAR headers with leading JSON whitespace

📊 Changes

3 files changed (+110 additions, -6 deletions)

View changed files

📝 src/artifacts/inventory/ArtifactGraphConstruction.test.ts (+46 -0)
📝 src/artifacts/inventory/ArtifactGraphConstruction.ts (+14 -5)
📝 tests/boundary/filesystem/asarListingAdmission.test.ts (+50 -1)

📄 Description

Summary

  • Allow RFC 8259 JSON whitespace before the ASAR header object in hasAsarHeader, keeping the positive match bounded to the pickle string and examined prefix.
  • Cover compact/space/newline/tab/CR cases, rejection of non-object payloads, and whitespace that spans past the classification prefix.
  • Add official @electron/asar inventory regression for leading space and newline headers so member paths stay expanded.

Fixes #3574

Test plan

  • npm run test:local -- src/artifacts/inventory/ArtifactGraphConstruction.test.ts
  • npm run test:focused -- tests/boundary/filesystem/asarListingAdmission.test.ts
  • npm run check:fast

Made with Cursor


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3595 **Author:** [@BeqaKs](https://github.com/BeqaKs) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/asar-json-whitespace-header` --- ### 📝 Commits (1) - [`e39c8e3`](https://github.com/morluto/rea/commit/e39c8e3073a3e8757251f1069c9a147662a5b0e2) fix(artifacts): admit ASAR headers with leading JSON whitespace ### 📊 Changes **3 files changed** (+110 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/artifacts/inventory/ArtifactGraphConstruction.test.ts` (+46 -0) 📝 `src/artifacts/inventory/ArtifactGraphConstruction.ts` (+14 -5) 📝 `tests/boundary/filesystem/asarListingAdmission.test.ts` (+50 -1) </details> ### 📄 Description ## Summary - Allow RFC 8259 JSON whitespace before the ASAR header object in `hasAsarHeader`, keeping the positive match bounded to the pickle string and examined prefix. - Cover compact/space/newline/tab/CR cases, rejection of non-object payloads, and whitespace that spans past the classification prefix. - Add official `@electron/asar` inventory regression for leading space and newline headers so member paths stay expanded. Fixes #3574 ## Test plan - [x] `npm run test:local -- src/artifacts/inventory/ArtifactGraphConstruction.test.ts` - [x] `npm run test:focused -- tests/boundary/filesystem/asarListingAdmission.test.ts` - [x] `npm run check:fast` Made with [Cursor](https://cursor.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5844
No description provided.