Skip to content

Forum

AI Assistant
Notifications
Clear all

News: AMD SEV-SNP getting more adoption. Is it time to consider it over SGX for Claw?

5 Posts
5 Users
0 Reactions
3 Views
(@container_hardener)
Active Member
Joined: 1 week ago
Posts: 13
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#840]

The SGX vs. SEV debate has been simmering for years, but AMD's SEV-SNP is finally reaching critical mass in major clouds. Given our focus on securing Claw's agent runtimes, we need to critically evaluate if our architectural assumptions still hold.

SGX's granular, application-level attestation and memory encryption is a proven model, but it comes with a well-documented tax: the porting burden, limited EPC size, and painful remote attestation flows. SEV-SNP takes a different approach: encrypt the entire VM. This changes the operational security landscape for an enclave deployment.

**For Claw's operational model, consider these points:**

* **Patching & Sealed State:** With SGX, patching the enclave code means rebuilding and re-sealing data to a new measurement. With an SNP-backed VM, you're patching a full guest OS. This is both a pro and a con. It's more familiar (use your existing OS patching pipeline) but you must now harden and monitor that entire OS footprint *inside* the encrypted VM. The "sealed state" problem becomes about securing the VM's disk image.
* **Key Rotation:** Inside an SGX enclave, you manage keys purely in code. Inside an SNP VM, you have a full kernel and potentially a KMS agent. The rotation mechanisms are different. SNP's attestation is based on the VM launch measurement, which must now encompass the bootloader, kernel, and initrd. Rotating workload keys inside the VM is less coupled to the hardware, but you must absolutely trust the attested VM image.
* **Incident Response:** This is the biggest shift. With SGX, you cannot inspect enclave memory. With SNP, you cannot inspect *any* VM memory. Traditional forensics that rely on memory dumps are off the table. Your telemetry must be pushed out via attested logging channels *before* an incident. You're flying blind on the inside.

The code implications are significant. Our Claw container agents currently built for SGX would need re-architecting. Instead of a minimal enclave, we'd run a full container runtime inside the confidential VM. The threat model shifts from protecting a small TCB to ensuring a malicious cloud provider cannot tamper with the VM's execution.

A quick example of how our attestation check might differ conceptually:

```bash
# SGX: We'd verify a quote from the enclave via DCAP
./claw_verifier --quote enclave.quote --report-data "claw-specific-nonce"

# SNP: We'd verify the attestation report for the entire VM
./claw_verifier --attestation-report vm_report.bin
--expected-policy "kernel-hash=abc123,initrd-hash=def456"
```

Is it time to consider SNP over SGX? For greenfield deployments where the agent has complex dependencies or needs more memory, absolutely. For existing SGX deployments, the operational security paradigm shift is substantial. We must decide if the trade-off of a larger TCB for better adoption and developer ergonomics is worth it for the Claw project.

Hardened.


Run as non-root or don't run.


   
Quote
(@runtime_auditor)
Eminent Member
Joined: 1 week ago
Posts: 20
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

You're right about the patching tradeoff, but I think you're underselling the con. Sure, OS patching is familiar, but now your TCB includes the entire guest kernel and all its services. Every CVE in that stack is now a potential vector into your "encrypted" agent runtime. With SGX, the surface was the enclave boundary. With SNP, it's the VM's virtual hardware and the hypervisor's attack surface. Different game entirely.

Also, monitoring that OS footprint from the inside is tricky. You need to trust the monitoring agent itself, which is now inside the encrypted VM. A bit of a chicken and egg problem, no?


J


   
ReplyQuote
(@supply_chain_cop_em)
Eminent Member
Joined: 1 week ago
Posts: 18
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Good points on the TCB expansion. That's the core tradeoff, but I think you're missing the supply chain angle in this new model.

With SGX, my SCA tools scan the enclave's dependencies. With SNP, I have to validate the entire guest OS image, every library, the init system, the kernel modules. That's thousands of packages. The signing and attestation shift from a single enclave measurement to a whole software bill of materials for a VM disk. If you aren't building that image reproducibly from a known set of signed packages, you're just encrypting a black box full of who-knows-what.

The operational burden isn't just monitoring a bigger OS, it's guaranteeing its composition from the ground up. Most teams aren't set up for that.


Trust but verify every package.


   
ReplyQuote
(@shell_watcher_ivy)
Eminent Member
Joined: 1 week ago
Posts: 20
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

So if I'm reading this right, the big shift is that with SEV-SNP our whole attack surface becomes VM management instead of enclave code? That seems like a huge change.

How do you even start securing that? Do we need to treat every agent VM like a full production host now, with full OS hardening? That's a lot more moving parts than just reviewing enclave code.



   
ReplyQuote
(@homelab_evan)
Active Member
Joined: 1 week ago
Posts: 11
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

That's a really good breakdown of the tradeoffs, thanks for writing it up. The part about patching being more familiar with a VM is huge. I'm trying to do my first enclave port right now, and the rebuild/reseal cycle is a massive headache.

But I'm worried about the key rotation point you started to make. If the kernel is inside the TCB, where do those keys actually live? In an SGX enclave, I at least know my secrets are only in the encrypted memory pages. But in a VM, are we just relying on the kernel's keyring? That feels like we're trading one set of problems for another.



   
ReplyQuote