# Repository Briefing: JeongJaeSoon/agent-guard
> Source: https://repoforai.com/repo/JeongJaeSoon/agent-guard (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/JeongJaeSoon/agent-guard
- **Official Docs / Website**: https://github.com/marketplace/actions/agent-guard-secret-guardrails
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Shell
- **License**: MIT
- **Engineering Health**: A (76/100 · Maintenance 35/35 · Adoption 1/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v3.17.3 (2026-12-03) — https://github.com/JeongJaeSoon/agent-guard/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Self-Hosted, CLI
- **Momentum**: 47 ★ total (+0 24h / +2 7d) · 0 forks
- **Topics**: `ai-agents`, `claude-code`, `claude-code-plugin`, `codex`, `devsecops`, `github-actions`, `gitleaks`, `pre-commit-hook`, `secret-scanning`
- **When to Use**: Best for: Teams using Claude Code or Codex that want to stop accidental secret exposure on verified tool routes and back that up with local Git and CI checks. Skip if: A standalone CI scan is sufficient, your fleet is Windows-only, or you need comprehensive DLP, credential rotation, or guaranteed coverage across every agent tool.

## Overview
```text
### Architecture & Core Mechanics
Agent Guard is a shell-based policy layer around coding-agent tools and Git. Claude Code and Codex hooks apply policy before supported commands execute, mask output where the host exposes a supported route, and trigger scans after file mutations. The native pre-commit hook, GitHub Action, and standalone CLI provide scan entry points that do not depend on agent hook dispatch.

Shell owns detection orchestration, policy, and host adapters; gitleaks provides secret scanning. Release archives and Homebrew packages use a checksum-verified, prebuilt Rust helper for literal replacement rather than moving policy or detection into the native binary. A shell fallback remains available, and Git marketplace plugins are source-only.

### Key Capabilities & Differentiators
Agent Guard can block common risky .env reads before a supported tool executes, mask secret-like values on supported output routes, and scan modified files after edits. For supported agent-driven commit and push commands, the plugin checks staged added lines and refuses options that disable Git hooks or signing. The commit gate also accounts for tracked changes that Git may stage as part of the commit itself.

When the final commit contents cannot be determined ahead of time, the plugin can scan tracked changes and untracked files rather than relying on the current index. The native pre-commit hook checks staged additions once Git has assembled the commit's contents and aborts on a finding or scan failure. The GitHub Action checks the files checked out for the push or pull request on which it runs; this is not a claim of full Git-history coverage.

### Trade-offs & Limitations
Standalone gitleaks is the simpler choice for a scan at a known Git or CI checkpoint. Agent Guard adds coverage earlier in the agent's workflow, including certain reads and output paths that a repository scanner never sees. That coverage depends on host hook dispatch and shell command interpretation, so a passing synthetic check is not evidence that every live route works. Broader scans when commit contents are uncertain are worth testing in large working trees.

Default processing is local and ephemeral, without a hosted account or telemetry collector. An endpoint-backed PII provider changes that boundary and warrants separate privacy review. Keep GitHub Secret Scanning, Push Protection, and regular credential management in place: Agent Guard is an additional control, not a vault, DLP system, EDR, or credential rotator.

### Hardware & Deployment Guide
Supported platforms are Apple silicon macOS and Linux on x64 or arm64; Windows and Intel macOS are unsupported. Existing Intel Mac installs can still use the shell/jq fallback but are not release-tested. Runtime requirements are sh, awk, git, jq, and gitleaks 8.30 or newer. The gitleaks version probe also needs setsid or Perl for process-group isolation; agent-guard doctor reports a missing isolation tool. Rust is not a runtime dependency.

Run guided plugin setup first, then use the harmless live probes to verify dispatch on the actual host tool routes you rely on. v3.17.2 moved the shell-word parser and Git gate into bin/lib. v3.17.3 refined handling of quoted and piped ripgrep commands and made a signaled hook-input validator follow infrastructure-failure policy rather than treating its input as malformed.
```

## Key Capabilities
```text
- Host integration: Claude Code and Codex plugins, a native Git pre-commit hook, a GitHub Action, and a standalone CLI
- Secret handling: Blocks common risky .env reads, masks supported tool output, and scans changed files after mutations
- Git coverage: Scans staged additions and accounts for tracked changes that Git may stage during a commit
- Direct scans: scan-working-tree, scan-staged, and scan-path support explicit working-tree, index, and path checks
- Packaging: Release archives and Homebrew packages include a checksum-verified Rust literal-replacement helper with a shell fallback
- Support diagnostics: Metadata-only JSONL export creates a new mode-0600 file and refuses to overwrite an existing file or symlink
```

## Quick Start / Clone
```bash
agent-guard scan-working-tree
agent-guard scan-staged
agent-guard scan-path .
```
