Supply Chain
tee-minimal profile, dependency surface, and audit checklist for TEE inference
Supply Chain
TEE inference turns the model runtime into part of the trusted computing base. A3S Power keeps the default developer path productive, but gives production TEE operators a smaller tee-minimal profile for security review.
Feature Profiles
Prop
Type
Recommended TEE Profile
Use tee-minimal when the deployment target is AMD SEV-SNP or Intel TDX and the operator wants to avoid large inference dependency trees:
cargo build --release --no-default-features --features tee-minimalThis profile includes:
- picolm pure Rust GGUF layer-streaming inference.
- TEE detection and attestation paths for SEV-SNP, TDX, and simulation.
- Model SHA-256 integrity checks and attestation model binding.
- AES-256-GCM encrypted model loading, memory zeroing, and log redaction.
- RA-TLS transport through the
tlsfeature. - AF_VSOCK transport through the
vsockfeature for a3s-box MicroVM deployments.
It excludes:
- mistralrs / candle as the default broad-compatibility backend.
- llama-cpp-2 and the llama.cpp C++ inference engine.
- Hugging Face pull support unless
hfis explicitly enabled.
TLS and HTTP crypto dependencies may still include native crypto build components such as ring or aws-lc-sys; tee-minimal removes native inference engines, not every native dependency in the full network stack.
Backend Audit Surface
The picolm path is split into small Rust modules under src/backend/picolm.rs, src/backend/gguf_stream.rs, and src/backend/picolm_ops/. It currently covers:
- GGUF v2/v3 parsing with zero-copy tensor slices and bounds checks.
madvise(MADV_DONTNEED)page release after layer processing.- Multi-head / GQA attention, SwiGLU / GeGLU feed-forward, RoPE, RMSNorm, and KV cache.
- Q4_K, Q5_K, Q6_K, Q8_0, Q4_0, F16, and F32 dequantization.
- Fused dequant+dot kernels, Rayon matmul, NEON and AVX2 optimized paths.
- JSON grammar-constrained output, tool-call parsing, and speculative decoding.
Run these checks from crates/power when auditing a release:
# Compare dependency surfaces.
cargo tree --no-default-features --features tee-minimal --edges no-dev | wc -l
cargo tree --edges no-dev | wc -l
# Review unsafe blocks in the layer-streaming inference path.
rg -n "unsafe" src/backend/picolm.rs src/backend/gguf_stream.rs src/backend/picolm_ops src/tee/encrypted_model.rs src/tee/epc.rs
# List native build scripts in the selected profile.
cargo tree --no-default-features --features tee-minimal --edges buildEncrypted Model Handling
Power has three encrypted model paths:
Prop
Type
Audit Checklist
- Pin the exact Power version and feature profile.
- Reproduce the dependency tree for the release artifact.
- Review all
unsafeblocks in the selected inference and TEE paths. - Verify model hashes are configured before enabling
tee_mode. - Check that attestation
report_databinds[nonce(32)][model_sha256(32)]for model-specific verification. - Keep
redact_logs = trueandsuppress_token_metrics = truefor sensitive deployments. - Prefer
streaming_decrypt = truewithpicolmorin_memory_decrypt = truefor other backends when plaintext disk writes are unacceptable. - Validate RA-TLS clients extract and verify the custom attestation X.509 extension before sending prompts.