Fix KAS verification fallback and surface ZK verified in bundles#264
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
c715891
into
codex/implement-opengraph-image-rendering-for-verified-glyphs-zhhgfy
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d36d86e941
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const authorSigBundleHash = bundleHashFromAuthorSig(authorSigNext); | ||
| const candidateHashes = Array.from( | ||
| new Set([authorSigBundleHash, bundleHashNext, rootHash, legacyHash].filter(Boolean)) | ||
| ) as string[]; |
There was a problem hiding this comment.
Keep author signature bound to computed bundle hash
Including authorSigBundleHash (decoded from authorSig.challenge) in the fallback list makes verification succeed even when the current bundle hashes don’t match the signed bundle. verifyBundleAuthorSig only checks that the signature’s challenge matches the provided hash, so passing the hash extracted from the signature validates any signature regardless of the bundle’s actual contents. That means a tampered bundle can still show “Author verified” as long as it carries any valid KAS signature. Consider removing this candidate or only accepting it if it matches the recomputed bundle hash.
Useful? React with 👍 / 👎.
Motivation
Description
verifyAuthorSigWithFallbackand use it to verify KAS author signatures against the author-provided challenge hash plus computed candidate hashes (bundleHashNext,rootHash,legacyHash) insrc/pages/VerifyPage.tsxto avoid false negatives for receive glyphs.zkVerifiedboolean in the audit bundle (auditBundleText) and the canonical receipt (receiptJson) when Groth16 verification is present so the bundle JSON clearly indicates ZK verification status.Testing
Codex Task