feat: Real-time leak detection scan endpoint + vault-aware audit trigger #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two complementary features that turn avault from a passive secret store into an active security layer:
Part 1: Scan Endpoint
Problem
Cobot's leak detection (ultanio/cobot#145) is blocked because the agent doesn't know what secrets look like — and it shouldn't. Giving the agent regex patterns derived from secrets would partially expose the secrets themselves.
Solution
The daemon already holds all secrets in RAM. Add a
scancommand that checks arbitrary text against all known secret values:Key principle: The text comes TO the daemon for scanning. Secrets never leave the daemon. The agent never sees the patterns.
Implementation
Cobot Integration (ultanio/cobot#145)
What gets scanned
Part 2: Vault-Aware Audit Trigger
Problem
An agent might not leak a secret directly but could write code that accesses secrets — e.g., generating a script that reads from avault, creating a cron job that exports secrets, or writing a config file that references vault paths. This is a second-order leak: the secret doesn't appear in the message, but the message creates a pathway to extract it.
Solution
A behavioral audit trigger that detects vault access patterns in agent output and injects a security review into the system prompt:
Detection Patterns
Scan every outbound message AND tool call for:
Response: System Prompt Injection
When a pattern triggers, the next LLM call gets an extra system prompt block:
Implementation in Cobot
Why Both Parts Matter
avault exportPart 1 = catches the secret itself (content scanning)
Part 2 = catches access to the secret store (behavioral scanning)
Together they form a two-layer defense.
Scope
avault side (this repo):
scancommand toVaultDaemon.handle_request()(~20 lines)avault scan <text>for testingCobot side (ultanio/cobot#145):
loop.before_sendhook for Part 1Refs
Filed by Doxios 🦊