ArmorCodex — плагин безопасности для Codex и Claude Code: установка
Плагин armorcodex для Codex сверяет вызовы Bash, apply_patch и MCP-инструментов с заранее объявленным планом намерений и правилами политики.
MIT ★ 1 596 обновлён 2026-10-29
/plugin marketplace add hashgraph-online/awesome-codex-plugins
/plugin install armorcodex@awesome-codex-pluginsЧто делает armorcodex
Плагин ставит на Codex хуки. sessionStart и userPromptSubmitted подталкивают агента зарегистрировать план намерений через MCP до первого инструмента. preToolUse сверяет вызов с планом и правилами политики, а на вызов вне плана возвращает отказ через permissionDecision: deny. postToolUse пишет строку аудита в бэкенд ArmorIQ.
В бандле манифест .codex-plugin/plugin.json, конфиг .codex/, регистрация MCP-сервера armorcodex-policy в .mcp.json, скрипты хуков и роутер в scripts/. MCP-инструменты: register_intent_plan, policy_update для правил на естественном языке и policy_read. permissionRequest учитывает решение политики раньше, чем пользователь увидит запрос.
Хуки Codex срабатывают на Bash, apply_patch и вызовы MCP-инструментов. Правки файлов другими способами и веб-активность проходят мимо, для них нужны отдельные средства контроля. Ставится плагин скриптом install_armorcodex.sh или через маркетплейс Codex; в Claude его берут из маркетплейса awesome-codex-plugins.
Какие задачи решает
- запретить вызовы вне объявленного плана
- задать правила безопасности обычным текстом
- получить журнал аудита вызовов Bash
- отклонить опасную команду до запроса подтверждения
- зафиксировать намерения сессии до первого инструмента
Примеры запросов агенту
- Зарегистрируй план намерений для этой задачи через
register_intent_plan, потом начинай правки. - Добавь правило через
policy_update: не трогать файлы за пределамиsrc/. - Покажи текущие правила политики через
policy_read.
Как установить armorcodex
Через маркетплейс плагинов
/plugin marketplace add hashgraph-online/awesome-codex-plugins/plugin install armorcodex@awesome-codex-pluginsПо шагам, с командами для каждой платформы: Плагины Claude Code: маркетплейсы, установка и как собрать свой
Вопросы об armorcodex
Как установить armorcodex в Claude Code?
Сначала добавьте маркетплейс: /plugin marketplace add hashgraph-online/awesome-codex-plugins. Потом поставьте плагин: /plugin install armorcodex@awesome-codex-plugins.
Что делает armorcodex?
Сверяет вызовы инструментов с планом намерений и правилами политики, отклоняет вызовы вне плана и отправляет записи аудита в бэкенд ArmorIQ.
На какие вызовы реагируют хуки?
На Bash, apply_patch и вызовы MCP-инструментов. Правки файлов другими путями и веб-активность вне этой проверки, для них нужны отдельные средства контроля.
Исходный текст
armorCodex · MIT
# ArmorCodex
Intent-based security enforcement for OpenAI Codex. Hooks Codex's `Bash`, `apply_patch`, and MCP tool calls against a declared intent plan and policy rules. Blocks intent-drift, gates by natural-language policy rules, and ships signed audit logs to the ArmorIQ backend.
This directory is the plugin bundle. The full project lives at the repository root.
## Install
```bash
curl -fsSL https://armoriq.ai/install_armorcodex.sh | bash
```
Or via Codex marketplace:
```bash
codex plugin marketplace add armoriq/armorCodex
codex plugin install armorcodex@armoriq
```
## What this bundle contains
- `.codex-plugin/plugin.json` plugin manifest (Codex spec)
- `.codex/` Codex-specific config
- `.mcp.json` MCP server registration (`armorcodex-policy`)
- `hooks/` global hook scripts (`preToolUse`, `postToolUse`, `sessionStart`, `userPromptSubmitted`)
- `scripts/` bootstrap, hook router, lib modules
- `assets/` plugin icon
## What it does
| Surface | Behavior |
|---|---|
| `sessionStart` / `userPromptSubmitted` | Injects directive: Codex registers its intent plan via MCP before any tool runs |
| `preToolUse` | Verifies tool against the registered plan and policy. Returns `{"permissionDecision":"deny",...}` for out-of-plan or policy-denied calls. |
| `postToolUse` | Async audit row to ArmorIQ backend (fire-and-forget WAL) |
| `permissionRequest` | Honors policy decisions before user is prompted |
| MCP tools | `register_intent_plan`, `policy_update` (natural-language rules), `policy_read` |
## Documentation
- Full docs: https://docs.armoriq.ai/armorcodex
- Source repo: https://github.com/armoriq/armorCodex
- ArmorIQ platform: https://armoriq.ai
© ArmorIQ · MIT · hashgraph-online/awesome-codex-plugins