| name | vvu-compliance-gate |
| description | What Would The Compliance Gate Say. Load before any Tier-3 change touching ProofBridge Liner, SafeKrypte, Ubuntu Data Bus, GovernanceAnchor.sol, ED25519 VCT governance, CircuitBreaker, or HMAC webhooks. Encodes the 18 audit findings and 5 hard-failure release blockers from the ProofBridge compliance-fabric v2 audit. Functions as Lindiwe's behavioral quality reviewer โ analogous to a QA engineer opening the product and walking real flows before a PR merges. Do not skip for changes that look small. The 30-commit main-branch incident started with a change that looked small. |
| triggers | {"file_pattern":["app/api/verify/**","app/api/mint/**","contracts/**GovernanceAnchor*","contracts/**CircuitBreaker*","server/safekrypte*","server/safeline*","app/api/webhook/**","app/api/pools/**","docs/audit/**"],"event_types":["compliance","audit","tier-3","security-review","hf-resolve"],"tier":[3]} |
VVU COMPLIANCE GATE โ FULL RULE SET
HARD FAILURES (HF-1 through HF-5 โ RELEASE BLOCKERS โ MERGE DENIED UNTIL RESOLVED)
HF-1 TEE ATTESTATION
Finding : TEE is a JavaScript config flag, not real hardware attestation
Gate : No production deployment until hardware TEE is verified and attested
Verify : grep -r "teeMode|attestation|SW-MODE" src/ โ must show hardware path
Resolution : Replace config flag with actual TEE SDK call + attestation receipt
Status : OPEN
HF-2 ZK PROOF ON-CHAIN VERIFICATION
Finding : ZK proofs are asserted as valid, not verified by on-chain verifier contract
Gate : GovernanceAnchor.sol must call a deployed ZK verifier contract per credential
Verify : Read GovernanceAnchor.sol โ confirm verifyProof() call with contract address
Resolution : Deploy ZK verifier contract, wire GovernanceAnchor.sol to call it
Status : OPEN
HF-3 GOVERNANCEANCHOR.SOL DEPLOYMENT
Finding : GovernanceAnchor.sol has no deployed address on Polygon Amoy
Gate : Contract must be deployed and address registered in config before any VC is issued
Verify : Check deployment registry for GovernanceAnchor โ must have 0x address
Resolution : Deploy, record address in compliance-fabric config, verify with etherscan
Status : OPEN
HF-4 HMAC HASH DOMAIN COLLISION
Finding : Webhook HMAC and VCT HMAC share the same key namespace โ collision risk
Gate : Domain-separated HMAC keys required before any new webhook endpoint is added
Verify : Check HMAC key derivation โ must include domain prefix ("webhook:" vs "vct:")
Resolution : Add domain prefix to all HMAC key derivation functions; rotate existing keys
Status : OPEN
HF-5 BETA-BINOMIAL CALIBRATION
Finding : Bayesian prior calibrated on n=47 historical Deeds Registry failure cases
Gate : Minimum n=200 cases required for prior to be considered calibrated for prod
Verify : Count entries in calibration dataset โ must be โฅ200
Resolution : Collect additional cases or document explicit uncertainty bounds in output
Status : OPEN
BRANCH GATE
Rule : Tier-3 changes must be on compliance-fabric branch
Check : git branch --show-current โ must return "compliance-fabric"
Incident: 30+ commits pushed to main on prior session โ this gate exists because of that
On fail : BLOCK. Do not force-push main. Create compliance-fabric if absent, cherry-pick.
BEHAVIORAL COVERAGE GATE
Each flow must be exercised in a real environment before PR, not only unit-tested:
โก VC issuance : credential issued โ GovernanceAnchor anchored โ independently verifiable
โก Halt : trigger โ throughput measured to drop โ audit log entry confirmed
โก Webhook : event in โ HMAC validated with domain-separated key โ NATS event confirmed
โก SafeKrypte : key request โ threshold count satisfied โ escrow state updated in DB
โก Ubuntu Pools: contribution โ Stitch InstantEFT webhook โ on-chain receipt hash confirmed
VALIDATION OUTPUT FORMAT
Generate active/VALIDATION.md with exactly this structure:
VVU VALIDATION โ [ISO-DATE]
Component: [affected component name]
PR Branch: [must be compliance-fabric for Tier-3]
Plan Reference: active/PLAN.md approved [DATE]
Hard Failure Status
- HF-1 TEE: [OPEN | RESOLVED โ evidence: file:line]
- HF-2 ZK: [OPEN | RESOLVED โ evidence: contract:function]
- HF-3 Anchor: [OPEN | RESOLVED โ evidence: 0x address + block]
- HF-4 HMAC: [OPEN | RESOLVED โ evidence: key derivation diff]
- HF-5 Calibration: [OPEN | RESOLVED โ evidence: dataset count=N]
Gates
- Branch gate: [PASS | BLOCK โ current: X, required: compliance-fabric]
- Behavioral coverage: [PASS | PARTIAL โ missing: list flows not tested]
- Trace chain: [COMPLETE | INCOMPLETE โ missing link: XโY]
RESULT: [PASS | BLOCK]
BLOCK REASON: [specific finding with file and line reference โ never vague]