You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/08/31 12:13:00 UTC

[PR] fix: make Electron update signature digests explicit [maka]

Astro-Han opened a new pull request, #4356:
URL: https://github.com/apache/maka/pull/4356

   ## Summary
   
   - Restore packaged Desktop update verification under Electron 43 by making the existing SHA-256 ECDSA contract explicit in `@tufjs/models` and `@sigstore/verify` dependency patches.
   - Exercise TUF root metadata, Rekor inclusion promises and checkpoints, and DSSE signatures in the shipped Electron runtime.
   - Preserve the existing fail-closed workflow identity, provenance subject, and downloaded-byte checks.
   
   ## Root cause
   
   Electron 43's crypto runtime rejects `crypto.verify(undefined, ...)` with `ERR_OSSL_EVP_NO_DEFAULT_DIGEST`. The current TUF and Sigstore packages rely on Node choosing SHA-256 implicitly at four ECDSA verification call sites, so a valid update cannot pass inside the packaged app even though the same signatures verify under regular Node.
   
   ## Verification
   
   - Confirmed each Electron regression test failed before its corresponding patch (`NO_DEFAULT_DIGEST`, invalid Rekor SET/checkpoint, and rejected DSSE signature).
   - `npm ci` applies both new dependency patches from a clean install.
   - `npm run build:test`
   - `node --test apps/desktop/dist/main/__tests__/app-update-attestation.test.js` — 7/7 passed.
   - `node --test scripts/asf-license-headers.test.mjs scripts/ci-test-plan.test.mjs` — 92/92 passed.
   - `npx biome lint apps/desktop/src/main/__tests__/app-update-attestation.test.ts`
   - `npm run format:check`
   - `npm run check:asf-headers`
   - Ran the full `verifyDownloadedUpdateAttestation` path under Electron 43 against the downloaded `Maka-0.2.0-dev.10.20260831-mac-arm64.zip` (SHA-256 `a0d2f1791cc2be507f50f1cd897eb6ba8c72f710d8b6b130b17ec165698633bb`) and its live GitHub Release provenance; verification passed.
   
   Not run: repository-wide tests or a newly packaged installer/update cycle.
   
   <details>
   <summary>中文说明</summary>
   
   Electron 43 不接受未明确指定摘要算法的 ECDSA 验签。当前 TUF 和 Sigstore 依赖在四个调用点依赖 Node 隐式选择 SHA-256,导致合法 Nightly 更新在打包应用内验证失败。本 PR 用依赖补丁明确传入 SHA-256,并在 Electron 运行时覆盖 TUF、Rekor 和 DSSE 验签;现有的失败关闭、工作流身份、产物名称和下载字节哈希检查保持不变。
   
   </details>
   
   ## AI use
   
   Select exactly one:
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: Codex diagnosed the Electron/runtime compatibility boundary, authored the dependency patches and regression tests, and ran the listed verification. The human contributor must review the final diff and owns the submission and merge decision.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [x] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [x] Yes — described under Summary above
   - [ ] No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix: select update signature digests at crypto owners [maka]

Posted by "hqhq1025 (via GitHub)" <gi...@apache.org>.
hqhq1025 commented on code in PR #4356:
URL: https://github.com/apache/maka/pull/4356#discussion_r3894678016


##########
patches/README.md:
##########
@@ -27,6 +27,18 @@ Keep this directory small. Prefer product code that uses the dependency's
 published API; only patch for bugs that block shipping and cannot be worked
 around at the call site.
 
+## `@tufjs/models@5.0.0` and `@sigstore/core@4.0.1`

Review Comment:
   **P1 — Inventory both new dependency patches in the root release license document.** `scripts/source-legal-inventory.test.mjs:39-40` enumerates every `patches/*.patch` file and requires its filename to appear in the root `LICENSE`. This section introduces `@sigstore+core+4.0.1.patch` and `@tufjs+models+5.0.0.patch`, but neither is present there. Consequently the exact-head hosted `test` job and a local `npm run check:asf-source` both fail (the loop reports the Sigstore patch first; the TUF patch is missing as well). Add both patch filenames plus their applicable source/license notices to `LICENSE`; until then the required source-release gate is red and the candidate legal inventory is incomplete.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix: select update signature digests at crypto owners [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #4356:
URL: https://github.com/apache/maka/pull/4356#discussion_r3894909699


##########
patches/README.md:
##########
@@ -27,6 +27,18 @@ Keep this directory small. Prefer product code that uses the dependency's
 published API; only patch for bugs that block shipping and cannot be worked
 around at the call site.
 
+## `@tufjs/models@5.0.0` and `@sigstore/core@4.0.1`

Review Comment:
   Addressed in f8f28bda0e. The root LICENSE now inventories both dependency patches with their sources, versions, copyrights, and applicable Apache-2.0/MIT notices. `npm run check:asf-source` passes 94/94 locally. Posted by Codex on behalf of the contributor.



##########
patches/@tufjs+models+5.0.0.patch:
##########
@@ -0,0 +1,11 @@
+diff --git a/node_modules/@tufjs/models/dist/utils/verify.js b/node_modules/@tufjs/models/dist/utils/verify.js

Review Comment:
   Addressed in f8f28bda0e. The root LICENSE now inventories both dependency patches with their sources, versions, copyrights, and applicable Apache-2.0/MIT notices. `npm run check:asf-source` passes 94/94 locally. Posted by Codex on behalf of the contributor.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix: select update signature digests at crypto owners [maka]

Posted by "zhiiw (via GitHub)" <gi...@apache.org>.
zhiiw commented on code in PR #4356:
URL: https://github.com/apache/maka/pull/4356#discussion_r3894799034


##########
patches/@tufjs+models+5.0.0.patch:
##########
@@ -0,0 +1,11 @@
+diff --git a/node_modules/@tufjs/models/dist/utils/verify.js b/node_modules/@tufjs/models/dist/utils/verify.js

Review Comment:
   [P1] Adding this file (and its `@sigstore/core` sibling) without a matching `LICENSE` entry fails the repository's own legal-inventory contract: `source-legal-inventory.test.mjs` iterates every `patches/*.patch` and requires the patch filename to appear in the root `LICENSE`. The `test` check is red on this head with exactly that assertion (`root release documents describe the source candidate`), and it reproduces locally. Each new patch needs its LICENSE entry (as the existing ones have); `patches/README.md` alone does not satisfy the contract.
   
   ---
   
   > **Automated review notice:** This comment was posted by an automated review agent operated by zhiiw. It is not an independent human review and does not replace one.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix: select update signature digests at crypto owners [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #4356:
URL: https://github.com/apache/maka/pull/4356


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org