ArmorCodex
Provides intent-based security enforcement for OpenAI Codex, intercepting Bash commands to verify against intent plans and policy, with optional audit logging.
ArmorCodex
ArmorIQ intent-based security enforcement for OpenAI Codex. ArmorCodex asks Codex to declare a Bash execution plan before it runs commands, checks each Bash command against that plan and local policy, and optionally sends signed intent and audit events to ArmorIQ IAP.
Current Codex Harness
ArmorCodex is built for the current Codex hook harness documented by OpenAI:
Hooks are discovered from
~/.codex/hooks.jsonand<repo>/.codex/hooks.json.Hooks require
[features] hooks = truein~/.codex/config.toml.PreToolUse,PermissionRequest, andPostToolUsecurrently emitBashonly.Non-Bash tools such as MCP, file edits, web search, and write/apply-patch are not directly intercepted by Codex hooks today.
Treat ArmorCodex as a strong Bash guardrail and audit layer, not a complete boundary for every Codex capability.
See Codex harness limitations for the harness gaps that need to be addressed before ArmorCodex can claim broader tool coverage.
Sources: OpenAI Codex hooks docs and plugin build docs: https://developers.openai.com/codex/hooks https://developers.openai.com/codex/plugins/build
Related MCP server: NORNR MCP Control
How It Works
User Prompt -> UserPromptSubmit -> intent-plan directive
|
Codex calls register_intent_plan MCP tool
|
Bash command -> PreToolUse -> policy + intent verification -> allow/deny
Approval request -> PermissionRequest -> policy approval gate
Bash result -> PostToolUse -> audit log to ArmorIQ IAPInstall
From This Checkout
npm install
chmod +x install_armorcodex.sh
./install_armorcodex.shThe installer enables hooks, installs the Codex plugin through the ArmorIQ marketplace, and can install the repo hook file globally when run from this checkout.
Manual Repo-Local Setup
npm install
mkdir -p ~/.codex
printf '\n[features]\nhooks = true\n' >> ~/.codex/config.tomlThen run Codex from this repository. The repo-local hook file is already at .codex/hooks.json.
Manual MCP Setup
ArmorCodex ships a Codex plugin manifest at .codex-plugin/plugin.json and an MCP server config at .mcp.json. The MCP server exposes:
register_intent_planpolicy_readpolicy_update
Configuration
Core environment variables:
Variable | Default | Description |
|
|
|
|
| Require a registered intent plan before Bash |
|
| Runtime, policy, and pending-plan storage |
|
| Debug logs on stderr |
| from | ArmorIQ backend key |
| true when API key exists | Send audit logs |
|
| Enable Merkle policy binding |
Policy Commands
Structured armor commands (staged: nothing applies until you confirm):
Type these as plain prompts with no leading slash:
armor policy list, not/armor. Codex reserves/for its own built-in commands, so ArmorCodex intercepts thearmor ...text in theUserPromptSubmithook.
armor policy listandarmor policy viewarmor policy add deny bash(orallow/hold; multiple:add allow bash and apply_patch, deny apply_patch)armor policy remove <id>armor policy resetarmor policy default deny|allow|hold(unmatched-tool default)armor policy template <all-allow|lockdown|strict-read-only|balanced>armor profile save|list|switch|delete <name>armor mcp approve|deny <server>andarmor mcp listarmor yes/armor noto apply or discard the staged change
Staging a change shows a diff and risk warnings; applying is human-only (the MCP policy_command tool can read and stage, but only a terminal armor yes applies). See POLICY_GUIDE.md.
Natural-language commands still work for quick edits (applied immediately):
Policy list,Policy get <id>,Policy delete <id>,Policy resetPolicy new: deny Bash for payment dataPolicy update <id>: allow BashPolicy prioritize <id> <position>
Tests
cd plugins/armorcodex
npm testRepository Structure
armorCodex/
├── .codex/hooks.json # Repo-local Codex hook registration
├── .codex-plugin/plugin.json # Codex plugin manifest
├── .mcp.json # ArmorCodex MCP server config
├── hooks/hooks.json # Plugin-local hook reference
├── scripts/
│ ├── bootstrap.mjs # Lazy dependency installer and dispatcher
│ ├── hook-router.mjs # Codex hook router
│ ├── policy-mcp.mjs # MCP server
│ └── lib/ # Policy, intent, IAP, crypto, runtime modules
└── tests/This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceOpen-source permission control plane for AI agents — scan, enforce, and audit every tool call with code-level policies that prompt injection can't bypass.1419Business Source 1.1
- Alicense-qualityDmaintenanceA governance and control layer for MCP tools that manages tool requests as intents through policy-based approval, queuing, or blocking. It enables secure human oversight and audit trails for consequential agent actions across platforms like Claude Desktop and Cursor.1MIT No Attribution
- AlicenseAqualityBmaintenancePolicy-based governance for AI agent tool calls. YAML policies, approval gates, risk assessment, and audit logging across LangChain, OpenAI, Anthropic, and MCP.515MIT
- AlicenseAqualityAmaintenanceLocal zero-trust permission gateway for AI agents. Enforces policy-based tool authorization, human approvals, scoped permissions, and cryptographically verifiable audit logs.45Apache 2.0
Related MCP Connectors
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Pay-per-call cybersecurity for AI agents: vuln scans, threat intel, compliance, code security.
Runtime permission, approval, and audit layer for AI agent tool execution.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/armoriq/armorCodex'
If you have feedback or need assistance with the MCP directory API, please join our Discord server