fix: enforce and verify canonical vault permissions - #134
Merged
Merged
Conversation
graikos
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes F-2026-19297 by preventing the supported deployment flow from retaining hidden signature authority and refusing MinaGuard lookalikes whose on-chain account permissions differ from the canonical policy, even when they carry the official verification key.
setPermissionstemporarily requires a proofsetup()andreserveForParent()overwrite and permanently seal the complete canonical vector in the same atomic transactionaccessand thesetVerificationKeytransaction-version guardpermissionsVerified, hide unverified vaults from every backend read/action route, and ignore unverified child state during proposal-status derivationMinaGuard.deploy()and the audit guides that VK equality alone must never be used to recognize or fund a vaultSecurity boundary
The supported root and child creation paths now include two account updates atomically: the vault-signed deployment update leaves
setPermissionsopen to proof, and the MinaGuard-proof-authorized initialization update writesGUARD_PERMISSIONS, includingsetPermissions: impossible(). A creator weakeningsendis overwritten; a creator closingsetPermissionsearly makes the entire transaction fail.The on-chain and client changes complement rather than replace the mandatory detection control. A creator can bypass the supported flow and deploy a lookalike directly, so the backend and online UI still reject every stored permission vector other than
GUARD_PERMISSIONS.Verification-key equality still does not authenticate deployment provenance. A proof-authorized factory and registry would remain the stronger L1 design for cryptographically authenticating canonical deployment provenance.
UI screenshots
The image assets are isolated from this PR on the
pr-134-ui-screenshotsbranch. The embeds below use its immutable commit.Unsafe Vault blocks transaction actions
Unsafe proposed SubVault blocks approval and execution
Unsafe proposed SubVault blocks offline bundle creation and broadcast
Tests
--timeout 20000; isolated CI retains the repository default)setup()and SubVaultreserveForParent():sendis overwritten with the canonical vectorsetPermissions: impossible()rejects the complete atomic creationGUARD_PERMISSIONSfield by fieldPROOF_LEVEL=none, dummy proofs, and the matching dummy VK; it does not test browser circuit compilationcheck-vk-hashFinding: F-2026-19297