GHOST Security Model
June 13, 2026 · View on GitHub
What GHOST guarantees
-
Ephemeral keys. Each session mints a fresh Ed25519 keypair. The private seed is written to
GHOST_HOME/sessions/<id>/ed25519_seedwith mode0600and is shredded and removed atevaporate. Only the public key persists. -
Scope confinement. A session declares allowed tools at spawn.
actrefuses any tool outside that set (exit code 2). An empty scope list means "unrestricted" — set scopes in production. -
TTL expiry. After
ttl_seconds,actrefuses the session (exit code 3). There is no renewal by design; spawn a new body. -
Tamper-evident residue. Every action is signed over a canonical hash of
{session_id, seq, action_id, tool, action, params_hash, response_hash, http_status, timestamp}. At evaporate, a root signature covers the ordered chain.replayre-verifies each signature and the root; any edit to the residue DB makes verification fail, and the key needed to re-sign is gone. -
Credential stripping at the proxy.
GhostProxyremovesAuthorization/X-API-Key/API-Keyheaders a caller sets and injects the ephemeralX-Ghost-Tokeninstead.
What GHOST does NOT (yet) guarantee — be honest with users
- Upstream enforcement requires the gateway. The enforcement gap present in
v0.1.0 is closed in v0.1.1 via
GhostGateway. When you runghost serve(sidecar or broker mode), the gateway validatesX-Ghost-Tokenon every request and immediately rejects it afterevaporate— even for third-party APIs in broker mode. Without the gateway running, token revocation is local only (scope + TTL enforcement inact). If you need true upstream rejection, run the gateway. - Proxy bypass. If an agent calls an API without going through the
gateway or
GhostProxy, that call is unscoped and unlogged. Route all agent egress throughghost servein production. - Local trust. The ephemeral seed lives on the agent host during the session. A root-level compromise of that host during the session window can read it. TTLs should be as short as the task allows.
- RNG. Key generation relies on the platform CSPRNG via
cryptography.
Reporting
Email security concerns to ScriptMasterLabs@gmail.com. Please do not open public issues for vulnerabilities until a fix is available.
Cryptography
- Signatures: Ed25519 (
cryptographylibrary,Ed25519PrivateKey). - Hashing: SHA-256 over canonical JSON (
sort_keys, tight separators). - No custom crypto is implemented; GHOST composes vetted primitives.