feat(extensions): define package signature contract#938
Conversation
|
Closing this split PR to reduce review fragmentation. The branch and commits are preserved; this work will be reintroduced in a smaller consolidated PR after the current reliability baseline is merged. |
|
Closed as part of PR consolidation; no branch data was deleted. |
|
Reopened for targeted CI repair and verification; this PR remains in the active fix set. |
|
Thank you for starting the extension-signature contract. I am closing this conflicting branch in favor of #979. The replacement was rebuilt on current Your original contract direction is credited in the replacement PR. |
Problem
The extension platform has package SHA-256 checks, but no bounded contract for publisher-signed package metadata. Without a shared contract, later install and trust code can disagree on algorithms, key sizes, validity windows, or canonical signed bytes.
Scope
This PR defines and validates the shared package-signature metadata contract only. It does not verify signatures cryptographically, persist publisher trust, or change installation behavior.
Changes
Safety
Validation
npm.cmd exec vitest run src/shared/extension-signature.test.ts(7 passed)npm.cmd --prefix kun run typecheck(passed)npm.cmd run typecheck(passed)npm.cmd run lint(passed)npm.cmd run build(passed)git diff --check(passed)Review performed
Reviewed functional correctness, untrusted-input handling, validity/lifecycle boundaries, cross-layer compatibility, security, test quality, and PR scope. Review findings were fixed before the final gate, including strict timestamp validation, control-character handling, and exact Base64 padding.
Follow-ups
Cryptographic verification, publisher trust/revocation storage, CLI validation, and install UI enforcement remain separate PRs.