README

DevProof

Proving that developers can't rug users. Not security auditing—trust model verification.

What is DevProof?

DevProof is about proving absence of privileged access, not finding vulnerabilities. Think warrant canary, not intrusion detection.

TEE apps make strong claims: "your data never leaves the enclave," "the operator can't see your messages." These claims are often partially true. DevProof finds the partial parts.

The core insight: TEE protects against the cloud provider. It does NOT protect against the operator. The operator controls which code runs, which environment variables are set, when to upgrade. Users verify attestation and think they're safe—but they're trusting that the operator configured things correctly.

ERC-733 Security Stages

ERC-733 defines a progression from prototype to trustless:

StageNameDefinition
0Prototype/RuggableTEE improves security but developer remains single point of failure
1Dev-ProofDeveloper cannot unilaterally alter, censor, or exfiltrate without notice period
2Decentralized TEEMultiple enclaves/vendors, no single party controls
3Trustless TEEZK hybrids, multi-vendor cross-attestation

Stage 1 is the goal. Every project can reasonably achieve it with attention to detail.

Stage 1 Checklist

From ERC-733 (fail any = Stage 0):

  • Enclaves attested on-chain
  • Code auditable (open source or formal verification)
  • Community can reproducibly compute code measurement
  • Developer has no access to application secrets
  • Well-defined upgrade process with notice period
  • No dependency on centralized infrastructure except TEE vendors
  • No backdoor or debug paths

See framework/STAGE-1-CHECKLIST.md for detailed verification steps.

Case Studies

ProjectStageKey Issue
hermes0Pha KMS (no public upgrade log), mutable image tags
near-private-chat0Backend routing unverified, 56 compose hashes authorized
near-ai-private-inference0Inner compose not in RTMR3, model weights unverified, operator log access
primus0Closed-source core (libpado.so), binary blobs
talos~1Reproducible builds, but enclave ID verification gap
tee-totalled0LLM_BASE_URL operator-configurable (exfiltration)
tokscope-xordi0v1.1.2: images public, repro builds improved; still ${VAR} image refs, Pha KMS
confer.to0Analysis in progress
venice-private-inference0ECIES wire protocol works; veniceai/skills misnames it "HPKE/Noise", omits every TDX-verification step
phala-private-ai-verifier0Attestation-only SDK; no E2EE code, signing_public_key never read, "verified" is not confidentiality
tinfoil-confidential-inference~1Closes the Phala/NEAR compose-hash gap (config sha256 in launch-measured cmdline). Model weights are dm-verity-anchored with HF commit pinned in the attested config — runtime tampering produces EIO, no HF-by-name fetch like NEAR AI. Per-model enclaves fully attested; router has 2 externally-sourced slots (DOMAIN, USAGE_REPORTER_SECRET) — code-trace-shown to be off the prompt path
xordi-toy-example1Reference implementation with Base KMS
trustedrouter-confidential-router~1First GCP Confidential Space study. Clean chain (Google-signed EAT JWT, eat_nonce[0]==SHA-256(TLS leaf), digest==published) and routing is locked/attested (hardcoded upstream URLs, control plane can't inject). Top gap G6: shared ACME TLS private key cached in operator-readable GCS (CMEK not image-bound) → operator can MITM with the genuine cert + relayed attestation, which per-session verification cannot catch. Prompts not persisted; upgrades mooted by verify-each-session

Common Failures

The same patterns appear in every Stage 0 app:

  1. Configurable URLs - API_URL=${API_URL} instead of hardcoded
  2. Pha KMS - No public upgrade log (can't answer "what ran last week?")
  3. Mutable image tags - image:v1.0 instead of image@sha256:...
  4. "Known issue" bypasses - Hash mismatch accepted with comment
  5. Dev fallbacks - if DEV_MODE: return hardcoded_key

See LEARNINGS.md for detailed patterns.

Framework

Tools

Verification Scripts

  • verify-compose-hash.py - Verify compose hash from 8090 endpoint
    ./tools/verify-compose-hash.py <app-id> [cluster]
    # Example: ./tools/verify-compose-hash.py f44389ef4e953f3c53847cc86b1aedc763978e83 dstack-pha-prod9
    

External Tools

Data Sources (for third-party auditing)

  • 8090 endpoint: https://<app-id>-8090.<cluster>.phala.network/ - TCB info, app_compose, event log
  • Note: phala cvms attestation only works for apps you own - useless for third-party auditing

Claude Code Skills

References

The Goal

"Not merely that the developer cannot misbehave, but that this is provable to users before they interact." — GitHub as a Trusted Execution Environment

DevProof is complete when users can verify, before trusting an app with sensitive data, that the developer is as constrained as anyone else.