Skip to content

feat:zk threst model - #1289

Merged
Gbangbolaoluwagbemiga merged 1 commit into
HyperSafeD:mainfrom
Grandida-Projects:docs/zk-threat-model-1196
Jul 28, 2026
Merged

feat:zk threst model#1289
Gbangbolaoluwagbemiga merged 1 commit into
HyperSafeD:mainfrom
Grandida-Projects:docs/zk-threat-model-1196

Conversation

@Wilfred007

Copy link
Copy Markdown
Contributor

Summary

Describe the change, the motivation behind it, and any important implementation details.
The threat model covers 16 threat classes (T1–T16), well past the 6-class acceptance bar:

  • T1 Trusted-setup/toxic-waste compromise → Z004

  • T2 Proof malleability (public-input binding) → Z003

  • T3 Nullifier/proof replay → Z001, Z006

  • T4/T5 Verifying-key integrity & rotation access control → Z005, Z010

  • T6 Under-constrained circuit inputs → Z007

  • T1 Trusted-setup/toxic-waste compromise → Z004

  • T2 Proof malleability (public-input binding) → Z003

  • T3 Nullifier/proof replay → Z001, Z006

  • T4/T5 Verifying-key integrity & rotation access control → Z005, Z010

  • T6 Under-constrained circuit inputs → Z007

  • T7 Curve/field confusion → Z008

  • T8/T9 Rollup batch-root validation & Merkle-root spoofing → Z013, Z014

  • T10–T13 Insecure randomness, domain-separation, unbounded verify loops, output over-exposure → Z002, Z011, Z009, Z012

  • T14–T16 Three gaps the roadmap already flags as detector-exists-but-uncoded (zk_verification_result_ignored, zk_verifier_skippable, zk_missing_constraint) — I proposed stable codes
    Z015–Z017 for these, since the task asked for "existing or newly proposed" mitigations

Each threat has a mainnet-impact assessment and a real-world precedent (Zcash's BCTV14a counterfeiting bug, Trail of Bits' "Frozen Heart" Fiat-Shamir findings, the Nomad Bridge
root-replay incident as a non-ZK analog, and the 0xPARC ZK Bug Tracker). I verified every rule ID, detector function name, and cross-linked file path against the actual source
(finding_codes.rs, rules/*.rs) rather than trusting the docs alone — this caught that the case study's Z002 description ("verification result ignored") is stale drift from the
canonical docs/rules/Z002.md ("insecure randomness"), so I used the canonical definition.

Fixes #

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Maintenance or refactor

Testing

List the commands you ran and the scope of validation.

cargo fmt --all --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test -p sanctifier-core --all-features
cargo test -p sanctifier-cli
cd frontend && npm test

Closes #1193
Closes #1194
Closes #1195
Closes #1190

Checklist

  • I ran the relevant tests locally, or explained why they were not needed.
  • I updated documentation for any user-facing behavior changes.
  • I added or updated tests for the change when appropriate.
  • I added a changelog or release-notes entry when needed, or confirmed none is required.
  • I verified this branch is up to date with main and merge conflicts are resolved.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the gbangbolaoluwagbemiga's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Wilfred007 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Gbangbolaoluwagbemiga
Gbangbolaoluwagbemiga merged commit 0ac77aa into HyperSafeD:main Jul 28, 2026
15 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment