All posts
Security & Compliance
3 min read• 11/24/2026

Beyond SOC 2: Building Attestation-First Architectures for Agentic AI

SOC 2 Type II reports won't save you when autonomous agents execute arbitrary code on sensitive data. Here is how we implement hardware-backed remote attestation and confidential enclaves in high-stakes client infrastructure.

Share X LinkedIn

Tip: use ← / → to browse posts.

Beyond SOC 2: Building Attestation-First Architectures for Agentic AI
## The Paper Shield Problem in Enterprise AI For two decades, enterprise security compliance has been an exercise in paper collection. You write policies, enforce branch protection, configure identity providers, and hand an auditor a bundle of screenshots once a year to receive a SOC 2 Type II report. That compliance theater collapses the moment you deploy autonomous LLM agents with tool execution privileges. When an agent dynamically plans API calls, reads customer PII, generates transient queries, and updates databases, an auditor’s spreadsheet cannot prove what code actually ran inside the interpreter at 03:14 UTC. If a prompt injection attacks your orchestrator, or if a zero-day compromises your container runtime, traditional audit logs can be forged, silenced, or bypassed entirely. At BetterCallHashim, we stopped treating enterprise security as a post-hoc audit problem. In our high-assurance deployments across fintech, healthcare, and defense-adjacent systems, we run an **attestation-first architecture** built on confidential computing primitives (AMD SEV-SNP and Intel TDX). If you cannot cryptographically prove what code is executing inside an isolated enclave, you do not have security—you have plausible deniability. --- ## Moving from Identity to Cryptographic Hardware Attestation Traditional zero-trust networking verifies *identity*: "Is this request coming from service account X with JWT Y?" Attestation-first architecture verifies *state and environment*: "Is this process running inside an uncompromised memory enclave whose boot measurements match our signed baseline, running an immutable binary, and isolated from the host OS hypervisor?" Here is how we split the execution pipeline: 1. **The Enclave Boundary**: The entire agent orchestration runtime, its local vector cache, and its tool execution layer run inside a Confidential Virtual Machine (CVM). Even the cloud provider’s root administrator cannot peer into guest RAM. 2. **Hardware Measurement**: Upon initialization, the AMD Secure Processor generates a cryptographic quote hashing the virtual machine’s memory space, firmware, kernel, and initial ramdisk. 3. **KMS Policy Binding**: Our key management service (KMS) never releases decryption keys for customer datasets to an IAM role alone. It releases keys *only* after verifying the hardware attestation quote against an expected measurements baseline. ```python import base64 import requests from cryptography.x509 import load_der_x509_certificate def verify_enclave_quote(quote_bytes: bytes, expected_measurement: str) -> bool: """ Validates an SEV-SNP attestation quote against hardware certificates and asserts the runtime measurement matches the trusted baseline. """ resp = requests.post("https://kds.amd.com/vcek/v1/sev", data=quote_bytes[:0x200]) if resp.status_code != 200: raise PermissionError("Untrusted hardware platform certificate") # Parse measurement block from quote payload (offset 0x090:0x0c0) actual_measurement = base64.b16encode(quote_bytes[0x90:0xC0]).decode('ascii').lower() if actual_measurement != expected_measurement.lower(): raise SystemError(f"Integrity violation! Found: {actual_measurement}") return True ``` If a malicious actor alters a single container layer, the hardware measurement changes, the KMS rejects the quote, and the enclave boots into a sterile, zero-data environment. --- ## Practical Hardening Patterns for Production Enclaves Implementing attestation-first patterns requires cutting away the bloated, dynamic runtime assumptions standard in modern web development. When designing client systems, we follow three non-negotiable rules. ### 1. Zero Writable File Systems Enclaves must boot with ephemeral, read-only root filesystems mounted over `dm-verity`. Any transient state, such as temporary context windows or embeddings, lives solely in encrypted RAM blocks. If an agent task triggers a rogue bash execution, the payload cannot persist a malicious payload to disk or alter the runtime binary for subsequent executions. ### 2. Egress Filtering via Deterministic Proxies Autonomous agents should never talk directly to the public internet. All outbound calls (to external APIs, LLM providers, or data stores) route through a dedicated egress-attested TLS termination proxy that enforces: - Strict hostname whitelisting. - Contextual schema verification on payloads. - Real-time PII tokenization that swaps real identity records with synthetic handles before outbound transit. ### 3. Immutable Execution Receipts Every agentic execution must emit a signed receipt containing: - The input prompt digest. - The execution step trace. - The attestation quote hash of the enclave that ran the transaction. These receipts are appended to a tamper-proof, append-only log ledger. When an auditor asks for proof of compliance, we don’t hand them policy manuals. We hand them mathematical proofs that every operation was executed within a cryptographically verified sandbox. --- ## The Engineering Reality: Overhead vs. Peace of Mind Adopting this model isn't trivial. Remote attestation increases cold-boot times by 800ms to 2.4s. Debugging enclave failures requires structured serial-console logging because SSH access is explicitly disabled in production. Yet the trade-off is clear: for any organization building products that handle sensitive customer assets—from payroll engines to medical diagnostics—conventional compliance is obsolete. If your software relies on autonomous models, attestation-first architecture is the only way to retain control.
confidential-computing
security
zero-trust
ai-agents
Share X LinkedIn

What clients say

Real reviews from founders and teams we've shipped with.

5.0 · 6 reviews
"Live streaming forex content was a huge lift — Hashim delivered without a single hitch."
Yusuf K.
Founder, Live Forex TV
"The Stripe billing rewrite is a thing of beauty — subscriptions, proration, dunning, all handled."
Tomás G.
Founder, Meterly
"Broker directory that ranks and converts. The SEO foundations alone were worth it."
Rohit D.
Founder, Stock Broker of India
"From concept to launch in weeks. The browser project set a new bar for our team."
Vikram J.
Founder, Finup Browser
"Delivered a scalable app directory that keeps growing. Best engineering partner we've had."
Priya V.
Founder, AppsWant
"GitHub Actions, preview environments, semantic releases — the DX Hashim set up is chef's kiss."
Julian F.
Platform Engineer, Codewave