fix: close immutable promotion trust gaps

This commit is contained in:
DongHyeonka
2026-08-02 06:39:41 +09:00
parent 7c5ed80407
commit 92e5cace5c
16 changed files with 1228 additions and 274 deletions
+9 -3
View File
@@ -1,4 +1,4 @@
import { verify, type KeyLike } from "node:crypto";
import { verify, type KeyObject } from "node:crypto";
import { z } from "zod";
@@ -56,7 +56,7 @@ export const providerVerificationArtifactSchema = z
export type ProviderTrust = Readonly<{
keyId: string;
publicKey: KeyLike;
publicKey: KeyObject;
}>;
export type PromotionEvidenceResult = Readonly<{
@@ -182,7 +182,13 @@ function signatureMatches(
>,
trust: ProviderTrust | null,
): boolean {
if (!trust || evidence.signature.keyId !== trust.keyId) return false;
if (
!trust ||
evidence.signature.keyId !== trust.keyId ||
trust.publicKey.asymmetricKeyType !== "ed25519"
) {
return false;
}
try {
return verify(
null,