Overview
Implement rule Z010: detect any function capable of writing/rotating the stored verifying key that lacks an admin/auth check, which would let anyone replace the trusted verification parameters and forge acceptance of invalid proofs.
Background / Context
This is the ZK-specific analogue of the existing S010 upgrade-admin rule family, applied specifically to verifying-key storage rather than contract WASM upgrades — a distinct and equally critical attack surface once contracts support VK rotation (as recommended for long-lived ZK systems needing circuit updates).
Goal
sanctifier-core flags any public function that writes to verifying-key storage without a preceding require_auth/admin check, following the same detection pattern already proven for S010.
Scope of Work
- Extend the existing S010 upgrade-admin detection pattern to also match verifying-key storage writes.
- Add triggering/clean fixtures under
z010_missing_vk_rotation_access_control.rs.
- Document in
docs/rules/Z010.md, cross-referencing S010.
Out of Scope
- Building the VK-rotation feature itself — detection of missing access control on any such feature, existing or future.
Acceptance Criteria
Files & Pointers
tooling/sanctifier-core/src
contracts/fixtures/finding-codes/z010_missing_vk_rotation_access_control.rs
docs/rules/Z010.md
docs/rules/S010.md
Dependencies / Related
Depends on #1192, #1194. Reuses S010 pattern infrastructure.
Difficulty & Estimated Effort
Medium — ~2-3 days (reuses existing S010 detection infra).
Overview
Implement rule Z010: detect any function capable of writing/rotating the stored verifying key that lacks an admin/auth check, which would let anyone replace the trusted verification parameters and forge acceptance of invalid proofs.
Background / Context
This is the ZK-specific analogue of the existing S010 upgrade-admin rule family, applied specifically to verifying-key storage rather than contract WASM upgrades — a distinct and equally critical attack surface once contracts support VK rotation (as recommended for long-lived ZK systems needing circuit updates).
Goal
sanctifier-coreflags any public function that writes to verifying-key storage without a precedingrequire_auth/admin check, following the same detection pattern already proven for S010.Scope of Work
z010_missing_vk_rotation_access_control.rs.docs/rules/Z010.md, cross-referencing S010.Out of Scope
Acceptance Criteria
Files & Pointers
tooling/sanctifier-core/srccontracts/fixtures/finding-codes/z010_missing_vk_rotation_access_control.rsdocs/rules/Z010.mddocs/rules/S010.mdDependencies / Related
Depends on #1192, #1194. Reuses S010 pattern infrastructure.
Difficulty & Estimated Effort
Medium — ~2-3 days (reuses existing S010 detection infra).