agent-guard — плагин для Claude Code: что делает и как установить
Плагин agent-guard перехватывает вызовы инструментов, блокирует утечки ключей и маскирует токены в сессиях Claude Code и Codex. Работает локально без отправки телеметрии.
MIT ★ 1 596 обновлён 2026-10-29
/plugin marketplace add hashgraph-online/awesome-codex-plugins
/plugin install agent-guard@awesome-codex-pluginsЧто делает agent-guard
Плагин встраивает хуки в жизненный цикл сессии агента. Он проверяет входящие аргументы инструментов и маскирует токены в выводе консоли. Инструмент сканирует изменённые файлы перед завершением задачи. Патчи через apply_patch проверяются ещё до применения изменений на диск.
Для запуска в системе обязательны sh, awk, git, jq и gitleaks версии не ниже 8.30. Также понадобится setsid (в Linux из пакета util-linux) либо Perl для изоляции процессов проверки. Без этих утилит хуки работать не смогут. Фильтрация персональных данных по умолчанию отключена, а обработка данных остаётся локальной.
После добавления плагина требуется вручную вызвать команду /agent-guard:setup-agent-guard. Сам плагин ничего в систему скрытно не докачивает и запрашивает подтверждение перед любыми внешними действиями.
Какие задачи решает
- перехватить случайную передачу API-ключей в аргументы команд
- замаскировать конфиденциальные токены в выводе терминала
- проверить созданные патчи до их записи на диск
- продиагностировать зависимости gitleaks перед сессией
Примеры запросов агенту
- /agent-guard:setup-agent-guard
- /agent-guard:setup-shell
- Запусти проверку окружения и покажи статус защиты от утечек
Как установить agent-guard
Через маркетплейс плагинов
/plugin marketplace add hashgraph-online/awesome-codex-plugins/plugin install agent-guard@awesome-codex-pluginsПо шагам, с командами для каждой платформы: Плагины Claude Code: маркетплейсы, установка и как собрать свой
Вопросы об agent-guard
Как установить agent-guard в Claude Code?
Сначала выполните /plugin marketplace add hashgraph-online/awesome-codex-plugins, затем запустите /plugin install agent-guard@awesome-codex-plugins. После этого вызовите команду настройки /agent-guard:setup-agent-guard.
Что делает плагин agent-guard?
Он проверяет аргументы вызовов и вывод команд в Claude Code и Codex, предотвращая утечку секретов. При обнаружении учётных данных плагин блокирует действие или маскирует конфиденциальный текст.
Какие зависимости нужны для работы agent-guard?
В системе должны присутствовать git, jq, awk, sh, gitleaks версии 8.30 или выше, а также Perl либо setsid. Проверить их наличие помогает встроенный мастер настройки.
Исходный текст
agent-guard · MIT
# Agent Guard Agent Guard is a local-first secret-leak guardrail for Claude Code and Codex. In every enabled session, its hooks inspect supported tool inputs and outputs, block common credential exposure paths before execution, mask secret-like output, and scan changed files after mutations and before stop. It is defense in depth, not a vault, DLP system, credential rotator, or replacement for GitHub Secret Scanning and Push Protection. ## Setup After installing the plugin, run the host setup skill: ```text # Claude Code /agent-guard:setup-agent-guard # Codex $setup-agent-guard ``` The guided flow diagnoses dependencies, runs `check` and `smoke-test`, and asks before downloading software. Lifecycle hooks never run an installation on their own. Setup proves local dependencies and deterministic behavior; finish the harmless live probes in the public [verification guide](https://github.com/JeongJaeSoon/agent-guard/blob/main/docs/verification.md) to establish that the current host route dispatches hooks. 런타임에는 `sh`, `awk`, `git`, `jq`, gitleaks 8.30 이상과 함께 gitleaks 버전 프로브를 격리할 `setsid`(Linux의 `util-linux`) 또는 Perl 중 하나가 필요합니다. `setup`과 `doctor`는 격리 도구가 없을 때 gitleaks 재설치 대신 운영체제별 복구 명령을 안내합니다. For Claude Code’s optional shell-output protection, run: ```text /agent-guard:setup-shell ``` This explicitly updates the shell rc. Restart the shell and agent session after it succeeds. ## Coverage and limits Claude Code supports the plugin’s matched tool inputs and outputs. Codex matches the currently supported hook surfaces (`Bash`, `apply_patch`, `Agent`, `Task`, and MCP tools); it does not claim arbitrary read/search/web interception. Both hosts require hooks to be enabled and trusted. Re-test the exact route after a plugin update or when a tool is wrapped by orchestration. `apply_patch` additions are scanned before execution. Structured write targets also receive a direct post-write scan; patch envelopes do not reliably provide a target path. Git and CI remain the backstops for repository-wide coverage. Scanner infrastructure has an explicit policy: `open` warns and continues by default; `closed` refuses the action. Secret detections block. A degraded scan is never evidence of a clean result. Default processing is local and ephemeral. PII hook handling is off by default; endpoint-backed PII processing is opt-in. Read the packaged [privacy policy](PRIVACY.md) before enabling it. ## Documentation and support - [Installation](https://github.com/JeongJaeSoon/agent-guard/blob/main/docs/installation.md) - [Integrations and known limits](https://github.com/JeongJaeSoon/agent-guard/blob/main/docs/integrations.md) - [Verification](https://github.com/JeongJaeSoon/agent-guard/blob/main/docs/verification.md) - [Configuration](https://github.com/JeongJaeSoon/agent-guard/blob/main/docs/configuration.md) - [Operations](https://github.com/JeongJaeSoon/agent-guard/blob/main/docs/operations.md) - [Privacy](PRIVACY.md), [Security](SECURITY.md), [Support](SUPPORT.md), and [third-party notices](THIRD_PARTY_NOTICES.md)
© Agent Guard contributors · MIT · hashgraph-online/awesome-codex-plugins