Skip to content
SurendraS26Public

About

TPM-Assisted Secure Attestation Framework for AI Agents

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

278 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrustEdge Bare/Box Edition Logo

TrustEdge - Bare/Box Edition

TrustEdge is a TPM-based security framework for AI agents. It intercepts every action an agent wants to take, checks it against policy, verifies attestation via a TPM quote, and asks a human for final approval. The agent cannot bypass or approve its own actions, approved scripts run only inside an isolated desktop sandbox.

Usage

Installing TrustEdge Bare/Box Edition

git clone https://github.com/SurendraS26/trustedge.git
cd trustedge
docker compose build
docker compose up

Note: On first run c1 downloads the model and is stored in the trustedge-ollama volume, wait for it to be ready.

Launch AI agent in new terminal:

./scripts/agent.sh
> open chromium and play favourite music on youtube

Note: Run this in a separate terminal window to interact with the agent. Ctrl-C only closes the prompt, the containers keep running. Type q to quit.

Sandbox Desktop using noVNC:

<Your-Web-browser> http://localhost:6080/vnc.html

Note: Vnc password - trustedge , Port - 6080 and approved scripts run inside the desktop

Audit dashboard using glow:

./scripts/dashboard.sh

Decision Logs JSON:

<Your-Web-browser> http://localhost:8000/log

System Stats:

  • TPM PCR live view - tpm-view
  • GPU stats - gpu-view
  • Top - top-view
./scripts/<?-view>.sh

tpm-view.sh host-side needs tpm2-tools and port 2321 from trustedge-c2.
gpu-view.sh needs host nvidia-smi Nvidia GPU's.
top-view is top tool for sandbox environment. q to quit.

Architecture Diagram

graph LR
    U["User"] --> A["c1 · Agent"]
    A --> P["c3 · Policy"]
    P --> T["c2 · TPM quote"]
    T --> H["Human approval"]
    H --> S["c4 · Sandbox"]
    P -.->|fail / reject| D["Deny"]
    T -.->|fail / reject| D
    H -.->|fail / reject| D
Loading

My Workstation Specs

OSArch Linux x86_64
WMHyprland
CPUIntel Core i7-14700HX (16+12) @ 5.50 GHz
GPU 1NVIDIA GeForce RTX 4060 Max-Q / Mobile
GPU 2Intel Raptor Lake-S UHD Graphics @ 1.60 GHz
Memory15.32 GiB
Disk937.73 GiB

Requirements

  • Host Machine - Linux distro's
  • Docker Engine + Docker Compose v2
  • TPM2 tools tpm2-tools and nvidia-smi for Nvidia GPU
  • NVIDIA GPU + NVIDIA Container Toolkit, for GPU-accelerated c1

Warning: Use a GPU for running models.

Acknowledgement

This project builds on swtpm and libtpms (IBM Corporation, 3-Clause BSD) for TPM emulation, tpm2-tools for attestation, and Ollama for local model serving, and is built on Arch Linux, whose components carry their own respective open-source licenses.

References

License

MIT License

Copyright (c) 2026 Surendra S

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

TPM-Assisted Secure Attestation Framework for AI Agents

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages