Back to gallery
solongate/agent-security on GitHub — Local-first, open-source security gateway for AI coding agents. Enforce tool-call policies, detect secrets, and audit actions on-device.
solongate
Built bysolongate/

agent-security

Local-first, open-source security gateway for AI coding agents. Enforce tool-call policies, detect secrets, and audit actions on-device.

Stars
696
Forks
109
Watchers
696
Open issues
137
GoApache-2.0 main Updated 2 hours ago~12 stars/day lifetime
Editor's take

SolonGate Agent Security is a local-first gateway that checks a coding agent's tool calls against your policy before they run, with secret detection, rate limits and a local audit trail. The policy is a file, the audit log is a file, and the guard makes no network calls, with no account and no telemetry. That is the right shape for teams nervous about agents reading .env files or running destructive commands. The tradeoff: it needs Go 1.26+, installs by cloning and running a script, and the README is thin on which agents it hooks into, so expect setup reading. Apache-2.0, about 700 stars.

Use this if

You want policy enforcement on agent tool calls that never phones home.

Skip if

You need signed, auditor-verifiable logs; Tracekit goes further on proof.

AI & MLDevOps & Deploy
Topics
agent-runtime-securityagent-securityai-agent-securityai-agentsai-security-toolai-security-toolsantigravityclaude-codecodexmcpmcp-gatewaymcp-securityopenclawopencodesecuritysecurity-tools
Quick install
# Install as Go dependency:
go get github.com/solongate/agent-security

Inferred from Go · always double-check against the official README below.

README — rendered from solongate/agent-security
SolonGate Agent Security. Open-source security for AI agent actions.
ci codeql release license: Apache 2.0 Go 1.26+
Stats Badges
Star History Rank Mentioned in Awesome AI Repos
Security Badges
OpenSSF Best Practices Passing OpenSSF Best Practices Silver OpenSSF Best Practices Gold
OpenSSF Baseline 1 OpenSSF Baseline 2 OpenSSF Baseline 3
OpenSSF Scorecard openssf Allstar

SLSA Build Level 1 SLSA Build Level 2 SLSA Build Level 3

REUSE status

Security Rating Reliability Rating Maintainability Rating
Quality Gate Coverage
CodeFactor Codacy Grade Snyk Security

SolonGate Agent Security is SolonGate's open source, local first security gateway for AI coding agents. It checks tool calls against your policies before they run, with secret detection, rate limits and a local audit trail.

This repository is the Agent Security gateway. The rest of the portfolio is at solongate.com.

Everything stays on the machine. The policy is a file, the audit trail is a file, and the guard makes no network calls. No account, no telemetry.

A tool call from an AI agent passes through SolonGate, which runs a policy check, DLP scan, rate limit and logging, then allows or blocks it before the tool runs

Install and use

Requires git to clone this repo. Go 1.26+ is needed too; install.sh downloads the official go.dev build for you if it is not already there, regardless of OS.

git clone https://github.com/solongate/agent-security.git
cd agent-security
./scripts/install.sh
solongate

Then open a new terminal. Hooks load when a session starts, so an already open one is not guarded yet.

What it looks like when it fires

A real Claude Code session: the agent reaches for a .env, the guard refuses it, and the agent says so rather than quietly working around it.

A Claude Code session in which SolonGate blocks access to a .env file and Claude reports the refusal instead of working around it

What it does

Layer What it does
Policy rules Allow or deny by path, command, filename or URL, scoped to READ, WRITE, EXECUTE or NETWORK.
DLP 70+ built in secret patterns plus your own, in four modes: off, detect, redact, block.
Egress In block mode, refuses an upload whose file holds a secret, which pattern matching on the call alone cannot see.
Rate limits A cap per minute, hour or day.
The prompt A shim masks the outbound request body on Claude Code, which no tool call hook can reach.
Tamper protection The guard's own state is unreachable from a tool call, and a policy in a repository cannot switch it off.
Protected paths A path the OS itself refuses the agent, rather than a rule matched against the words in a tool call.
Sandbox The agent's whole root is a new, minimal filesystem holding only the project; everything else is not refused, it is not there.

The CLI

solongate                        the TUI: policies, audit, settings
solongate policy                 list, create and edit the policy
solongate dlp                    secret detection
solongate ratelimit              the rate limit
solongate policy protect <path>  lock a path, and say what the lock is worth
solongate policy protect list    what is actually holding each path, read from disk
solongate sandbox list           the boxes this machine has, and their ids
solongate sandbox 001 claude     start the agent inside box 001
solongate sandbox --explain 001  everything that is in that box
solongate run claude             start an agent with protected paths out of reach
solongate audit                  browse the audit trail
solongate watch                  live tail tool calls
solongate trace                  what the guard saw in this directory
solongate doctor                 health check
solongate repair                 restore the guard, hooks and settings
solongate update                 pull the newest version and reinstall
solongate range                  how far an update is allowed to move
solongate range short            every commit on the branch
solongate range long             tagged releases only, reliable (the default)

Supported agents

Claude Code Codex CLI Antigravity CLI OpenCode
OpenClaw (soon) Hermes (soon) Chainabit (soon) Your tool

Contributors ✨

Thanks to these wonderful people. Without their help, this project would not have made it this far.

codeyevsky
codeyevsky

💻
Emirhan Demir
Emirhan Demir

💻
tnalbant
tnalbant

💻
Sahil
Sahil

💻
Sleep8h
Sleep8h

💻
Nikita Dereglazov
Nikita Dereglazov

💻
Oscar
Oscar

💻
Liu XingJian
Liu XingJian

💻
Hamza
Hamza

💻
zgy
zgy

💻
Asish
Asish

💻
Stephen Cork
Stephen Cork

💻
Utkarsh Agarwal
Utkarsh Agarwal

💻
Бат-Орших
Бат-Орших

💻
Shahid Shamim Shah
Shahid Shamim Shah

💻
Chavaaa
Chavaaa

💻
Sumeet Jha
Sumeet Jha

💻
Danny Ward
Danny Ward

💻
ShahadatTest
ShahadatTest

💻
samuel akinade
samuel akinade

💻
j-ai-cmd
j-ai-cmd

💻
Arif Rahman
Arif Rahman

💻
fchengyan
fchengyan

💻
Abdelrhman Mohamed
Abdelrhman Mohamed

💻
Sanskar Prakash Tambe
Sanskar Prakash Tambe

💻
Sai Asish Y
Sai Asish Y

💻
Ipsita Mondal
Ipsita Mondal

💻
Tausif Ahmed
Tausif Ahmed

📖
Indra Prasetya
Indra Prasetya

💻
Dylan Duan
Dylan Duan

💻
Jay
Jay

💻
MateusSilva
MateusSilva

💻
aryankalantri
aryankalantri

💻
Aloneangel20
Aloneangel20

💻
Lenin Mookiah
Lenin Mookiah

💻

This project follows the all-contributors specification. Contributions of any kind welcome.

Live data via GitHub REST API · Cached 30 min · Created 27 Sept 2026