Wrap
Content is marked with signed Guard Band boundaries that authenticate the body and marker metadata.
LLM application security
Guard Bands is an open protocol and small library for making user-controlled content inert by default before it reaches trusted instructions, policy paths, or MCP tool execution.
INERT:START v nonce iat exp
Untrusted content is wrapped, signed, bound to context, freshness-checked, verified, and audited before sensitive handling.
VERIFY -> ENFORCE -> AUDIT
The problem
Documents, emails, tickets, web pages, and other untrusted inputs can contain text that looks like instructions: ignore policy, reveal private data, call a tool, update a record, or treat user content as system policy.
Prompt wording helps, but it is not a security boundary. The application needs a verifiable way to distinguish untrusted content from trusted control paths before sensitive operations happen.
The approach
Guard Bands adds a cryptographic control plane around untrusted content, similar in spirit to how prepared statements separate SQL data from SQL commands.
Content is marked with signed Guard Band boundaries that authenticate the body and marker metadata.
The signature binds content to context such as tenant, user, request, workflow, issuer, lifetime, or policy path.
The application checks the marker, MAC, nonce, key id, issuer, expiry, and expected context before trust.
Tool calls and policy-controlled paths fail closed unless the content was verified first.
Two-channel architecture
The separate reference deployment demonstrates a two-channel architecture: a data plane that can only wrap untrusted content into signed inert blocks, and a control plane that holds the tools. The planes deploy as separate services on different ports, hosts, or network segments, and they hold different keys: the data plane signs with an Ed25519 private key, and the control plane holds only the public key, so even a fully compromised control plane cannot forge data-plane provenance. The complete deployment lives in guard-bands-reference, rather than in the core library.
The control plane admits data only when the signature proves it came through the data plane (key id, issuer, and channel binding are all authenticated), and takes instructions exclusively from its own authenticated channel. An injected instruction inside a document selects nothing, and tampered, unwrapped, or foreign-issuer content is rejected fail-closed at the single cryptographic join point. Both planes refuse to start without real key material — there are no development fallback keys.
Threat model
Guard Bands helps prevent forged safe-content markers, tampering, replay in the wrong context, confusion between data and instructions, and unverified content reaching sensitive tool calls.
It does not make LLMs intrinsically safe or truthful. Production systems still need authorization, least-privilege tools, sandboxing, output validation, monitoring, and human review where appropriate.
Project structure
The reusable boundary mechanism now lives independently from the larger evaluation stack. Python and TypeScript share protocol v2 and deterministic conformance vectors; operational examples live in a separate reference repository.
The canonical protocol implementation, FastAPI middleware, MCP integration, replay primitives, and normative specification.
Open guard-bandsA Node.js implementation of protocol v2 and MCP wrappers, tested against the same language-neutral vectors.
Open guard-bands-tsThe API, SDK, two-channel services, identity, audit, secret-manager, Docker, and evaluation examples.
Open guard-bands-referenceReference deployment
guard-bands-reference contains the local multi-service stack with API, Postgres, Keycloak, oauth2-proxy, audit logging, cost checks, SDK examples, and demo integration flows.
It also includes a hardened production overlay with a TLS front door, optional AWS Secrets Manager or HashiCorp Vault secret backends, release notes, API examples, replay-protection notes, key-management expectations, and security tests around the boundary mechanism. Core code is consumed as a versioned dependency and is not copied between repositories.
Validation
Python and TypeScript reproduce deterministic protocol v2 signatures byte-for-byte. The suites cover signature verification, context binding, content tampering, marker hardening, algorithm and version confusion, detached JSON values, MCP call binding, middleware enforcement, and replay behavior.
The result is not a complete LLM security platform. It is a concrete, inspectable pattern for separating untrusted data from application authority.
Project status
Guard Bands is suitable for reviewing the pattern, testing the API flow, evaluating the threat model, experimenting with LLM boundary enforcement, and extending the implementation.
Python v0.11.0, TypeScript v0.1.0, protocol v2, HMAC and Ed25519, inline and detached envelopes, FastAPI middleware, MCP tools/call protection, conformance vectors, and a separate reference deployment.
The libraries are not yet published to PyPI or npm. Remote KMS/HSM signing is designed but not implemented, and independent protocol/security review is still required before v1.0.0.
Review is publicly tracked in GitHub issue #31. Guard Bands authenticates data boundaries; it does not make signed content true, benign, or authorized, and it does not replace application policy.