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.
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
- It scans each tool call's destination, keys and values for registered secrets and PII, including a value split across arguments.
- It recognises private keys by structure: armored PGP private key blocks, PEM and OpenSSH private keys, even with spacing, line wrapping or zero-width characters in the header.
- Plain text and base64 forms of a registered value are both matched.
- Honeytokens, fake credentials you plant, raise an alert when one appears in a call.
- Enforce mode stops the call. Observe mode lets it run and records what would have been blocked, so you can pilot it on real traffic first.
- Verdicts and logs never contain the protected value. Each decision is a hash-chained, Ed25519-signed receipt you can verify offline.
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.