
Agent Security
On-device policy enforcement and secret detection for AI coding agents
Replaces Lakera Guard, Zenity

Who it's for
Teams working with codebases that contain API keys, database credentials, or customer data need controls over what their AI agents can read and upload. Agent Security blocks tool calls that would expose secrets or access protected paths, and leaves a per-session audit trail that security teams can review after the fact.
Your agents run in isolated environments with no access to production credentials or sensitive files. If the threat model is prompt injection rather than data exfiltration at the execution layer, Agent Security addresses the latter but not the former.
Security teams that need to enforce consistent policies across all developer AI sessions can deploy Agent Security on every developer machine. The policy file is version-controlled and shareable, and the local audit trail records every decision for post-incident review. `solongate doctor` and `solongate repair` help maintain the guard across updates.
Your organization needs centralized policy management from a single control plane, real-time alerts to a SIEM, or audit logs aggregated across machines. Agent Security's audit trail is local per machine with no built-in aggregation.
A single developer running Claude Code or Codex CLI can install Agent Security to get a record of every file the agent touched, every network call it made, and every secret pattern it encountered. The TUI and live watch mode make the audit trail browsable without additional tooling, and `solongate trace` shows what happened in a specific directory.
You are comfortable with the agent's access scope and do not need an audit trail or access controls. For developers who want to give their agent maximum latitude without policy friction, Agent Security adds overhead without benefit in that context.
Because Agent Security makes no network calls during normal operation, it works in environments where routing agent traffic through a third-party cloud service is not permitted. The policy is a local file, the audit trail is a local file, and no telemetry leaves the machine. Cloud logging is opt-in and disabled by default.
Your requirements include centralized cloud logging, team-wide dashboards, or cross-machine policy sync. These are features of the SolonGate commercial product, not the open source Agent Security gateway.
The problem
AI coding agents operate with broad access to filesystems, network calls, and external services. An agent asked to help with code can read credential files, upload data to external endpoints, or write to paths far outside the project directory. Standard security controls at the model level, such as prompt engineering and output filtering, do not address the execution layer: an agent instructed to be careful can still read a .env file; output filtering cannot see what a file-read call returns before it executes. For teams running multiple developers with AI coding tools, the challenge compounds. There is no central record of what agents accessed across sessions, no consistent policy applied to all of them, and no audit trail to review after the fact. Today the choice is between no controls at all and routing agent traffic through a cloud-based service, which raises data-sovereignty and latency concerns of its own.
How it works
Every tool call an AI coding agent makes passes through the guard before execution. Policies allow or deny by path, command, filename, or URL, scoped to READ, WRITE, EXECUTE, or NETWORK operations. The decision is made on-device in milliseconds, and the result is written to the local audit trail regardless of outcome.
The data loss prevention layer scans for 70+ secret families including AWS keys, OpenAI keys, Stripe keys, JWTs, private keys, IBANs, passports, national IDs, and phone numbers. Patterns run in four modes: off, detect, redact, or block. In block mode, the guard also scans the content of files being uploaded, catching secrets that would not appear in the tool call parameters alone.
The guard's own state is unreachable from a tool call, and a policy file stored in a repository cannot disable the guard. Protected paths are enforced at the OS level rather than by matching words in a tool call, which means an agent that receives instructions to bypass the policy cannot do so. The .last-deny flag records the last blocked call.
Sandbox mode gives the agent a new, minimal filesystem containing only the project directory. Files and paths outside that boundary are not refused; they are simply not present. This removes an entire class of path-traversal attacks where a policy rule would have to correctly anticipate every sensitive path to block access.
Every tool call decision is written to a local tamper-evident audit trail. The CLI includes `solongate audit` (browse past decisions), `solongate watch` (live tail of tool calls as they happen), and `solongate trace` (show what the guard saw in a specific directory). No data leaves the machine unless cloud logging is explicitly enabled.
Features
- Policy-based tool call enforcement
- Built-in DLP with 70+ secret patterns
- Tamper protection and protected paths
- Sandbox mode with a minimal filesystem
- Local audit trail and live monitoring CLI
How to install
Install Agent Security by cloning the repository and running the setup script.
git clone https://github.com/solongate/agent-security.git
cd agent-security
./scripts/install.sh
solongateRecommended for this setup
Strengths
- No outbound dependency during normal operation: The guard makes no network calls during normal operation. Policies are a file, the audit trail is a file, and all decisions are made on-device. This means the guard works in air-gapped environments and never routes agent traffic through a third-party server. Unlike cloud-based guardrails that require API keys and live internet access, Agent Security functions without any external service.
- Benchmark-verified secret detection rate: SolonGate published a benchmark against Presidio, trufflehog, and gitleaks on 1,890 real pastes carrying 4,930 marked secret values. Agent Security detected 94.7% of pasted secrets and personal data, 51 percentage points ahead of the next best tool (Presidio at 43.7%). It also decodes base64-encoded values before scanning, catching obfuscated secrets that all three competing tools missed entirely.
- Apache 2.0 license, no per-seat pricing: Agent Security is Apache 2.0 licensed. Teams can run it on any number of developer machines, modify it for their environment, and use it in commercial contexts without licensing fees. There is no per-seat model, no enterprise tier required for policy management, and no account required to use the tool.
- OpenSSF and SLSA supply-chain security certifications: The repository carries OpenSSF Best Practices Passing, Silver, and Gold badges, SLSA Build Level 1, 2, and 3 attestations, and an OpenSSF Allstar certification. These are independently verified security postures for open source projects, alongside a SonarCloud quality gate, code coverage badge, and REUSE compliance status listed in the repository's README.
Trade-offs
- Very new project with 86 open issues: The repository was created in September 2026 and has 86 open issues, a high count relative to its size and age. For teams considering production adoption, the issue tracker is worth reviewing to understand which represent feature requests versus bugs or missing documentation. The core guard binary and CI pass, but the project has not yet built the long track record that older security tools carry.
- Requires Go 1.26 and a manual install script: Installation requires Go 1.26+ and running an install script from the cloned repository. There is no Docker image, no package manager entry (apt, brew, or nix), and no binary download from a package registry. Developers on managed machines or locked-down environments may not be able to run the install script without additional permissions.
- No centralized dashboard for team-wide policy management: The CLI and local TUI cover individual developer sessions well. For teams that need centralized policy management from a single control plane, a shared audit log aggregated across multiple machines, or SIEM integration, Agent Security does not currently offer those surfaces. Teams with those requirements may need to supplement with additional tooling or evaluate the SolonGate commercial product.
Tech stack
FAQ
Yes. Agent Security is Apache 2.0 licensed and free to run on any number of machines. There is no account required, no cloud dependency, and no per-seat pricing. The open source repository includes the full guard binary, CLI, and policy engine with no feature gating.
Agent Security currently supports Claude Code, Codex CLI, Antigravity CLI, and OpenCode. The guard works with any MCP-speaking agent out of the box. Support for OpenClaw, Hermes, and Chainabit is listed as coming soon in the repository.
No. The guard makes no network calls during normal operation. Every policy decision, DLP scan, and audit record is processed and stored on-device. Cloud logging is available but opt-in; it is disabled by default and must be explicitly enabled in the settings.
Prompt-level guardrails scan the inputs and outputs to the language model. Agent Security operates at the execution layer, intercepting tool calls (file reads, writes, network requests) before they run. These address different threat surfaces: a prompt filter cannot see what a file-read call returns before it is used; Agent Security blocks the file-read itself if it matches a policy rule.
No. The guard's own state is unreachable from a tool call, and a policy file stored in a project repository cannot switch the guard off. Protected paths are enforced at the OS level rather than by matching text in a tool call, so an agent that receives instructions to bypass the policy cannot execute them.