Skip to the page

Agent security

An agent that can use a secret without ever reading it.

AI agents read files, call tools and write to logs. Anything they can read, they can leak. Joltrin puts two controls in front of that: a Taint Barrier that checks every tool call before it runs, and pgpkit, which seals a secret with OpenPGP and ASCII armor so the agent only ever holds ciphertext.

Get Joltrin Try the barrier in your browser

Watch it run

This is the output of go run ./examples/sealed_secret from the repository, copied from a real run. The agent in it is scripted, the keys live in memory for that run, and the barrier matches exact values in the supported encodings.

1. The agent is handed a sealed secret (572 bytes of ASCII armor). The secret is not in it.
2. Agent asks the vault to charge $12.00. Result: charge accepted (signed by key B1999BD5)
   The agent got the result, not the key.
3. Suppose the secret leaks into the agent's context anyway. It tries to send it out:
   blocked: plain text to an unlisted host (label_not_allowed_for_sink)
   blocked: base64 to an unlisted host (label_not_allowed_for_sink)
   blocked: inside a longer message (label_not_allowed_for_sink)
4. Someone swaps in a message the owner did not sign:
   refused (signed by another key): vault refused the sealed secret: signature did not verify
   refused (not signed): vault refused the sealed secret: message is not signed
5. The audit log has 4 signed, hash-chained decisions and verifies offline.
   Editing one entry makes it fail verification.

Taint Barrier: check the call, not the prompt

Order matters: check what happened first

Some calls are only safe after an earlier step. Dropping a database is routine after a verified backup and a disaster without one. Joltrin refuses the call until the session has recorded the required step, and the refusal names what is missing, such as backup_validated.

Runtime policy tools such as Microsoft's Agent Governance Toolkit, JFrog Agent Guard and Arcjet check each call against policy before it runs. That is a good first layer. Joltrin adds the question of whether the steps before the call actually happened.

pgpkit: OpenPGP with ASCII armor

Armored text passes through systems that must not read it: an automation tool, a log, a chat. The far side can still check who sent it.

Seal and sign

Encrypt to a recipient's public key and sign with your private key in one call. Keys are ed25519 and cv25519, and messages use AES-256 with the library's integrity check.

Decrypt and verify

Decryption reports whether the signature verified against the key you expected. A message that fails the integrity check returns an error, never partial plaintext.

Clear-sign

Publish readable text with a signature, for approvals and audit notes that people must be able to read and check.

Fast enough for every call

On an Apple M4, pgpkit encrypts and signs 4 KiB in about 0.3 ms and a Taint Barrier check of a 4 KiB call takes about 0.5 ms. Numbers vary by hardware.

Seal a secret from the shell

sop-mcp-server pgp keygen --name vault --out vault
printf %s "$API_KEY" | sop-mcp-server pgp seal --to vault.pub > secret.asc
sop-mcp-server pgp open --key vault.key secret.asc

Add --sign owner.key when sealing and --verify owner.pub when opening to refuse a message that did not come from you. Private keys are written with mode 0600 and are not passphrase protected, so anyone who can read the file can open every message sealed to it. Keep the private key only on the machine that opens secrets, never where the agent can read it, and keep that disk encrypted. Passphrase-protected keys are planned, not shipped. The commands are on master and ship in the next release; until then run them from a clone with go run ./cmd/sop-mcp-server pgp ....

Run it yourself

git clone https://github.com/SharedCode/joltrin
cd joltrin
go run ./examples/sealed_secret

Joltrin is open source under the MIT license. The security controls and their tests are listed in docs/SECURITY_CONTROLS.md.