Security Architecture
Myrm implements a defense-in-depth security model with six layers, ensuring agents operate safely even when given broad autonomy.Security Layers
Approval Modes
Control how much autonomy agents have:Session Security Presets
Switch security posture per chat session from the input toolbar — no need to change global settings:- Presets are mutually exclusive with YOLO mode — selecting a non-default preset automatically disables YOLO, and vice versa.
- The
Auto-Approve Editspreset enables the Transcript Classifier (LLM-based smart review) for shell commands — safer than blanket ALLOW because suspicious commands still trigger human review. - The
Read-Onlypreset precisely denies 12 categories of write operations (file write/edit/delete, shell, code interpreter, browser automation, skill/cron management) while keeping reads and agent delegation open. - Available in Agent mode only; the selector hides automatically in Fast Search mode.
Plan Review
Before executing a complex task, agents can propose a plan for user review. When Plan Review is enabled in Settings → Security:- The agent’s first plan creation triggers a PlanConfirmationCard in the chat UI
- Users can Confirm (proceed as-is), Edit (modify the plan before execution), or Skip (let the agent proceed without plan constraints)
- Supports both Deep Research and General Agent workflows
- Works alongside approval modes — even with YOLO enabled, plan review can still be required
Structured Clarification
Agents can ask structured questions using theask_question_tool before taking action:
- Single-choice, multi-choice, and free-text question types
- Frontend renders a dedicated ClarificationInput form — not plain text chat
- Responses flow back into the agent loop as structured data
- Particularly useful for ambiguous tasks where the agent needs user input to proceed correctly
Plugin Sandbox Permission Model & Static Inference
For third-party Agent Plugins and MCP extension ecosystems, Myrm provides compile-time static capability inference and full lifecycle informed consent:- 6-Tier Granular Sandbox Permission Model (
PluginCapabilityTier):READ_ONLY(probing & observation),NETWORK(outbound HTTP/remote access),FS_READ(file reading),FS_WRITE(file writing),SHELL_EXEC(system command execution),DESTRUCTIVE(destructive system actions).
- Deterministic Static Inference Engine:
- Never blindly trusts declarations in
plugin.json; the underlying pure-function engine analyzesmcp.jsonin milliseconds, inferring true capabilities fromstdiocommands, interpreter parameters, and network configurations.
- Never blindly trusts declarations in
- Declared vs. Inferred Capability Diff & Escalation Alerts:
- Detects when a plugin claims to be “read-only” but spawns
stdioshell processes, generatingcapability_undeclared_privilegediagnostics and warning banners on import.
- Detects when a plugin claims to be “read-only” but spawns
- Interactive Consent & Persistence:
- Displays colorful capability badges and risk ratings in the WebUI import dialog; persists inferred capabilities into server-side metadata upon confirmation to enforce runtime constraints.
10-Layer Progressive Approval Architecture
Every tool call passes through up to 10 layers of deterministic and intelligent checks before reaching the user:Bash AST Capability Boundary
In traditional agent systems, shell execution security relies on coarse regular expressions or simple string searching. This creates two fatal flaws:- Security Evasion: Prepending environment variables (e.g.
GIT_TERMINAL_PROMPT=0 git push) or passing global flags (git -C /repo commit) circumvents simple prefix regexes, allowing dangerous commands to execute unchecked. - Approval Fatigue: Harmless read-only commands (like
greporcat) frequently trigger high-risk yellow warnings, conditioning developers to blindly approve prompts without scrutiny.
ast_parser.py):
- Pure Python Lexical State Machine (95.9% Test Coverage):
- Self-contained 420-line lexer without heavy C/tree-sitter dependencies.
- Decomposes pipelines (
|), logical chaining (&&,||), subshells, quotes, and redirects into structured syntax trees.
- Environment Variable Decoupling & Git Global Flag Penetration:
- Strips leading variable assignments (
KEY=val cmd) before resolving command tokens. Read-only auto-approval is kept only for assignments that merely shape output (LC_ALL=C ls,PAGER=cat git log); any other one (GIT_EXTERNAL_DIFF=./x git diff,FOO=bar ls) goes to approval, because a variable can make a read-only command run a program. - Intelligently extracts Git global parameters (
-C,-c,--git-dir,--work-tree) to accurately inspect the underlying sub-action (e.g., distinguishinggit statusfromgit pushorgit reset).
- Strips leading variable assignments (
- Four-Tier Capability Classification (
CommandCapability):READ: Safe observation commands (e.g.,git status,cat,ls,grep) bypass approval fatigue alerts.WRITE: Safe mutation commands.DESTRUCTIVE: Potentially catastrophic commands (e.g.,rm -rf,git branch -D,git reset --hard) triggering explicit destructive action escalation.REMOTE_SYNC: Commands altering remote state (e.g.,git push,docker push) triggering remote sync escalation banners.
- Zero-False-Alarm UI Review (
PolymorphicApprovalCard):- Yellow warning badges are strictly reserved for genuine sensitive capability escalations (
git_destructive_action,git_remote_sync). - Responsive
break-allstyling prevents command text overflow on narrow viewports.
- Yellow warning badges are strictly reserved for genuine sensitive capability escalations (
Competitor Comparison (Bash Security & Capability Boundary)
External Inbox Zero-Trust Whitelist & Prompt Poisoning Defense (Ingress Fence)
For external webhook and channel ingress, Myrm implements a financial-grade zero-trust perimeter and physical privilege fence:- UntrustedIngressFence Runtime Physical Privilege Severance:
- No Soft Defenses: Competitors (e.g. Hermes, OpenClaw) rely on system prompts like “please do not execute external commands”, which are routinely bypassed by adversarial prompt injection.
- Kernel-Level Tool De-registration: For untrusted ingress,
UntrustedIngressFencephysically de-registers the tools behind 8 high-risk privilege types during tool dispatch, making them physically invisible and uncallable to the model:code_interpreter,file_write,desktop_control,desktop_capture,spawn_subagent,invoke_external_agent,cron_manage,skill_manage.
- Immune to YOLO Mode: Even if
--yoloauto-approval is globally active,UntrustedIngressFencestrictly enforces privilege severance, eliminating privilege escalation and sandbox escapes.
Skill Frontmatter Defense & Zero-Trust Secret Vault
To counter the supply-chain vulnerabilities and secret exfiltration highlighted by the 2026 paper Agent Skills in the Wild, Myrm provides enterprise-grade runtime guarantees:- Frontmatter Privilege Decoupling:
- Defeats the critical backdoor where malicious skills pre-approve execution by specifying
allowed-tools: BashinSKILL.md. - Frontmatter declarations strictly act as prompt context filters; real execution authorization is governed by the underlying five-layer security engine (
engine.py). Untrusted third-party skills default toSkillTrust.INSTALLED = 0(read-only confinement).
- Defeats the critical backdoor where malicious skills pre-approve execution by specifying
- SHA-256 Tamper Protection & Runtime Quarantine:
- Computes cross-platform LF-normalized SHA-256 content hashes at load time. If unauthorized code drift occurs,
QuarantineAwareSkillBackendblocks execution at runtime (is_active=False), shutting down downstream poisoning.
- Computes cross-platform LF-normalized SHA-256 content hashes at load time. If unauthorized code drift occurs,
- Zero-Disk Vault Master Key & AES-256-GCM Encryption of Saved Keys:
- The master key of the agent secret vault (
agent_secrets,vault_credentials) is held byMasterKeyProvider: it comes from an environment variable, macOS Keychain, Linux SecretService, Windows Credential Manager, or an unlock passphrase, and is never written to a plaintext file (Strictly Zero-Disk). - The keys saved in settings (model providers, search, MCP and similar) are AES-256-GCM encrypted at rest in the local SQLite database. The encryption key comes from the
CONFIG_ENCRYPTION_KEYenvironment variable or a.encryption_keyfile (mode 0600) in the state directory, not from the OS keychain, so anyone who obtains both the database and that file can read those keys. Whole-instance backups leave these keys out by default; they travel only in a passphrase-protected export and are re-encrypted to the target instance’s key on import. - A sandbox command receives credentials only through its own environment: the user’s connected-account tokens (for a skill command, only the issuers that skill declares) and one-time credentials approved for exactly that command are exported before it runs and removed when it ends, so the long-lived shell holds none between commands. The command can still read what it was given, so a credential handed to it is replaced by
***wherever its exact value appears in that command’s output (also when the output is read in pieces), and tool output passes through pattern-based secret redaction before it reaches the model. Neither is a guarantee for a value the command re-encodes (for example base64), a value shorter than 4 characters, or a secret with no recognizable shape.
- The master key of the agent secret vault (
- Strict 127.0.0.1 Loopback Hardlock & Anti-DNS-Rebinding Shield:
- Local services strictly bind to
127.0.0.1by default. Robust CORS and LoopbackAuthToken enforcement prevent cross-site request forgery and DNS rebinding attacks against high-privilege local agents.
- Local services strictly bind to
Multi-Platform Approval UX
Every approval surfaces the same four actions across all channels:
The note you write is read. When you approve with a note — “only staging, not prod”, “keep it under $3”, “use the REST API instead” — the agent runs the action and then receives your note as your instruction, so the next step follows it. An approval note and a rejection reason travel on separate channels internally, which is why a timer’s own “auto-approved after timeout” line is never mistaken for something you typed. Notes are risk-screened and length-bounded before they reach the model.
Migration benefit: Hermes accepts free text on deny only (
/deny <reason>) and OpenClaw documents that its --reason is not persisted or forwarded to other approval surfaces, so a note on an approval has nowhere to go there. In Myrm both directions carry your own words, and the approval note is delivered after the action result so the agent can adapt what it does next rather than only explaining itself. Verified in a real browser (drawer note box) and through the production agent loop.- Permission: Allow all tools with this permission type (e.g., all file writes)
- Tool: Allow this specific tool regardless of arguments
- Exact: Allow this tool only with these exact arguments (default for shell tools — safest)
- Pattern (shell only): Allow commands matching a derived glob (e.g.
curl -sS *). Compound shell (&&,|,;) is never saved. All pattern rows appear in Settings → Allowlist and can be deleted anytime.
Migration benefit: Approve a recurring deploy script once with “Allow always (this pattern)” — later runs auto-approve without YOLO. Claude Code and OpenClaw typically stop at tool-name allowlists or CLI-only signing; Myrm gives you GUI-managed, revocable pattern rules with Chrome LIVE E2E proof (Jul 2026).
/batch a,d,aa (approve, deny, always) and UI bulk buttons.
Batch High-Risk Confirmation & Safe-Only Security Splitting
When multi-agent orchestration or parallel executions produce multiple pending approvals, blindly bulk-approving all items can inadvertently allow destructive operations (such as recursive deletions, disk format, or database truncation). Myrm provides an end-to-end batch risk safeguard system:- Deep Destructive Parameter Inspection: Harness
batch_risk.pyand frontendbatchRisk.tsdeeply extractpayload.command,payload.args, and nested tool-call arguments, intercepting patterns likerm -rf,mkfs,DROP TABLE/DATABASEat sub-millisecond latency to prevent escape via genericbashtool names; - High-Risk Confirmation Dialog (
BatchHighRiskConfirmDialog): When a batch contains high-risk commands, smart denials (smartDenied), or forbidden permanent approvals, a modal prompt displays the exact risk reasons and affected items; - Safe-Only Precision Splitting & Pre-Resume Fix: Users can choose “Approve Safe Only” — safe read-only operations resume immediately while high-risk destructive operations remain safely suspended for individual review. Client-side stream resume is strictly scoped to verified
safeItemIds; - Server HTTP 409 State-Machine Guard: When a Safe-Only batch contains 0 safe items, the API returns HTTP 409 Conflict (
NO_SAFE_ITEMS_TO_APPROVE), preventing empty response ambiguity.
Socially Irreversible Action Gate (External Impact Defense)
In real-world engineering workflows, certain operations produce irrevocable external collaborative impact (such as pushing code to remote main branches, channel broadcasts, or package publishing). Once dispatched, these cannot be rolled back locally. Myrm enforces a strict Socially Irreversible Action Gate:- Accurate Action Identification: Covers
git push(with complex path/force/pager flags),npm/pnpm/yarn publish,twine upload,docker/podman push,gh release/pr, andchannel_notify/artifact_publish; - Allowlist Bypass Prevention: These actions are stripped of the “Allow Always” privilege. Even if a broad pattern rule exists for
shell_exec, socially irreversible commands are intercepted and demoted to single-shot HITL approvals; - Prominent High-Risk Warning Banners: The approval card mounts a dedicated amber warning banner informing the user that remote environments will be modified upon confirmation.
Session-Scoped Denial Persistence & Auto-Mode Circuit Breaker
To prevent malicious prompt injections from probing or bypassing security constraints across fragmented turns, Myrm breaks the architectural limitation of per-turn denial resets:- Cross-Turn Registry: Consecutive (3) and cumulative (20) security denial counters are anchored to a persistent session registry rather than ephemeral coroutine ContextVars;
- Auto-Mode Suspension (
AUTO_MODE_SUSPENDED): When breach thresholds are reached, Auto Mode is immediately suspended and a high-visibility warning banner surfaces on the WebUI approval card; - Decay & Self-Healing: Explicit user approvals reset the consecutive counter and trigger self-healing decay on cumulative breaches (1 decay per 3 safe executions), ensuring a balanced balance between strict security and uninterrupted developer velocity;
- Session-Scoped Grant Isolation & Lifecycle Reclamation: Temporary tool approvals granted with “session” duration are strictly isolated in memory to the active
session_id. When the session is purged (via Focus & Flush, chat deletion, or trash empty),clear_conversation_stateautomatically cascade-purges all ephemeral allowlist grants and resets denial counters, preventing dangling authorization leaks.
Sidebar Attention Indicator
When an agent pauses for approval, the sidebar displays a real-time amber pulse indicator next to the affected chat — even if you’re currently viewing a different conversation. This eliminates the need to manually check each session for pending approvals:- Amber pulse dot: Agent is waiting for your approval/clarification
- Green pulse dot: Agent is actively generating
- No dot: Session is idle
Approval Timeout Race Protection
When an approval timeout fires and a user manually approves almost simultaneously, the system guarantees exactly-once execution via an idempotentresolve_if_first guard:
- WebUI: Backend returns HTTP 409 → frontend shows a friendly toast and removes the stale approval card
- IM Channels: Agent replies with a localized message (EN/ZH) informing the user the approval was already handled
- Concurrent safety: Only the first resolver wins; all subsequent attempts are no-ops
Session Directory Authorization & Transparent Kernel Interception (Local & Desktop)
When the agent needs files outside the current workspace (e.g.~/Downloads, a project folder you mentioned), Myrm uses Kernel Transparent Interception + Proactive Pre-authorization, completely eliminating the need for an LLM-facing request tool (such as legacy request_directory_tool):
Compared to competitors: OpenWorker Cowork still relies on explicit
request_directory which bloats LLM Action Space and invalidates Prompt Cache; OpenClaw, Hermes, DeerFlow, LobsterAI, CoPaw, and jiuwenclaw lack session-scoped directory HITL. Myrm achieves kernel transparent interception, dynamic elevation, drag-and-drop pre-authorization, and Prompt Cache freeze.
Rejections and Denial Tracking
- Rejections stay one-off: A rejection applies to that call only. For a permanent block, add a pattern to the Command Deny List in security settings
- Denial tracking: Repeated denials in one session suspend auto-mode, so every following action asks for explicit approval
Error Self-Healing
14-layer error recovery system automatically handles failures without user intervention. See Error Recovery for details. Key capabilities:- Stream interruption recovery (stall detection, jittered-backoff retry, backup-model failover)
- Circuit breaker with 3-tier cooldown
- Model fallback chains
- Truncation auto-retry with progressive budget boost
- Deterministic fallback (LLM-free safety net)
Authentication & Health Monitoring
Real-time monitoring of credential validity and system health, with automatic alerting:Session-ID Whitelist (Path-Traversal Guard)
User-controlled session identifiers (chat_id / session_id) must never escape the event-log directory when interpolated into filesystem paths. Every API entry that accepts a user-supplied identifier runs a shared whitelist check (is_safe_session_id, charset [A-Za-z0-9:_-]) fail-fast — before any business logic executes:
Non-string inputs (e.g. an integer sent to the WebSocket path where no Pydantic coercion exists) are rejected too — the validator returns
False for any non-str value instead of raising TypeError. This keeps path-traversal (.., backslash, NUL byte) protection uniform across REST, WebSocket, and Realtime entries with no exception-handling divergence.
Prompt Injection Defense
Two complementary subsystems protect against prompt injection — one for untrusted external content flowing into the agent, and one guarding user/file inputs.Content Boundary (Output-Side)
5-layer defense wrapping all external content and tool output before it enters the LLM context, covering the entire tool chain (built-in tools + third-party MCP tools + PTC built-in tools):
Data returned by third-party MCP tools is automatically passed through all 5 defense layers before entering the LLM context, preventing malicious MCP servers from injecting instructions via tool outputs.
Intake Dangerous-Intent Safety Router (Pre-LLM Gate)
Before any LLM invocation or ReAct iteration, user prompts pass through the Intake Safety Router, a rule-based check that takes well under a millisecond for a short prompt (about 2 ms for an 8 KB paste):- Three High-Risk Dimensions: Flags
MASS_DESTRUCTION(e.g.,rm -rf /,DROP DATABASE,TRUNCATE TABLE, disk wipe),MASS_EXFILTRATION(bulk export of keys/credentials/.env), andPRIVILEGE_MUTATION(disabling safety barriers, sandbox escape). - Dual-Tier Zero False-Positive Funnel: Strips Markdown code blocks and detects informational/code-generation syntax (e.g., “why drop table failed”, “write a cleanup script”) to guarantee 100% pass-through for benign software engineering questions.
- Per-Channel Handling: By default every channel prepends a
[SAFETY_CAUTION]notice to a flagged prompt (hitl), telling the model not to run destructive changes without explicit confirmation. A host can setdangerous_intent_policytofail_closedto replace a flagged prompt with a[BLOCKED_INTENT]notice, so the model never sees the original text. Unattended Cron runs add their own gates: untrusted-content injection screening isfail_closed, and tool calls are checked against the job’s declared capabilities, with anything undeclared denied.
Prompt Guard (Input-Side)
113 detection patterns across 26 threat categories scan user messages, project rules, and skill files:- Anti-obfuscation: Leet speak reversal, invisible Unicode stripping, whitespace folding, Base64 decoding
- Bilingual detection: English and Chinese prompt injection patterns (e.g., “忽略之前的指令”)
- Two-pass detection: First on normalized text, then on Base64-decoded content
Memory Write-Path Scanning
Unlike input-side guards (which protect the conversation), the write-path scanner protects durable memory — it runs deterministically on every memory write before persistence, so a prompt-injected agent cannot store malicious instructions, secrets, or forged system tags even if the injection succeeded upstream:- Instruction-shape detection — guardrail-bypass orders and untrusted-channel writes are blocked (bilingual attack library)
- Credential zero-retention — API keys, passwords, PIN/OTP numeric credentials are redacted in place; years and phone numbers are excluded to avoid false positives
- Fake system-tag interception —
System:/Assistant:colon prefixes are treated as injection - Every write path shares the guard — manual stores, batch writes, updates, profile, rules, MCP tools, agent auto-extraction, and import recovery
- CI poisoning benchmark gate — two-layer expectation tests (detection layer + extraction layer) run in CI to prevent regression
File Lock Symlink Defense
Even with upstream content guards in place, a prompt-injected agent could still be coaxed into planting a symlink inside a framework directory that points at a sensitive file (e.g.~/.env, SSH keys). Any later code that opens that lock path with “create/truncate” semantics would then silently destroy the file it points at — a real data-loss path for a framework-level public API.
The harness FileLock (used by the delivery queue) opens lock files with O_NOFOLLOW (guarded by hasattr on Windows), so a planted symlink is rejected instead of followed:
This is one more defense-in-depth layer: even if a prompt-injection attack succeeds at the filesystem level, arbitrary file truncation through the lock path is structurally impossible.
Beyond symlink defense, the harness
FileLock hardens the entire lock lifecycle against misuse and silent failure:
Cross-process mutual exclusion is verified in CI via subprocess tests (macOS) alongside the asyncio concurrency integration suite.
Sub-Agent Security
Multi-agent workflows introduce identity drift and privilege escalation risks. Myrm addresses this at every level:Per-Agent Isolation & Access Visibility
An assistant is more than a prompt: it owns a memory namespace, a browser login store, a tool/MCP allowlist and a schedule. Myrm keeps those boundaries separate so one assistant’s logins or files do not silently become another’s.
A 5-minute access audit you can run today
- Open each assistant and list its tools/MCP servers; remove anything the job does not need.
- Open Settings → System → Saved Sessions; delete logins you no longer use and clean up expired sessions.
- Check the assistant’s workspace/path policy: it should only read the project folders it needs.
- Review Approvals and long-lived grants; revoke anything you do not remember granting.
- Review the assistant’s cron jobs; delete paused or duplicate routines.
Skill Installation Security
When installing skills from any source (GitHub, SkillHub, file upload), every skill passes through a triple-layer security gate before activation:Trust Levels
Skills are assigned one of four trust levels that gate their runtime capabilities:
The
quarantine_aware decorator automatically filters rejected skills at runtime — a quarantined skill simply disappears from the agent’s available tools without error.
Runtime Permission Boundary
After a skill passes installation, sensitive runtime operations remain gated by the skill permission gate (SkillBoundaryProvider): file writes, command execution, network access, env-var reads and similar sensitive permission types must already be granted — otherwise the tool call is rejected at the engine layer (skill_boundary.violation, fail-loud, never silently downgraded).
- Single source of truth: tool → permission type is resolved by the tool registry (
resolve_permission_type), eliminating mapping drift that could turn a would-be denial into a silent allow. - Grant once, execute unattended: already-granted permissions pass through without per-call popups; revokes take effect in seconds via the cache-invalidation callback, no restart required.
- Granular separation: sandboxed code execution (
code_interpreter) and native shell (shell_exec) are authorized independently and cannot overstep each other. - Full audit trail: every permission decision (allow/deny + target) is written to the permission usage log.
- Usage analytics dashboard: the audit log is aggregated into a visual dashboard — per-permission total/allowed/denied counts, exact denial reasons, and the latest 10 operations, filterable over 1/7/30/90-day windows. Abnormal behavior (e.g., a skill probing env vars repeatedly and getting denied each time) is visible at a glance, not buried in a raw log.
- Verification: 100% unit coverage of the skill boundary + real-DB end-to-end integration (grant → gate → execute → revoke → instant deny).
Trusted Source & Honest Sandbox Disclosure
When importing third-party extensions or skill packages, half-baked in-process JS sandboxes fail to prevent model-coerced shell attacks. Myrm implements honest permission disclosure and mandatory trusted checkbox guards across bothSkillUrlImportDialog and PluginImportDialog:
- Silent direct-install backdoor removed: eliminates zero-interaction installation of single-URL imports to prevent supply-chain phishing;
- Environment-aware honest narrative: clearly indicates
Local OS Permissionsunder Local/Desktop mode andCloud Sandboxunder isolated volume container deployments; - Prompt injection and script execution warnings: educates users about indirect prompt injections attempting to exfiltrate secrets via bash;
- Physical checkbox gate (
trusted-source-checkbox): the import button remains physically disabled until the user explicitly checks the trust confirmation box.
GUI Security Review
Three frontend components work together to present security scan results, each finding includes precise line-number targeting (e.g.,L42 Command injection: recursive delete) to help developers jump directly to problematic code:
The security score uses a 100-point system, deducting per finding: CRITICAL −25, HIGH −15, MEDIUM −8, LOW −3. A
trust_recommendation (trusted/installed/untrusted/reject) is also generated to guide trust decisions.
MCP Tool Security
MCP Server Config Scanning
Every MCP server configuration is scanned against 14 threat types before activation:Stdio Process Environment Variable Guard & Subprocess Credential Isolation Gate
For stdio-based MCP servers and all spawned child processes (Bash sessions, Python scripts, background daemons, CUA drivers), Myrm implements a double-layered defense:- Static Pre-flight Blocking: Flags
CRITICALfindings when high-risk variables (dynamic linker hooks, runtime injectors, proxy hijackers, git hooks) are detected in extra env params. - Runtime Automatic Sanitization & Child Process Credential Isolation (ChildProcessCredentialTokenIsolation):
- Automatically filters and isolates environment variables before any subprocess is spawned (
env_isolation.py:build_isolated_child_env); - Physical removal of sensitive host credentials (
NOISE_AUTH_TOKEN,CODEX_EXEC_SERVER_NOISE_AUTH_TOKEN,AUTH_TOKEN,ACCESS_TOKEN,BEARER_TOKEN,DATABASE_URL,MYRM_VAULT_MASTER_KEY); - 8-dimensional pattern wildcards intercepting
KEY,SECRET,TOKEN,PASSWORD,CREDENTIAL,AUTH_,_AUTH,AUTHORIZATION,AUTHENTICATION,BEARER,SIGNATURE; - Developer identity preservation: accurately distinguishes and preserves safe variables like
GIT_AUTHOR_NAMEandGIT_AUTHOR_EMAILto avoid developer workflow disruptions; - Tri-state inheritance policies (
COREminimal safe whitelist /ALLfiltered /NONEzero variables).
- Automatically filters and isolates environment variables before any subprocess is spawned (
- Zero Prompt Cache Impact: Pure framework runtime execution with 0 token consumption.
Tool Name Isolation
When multiple MCP servers are enabled, tool names can collide (e.g., both a GitHub and GitLab server exposesearch_repos). Myrm prefixes every MCP tool name with double-underscore delimiters:
- Unambiguous parsing — Unlike single-underscore schemes,
__delimiters allow exact reverse parsing even when server names contain underscores - Permission isolation — Prefixed MCP tool names never collide with built-in tools, preventing accidental permission bypass
- Audit traceability — Every tool invocation log entry identifies the originating MCP server
SSRF Prevention
DNS Pinning prevents agents from being tricked into accessing internal networks via HTTP redirects:- Unified outbound HTTP layer: All agent-initiated HTTP exits (web_fetch, HTTP tools, OpenAPI executor, skill ZIP install, media resolver, robots/sitemap fetch, channel media download, Feishu attachments) converge on
secure_fetch/async_pin_url— one implementation, no bare httpx blind spots - Manual redirect loop:
follow_redirects=Falsewith per-hop re-validation — every redirect target is fully checked before following - DNS Pinning: Resolved IPs replace hostnames in HTTP connections, eliminating DNS rebinding TOCTOU attacks
- Comprehensive IP blocklist: RFC1918 private, CGNAT, link-local, multicast, reserved, cloud metadata endpoints (AWS/GCP/Alibaba/Tencent), plus IPv4-mapped IPv6 detection
- Data exfiltration detection: 6 pattern categories (API keys, file paths, base64, JWT, secret keys, DB connection strings) prevent sensitive data leaking through URL parameters
- Domain HITL approval: Non-allowlisted domains trigger human-in-the-loop approval when
domainHitlEnabledis active — per-agent network allowlist configurable via UI - Parser-confusing character defense: Tab, newline, and backslash in URLs are blocked to prevent hostname extraction divergence between parsers (CVE-class SSRF bypass prevention)
- Internal hostname suffix blocking:
.local,.svc,.cluster.local,.home.arpasuffixes are blocked to prevent mDNS and cluster-internal service access - Audit trail: Blocked requests emit
SSRF_BLOCKEDsecurity decisions for SIEM and frontend audit views - Agent API scope:
/v1/chat/completionsruns Myrm agents only (no raw LLM passthrough). User-configured Provider apiUrl SSRF checks remain on in-agent LLM calls — deploy-mode-aware: local mode allows loopback hosts (Ollama/vLLM), cloud/sandbox mode blocks private networks and cloud metadata endpoints - 461+ dedicated SSRF tests: Coverage across core guards, agent security, browser navigation, DNS pinning, media validation, web fetch, SessionVault, permission engine, and provider URL validation
Malicious URL Architectural Immunity
Instead of maintaining static phishing domain blocklists (e.g. 2.5M scam domains), Myrm eliminates threats at the architecture level:- SessionVault domain binding: Credentials (cookies/passwords) are strictly isolated per domain —
bank.comlogin state is never sent to phishing domains likebank-secure-login.xyz, eliminating credential theft by design - Agent-level session isolation: Each configured agent gets its own physical SessionVault subdirectory — a “Work Assistant” and “Personal Assistant” accessing the same website maintain completely independent login states, preventing identity pollution across agents
- Browser sandbox isolation: Agent browsers run in isolated sandboxes — even if a malicious site is visited, the user’s host system is unaffected
- Four-layer deep domain filtering: CSP policy (kernel-level network restriction) + protocol interception (context.route blocks non-allowlisted domains) + main thread hardening (WebRTC/WebTransport/ServiceWorker blocking) + CDP audit monitoring
Configuration Security Scan
Every MCP server configuration is scanned for 13 threat types before activation:
Findings are presented in the
ScanConfirmDialog with severity badges. Users can trust, reject, or force-enable (at their own risk) each server.
Malicious Package Detection
When MCP tools install dependencies, the OSV (Open Source Vulnerability) API is consulted in real-time to detect known malicious packages.Dynamic Tool Change Safety
When an MCP server adds or removes tools at runtime (viatools/list_changed notifications), Myrm ensures security without interrupting your workflow:
- Automatic security vetting — Newly added tools are evaluated against the same 13-threat security scan applied at configuration time. If a tool fails the check, it is rejected and a warning is logged — no unsafe tool is ever silently activated
- Prompt cache preservation — The agent’s prompt-facing tool list is frozen; dynamic changes only update the internal execution layer. This guarantees prompt prefix cache hits are never invalidated by external MCP server behavior
- Zero user interruption — Unlike CLI-based competitors that require manual
/reloadconfirmation, Myrm handles tool changes transparently. Users are never interrupted with confirmation dialogs for events they cannot meaningfully evaluate
Per-Agent Tool Filtering
Different agents can enable different MCP tools from the same server — a “Code Reviewer” agent sees only read-only tools, while a “DevOps” agent sees all. Tools withdestructiveHint annotations are disabled by default in the safe set.
Built-in Tool Governance Gate
Every built-in tool must carry an explicit governance declaration before it ships — there is no implicit default. The harness enforces this with a registration-level CI gate that scans the real registered tool universe (core, common, extended layers plus server-vendor tools), not a hand-maintained allowlist:- Zero silent bypass — a newly added built-in tool with no permission mapping, no dynamic-resolution declaration, no auto-approval entry, and no explicit
mcp_invokefallback fails the build. It can never quietly fall back to an ambiguous runtime default. - Explicit three-state model — each tool is either explicitly auto-approved (read-only), explicitly mapped to a permission type (governed by the ruleset), or explicitly declared as an
mcp_invokefallback that keeps the ask-by-default baseline (high-risk tools such asbrowser_execute_script_toolandsend_teammate_message_tool). - Bidirectional consistency — declarations are cross-checked both ways:
BUILTIN_TOOL_NAMESmust be a subset of the registered universe (a declaration without an anchor fails), and permission-type whitelist entries must not be stale (now covered byDEFAULT_RULESET) or orphaned (no tool maps to them). The audit report can never contradict the code. - Dynamic-resolution SSOT — tools whose permission type is resolved per-action (browser interaction, desktop control) declare their dynamic branches from a single source of truth, and the gate consumes that source instead of a duplicated list.
- Module-load safety gate — every built-in tool must declare safety metadata (read-only / destructive / concurrent-safe); a missing declaration is flagged at import time, not discovered in production.
Operation-Level Semantic Risk Detection
Instead of labeling entire websites as “high risk” (a brittle, high-maintenance approach), Myrm detects risk at the individual operation level — every click, form submit, and command is analyzed in real-time.7-Category Semantic DOM Risk Detection
When the agent clicks a button or link on any webpage, the element’s text is analyzed against 7 risk categories in both English and Chinese:
This approach is superior to domain-level risk tags because:
- Zero maintenance: No need to maintain a list of “high-risk websites”
- Universal coverage: Works on any website, including new ones
- Granular: “View cart” on Amazon passes automatically, but “Place order” requires approval
- No legal risk: No discrimination against specific platforms
Smart Intent Guard
An AI classifier (TranscriptClassifier) reviews tool calls to verify they align with the user’s original intent:
- Reasoning-Blind: Only sees user messages + tool call sequences (not agent reasoning), preventing self-justification attacks
- Deterministic:
temperature=0ensures identical inputs always produce identical verdicts - Structured output: Pydantic-enforced JSON with a
reasonfield for audit traceability - Fail-safe: Errors or ambiguity fall back to HITL rather than auto-approving
Risk Governance System
A complete bidirectional risk detection and governance framework with built-in rules, custom rule management, and full-stack event handling. The same rule engine protects both WebUI input and IM channel inbound messages — no blind spots. 31 Built-in Rules across 6 categories detect sensitive data before it reaches the LLM. Only the 8 Security rules are enabled out of the box. They block a message when it carries an actual secret value — a key, token, private key, or a credential assigned a literal value — and let references such aspassword = os.environ["DB_PASSWORD"] or api_key: "<redacted>" through. The other 23 rules match broad vocabulary and are opt-in: turn them on under Settings → Security Policy → Risk Rules when your policy needs them. Installs that already saved their own toggles keep them. Rules only block: a hit stops the message before it reaches the model.
Symmetric Inbound/Outbound Gate: IM channel messages pass through
RiskDetectionService.detect() at the router level before reaching the Agent. Blocked messages receive a localized notification (6 languages) and are audit-logged. Outbound agent responses pass through the same engine via apply_outbound_risk_gate — forming a closed-loop defense.
GUI Rule Management: Full CRUD via WebUI settings panel — create custom rules with regex patterns, toggle rules on/off, batch operations, and rule testing before deployment. No code required.
Audit Trail: Every risk hit records trace_id, session_id, matched rule, severity level, and the character range of the match for compliance auditing. The matched text itself is never stored, so the hit log cannot leak the secret it caught; at startup, any hit text found in the log is cleared.
Full-Stack Event Loop: When input risk is detected, the server emits a risk_blocked SSE event. The event lists the triggered rules by id, name, and severity. The frontend riskEvents handler intercepts it and shows a Toast in the user’s language that names those rules and points to Settings → Security Policy → Risk Rules — no silent failures.
Test Coverage
30,000+ tests verify the full security pipeline, including PII/DLP/privacy routing (1136), shell command approval (harness 1209 + server 261), semantic DOM risk (75), shell classification (379), SQL statement guard (68, 99.1% coverage), security engine integration (163+74), credential scanning (35), tool guards (9), permission engine (119), tool registry & inheritance (67), guardrail middleware (15), architecture registry (4), server permissions (18), agent builtin tools API (12), profile resolver (36), frontend approval & message (15), risk governance (117), webhook routes (2), dynamic authorization guardrails (845), MCP Elicit benchmark (166), and many more.Shell Command Security
Commands are analyzed through a 5-layer quote-aware pipeline before execution:
Quote-aware preprocessing: A character-level state machine (
_strip_quoted_content) replaces single-quoted content with placeholders before L2/L3 scanning, preventing false positives on echo 'rm -rf /' while still catching real threats in double-quoted or unquoted contexts.
Privilege Escalation Floor: All sudo commands are unconditionally BLOCKED at L2 — including sudo apt install, sudo -S (stdin password piping), env sudo cmd, and bash -c 'sudo ...' (caught recursively by L4). This cannot be bypassed by YOLO mode, Smart Guard, or user approval. Competitors like Hermes only block sudo -S (the password-guessing vector), still allowing regular sudo with SUDO_PASSWORD injection — a broader attack surface. Six other competitors have no sudo guard at all.
Auto-snapshot on destructive commands: Commands matching destructive patterns (rm, mv, git reset/clean/checkout/restore/apply with arbitrary flag prefixes, sed -i, redirect overwrite) trigger an automatic workspace snapshot before execution, ensuring full recovery regardless of outcome.
SQL Guard (L2.5): Analyzes the original command (before quote stripping) to detect destructive SQL operations (DROP, DELETE, TRUNCATE, ALTER, INSERT, UPDATE, CREATE) embedded in database client commands. Defends against two advanced bypass vectors: multi-statement injection (SELECT 1; DROP TABLE) and WITH CTE wrapping (WITH x AS (...) DELETE FROM). Works with flag-based (psql -c '...') and pipe-based (echo '...' | psql) patterns. No competitor implements SQL-level command analysis for shell execution.
Safe Exec path: Simple commands without shell metacharacters are executed via create_subprocess_exec (no shell interpreter), structurally eliminating $IFS, glob expansion, and command substitution injection classes.
AI Trajectory Classifier (Layer 5.5)
When static analysis returns ASK (uncertain), an AI classifier provides semantic-level judgment:- Reasoning-Blind design: Only sees user messages and tool call sequences — never assistant reasoning or tool outputs, preventing the agent from rationalizing dangerous actions past the classifier
- Structured output: Pydantic schema forces JSON format (not free-text), reducing injection surface
- Deterministic:
temperature=0,max_tokens=200for reproducible decisions - Fail-safe: Any error, timeout, or parse failure returns UNCERTAIN → falls back to HITL approval
- Context-aware: Receives taint labels (EXTERNAL_NETWORK, SECRET) and trusted domains for nuanced judgment
Bilingual Command Explanation
Every command that triggers approval displays a human-readable bilingual explanation (humanize_command) generated deterministically — zero LLM calls, microsecond latency:
- 73 common commands covered with parameter-aware descriptions (extracts URLs, filenames, package names)
- sudo prefix auto-tagged, dangerous pipe patterns highlighted
- Users understand what the command does before approving, even without shell expertise
- Entirely rule-based: cannot be manipulated via prompt injection unlike LLM-based alternatives
Frontend humanize SSOT (2026-08) — Beyond harness
humanize_command for shell, the WebUI module lib/humanize/ generates the same plain-language dialect for ProgressSteps titles and all three approval surfaces (Single / Polymorphic / ToolCall). Scope hints (local vs external channel) use resolveScopeNote + ApprovalScopeNoteLine in six locales. Save-skill approvals show a structured preview before you approve. Validated: 49 focused vitest, 0 failures (Aug 2026).Install Slopcheck (Anti-Slopsquatting)
Before everypip install / npm install / yarn add / bun add command, a preflight check verifies that each package name actually exists on the public registry:
This prevents slopsquatting attacks — where an attacker registers a package name that LLMs commonly hallucinate, embedding malware in the published package.
Encryption & Enterprise Network Compatibility
Enterprise TLS Compatibility
Corporate networks often deploy TLS inspection proxies (Zscaler, Netskope, Palo Alto Prisma) that can cause all HTTPS connections to fail. Myrm provides one-click enterprise network compatibility:- Settings → Preferences → Advanced Settings → Enterprise Network Compatibility, or set
MYRM_TLS_STRICT=0; the change takes effect after the app restarts - Precision relaxation: certificate chains are validated against the operating system’s trust store (where administrators push the inspection root) plus any CA bundle named by
SSL_CERT_FILE,REQUESTS_CA_BUNDLEorNODE_EXTRA_CA_CERTS(added to it, never replacing it; the connection to a remote MCP server readsSSL_CERT_FILEonly), and only Python 3.13+‘sVERIFY_X509_STRICTflag is cleared — chain, hostname and expiry checks stay on, so it does NOT disable certificate verification - Covers the chat-model transport, the S3 remote backup, the Email channel’s IMAP and SMTP connections and the Python HTTP clients the agent uses (httpx, aiohttp,
requests,urllib); MCP servers built on Node.js (for example those started throughnpx), the WhatsApp channel’s bridge and its dependency install, the install step of external CLI agents and the agents’ own processes are told to use the system trust store as well (Node 22.19+ and 24.6+ understand the hint; an older Node ignores it) - The bundled email skill (
imap-smtp-email) runs its script in a separate process that this setting does not reach. The script verifies the mail server’s certificate against Python’s default CA bundle (on macOS a file, not the system keychain) and honoursSSL_CERT_FILEonly. ThereSSL_CERT_FILEreplaces the default bundle instead of adding to it, so the file must also contain every public CA the script still has to trust; set it in the environment the agent server runs in. A rejected certificate is reported with this hint and is never skipped - Per-MCP-server TLS: each MCP server can specify its own
ssl_verify(true/false/custom CA path) andclient_cert/client_key/client_key_passwordfor full mTLS - How the setting reaches each client: the infra module
tls_compat.pyinstalls the trust policy when the app starts, and the server’stls_config.pycarries the Preferences switch over toMYRM_TLS_STRICT. The policy applies where a client takes its TLS context:ssl.create_default_context()(httpx,urllib, asyncio, and the Email channel) and the context builders ofrequestsand aiohttp, so none of these needs a switch of its own; the S3 remote backup, whose client library builds its own context, reads the setting directly - Automatic TLS error diagnosis: tells a rejected certificate chain from an interrupted handshake, with remediation hints in 5 languages
- TLS-specific test coverage: the TLS compatibility core, per-MCP-server TLS (live integration) and TLS error diagnosis
Incognito Mode Deep Dive
One click in the message input area switches incognito on or off, and either way it starts a new chat: incognito is a property of the chat itself, and the server decides what to delete and what to export from that chat’sis_incognito flag, so a conversation that already exists can never become one. Expect the current conversation to be left behind and the composer to open empty.
- Event log: no per-session event log is written, so prompts and tool results are not copied to disk outside the chat database
- Server layer: Skips memory manager binding and all memory tools (
memory_search_tool,memory_save,memory_manage), disables memory context injection, archive checkpoints, and session cleanup callbacks - Uploads follow the chat: files attached in an incognito chat are bound to it, removed with it, kept out of exports and backups, and hidden from other chats’
@suggestions - Database layer: the
is_incognitoflag keeps the session out of the sidebar, full-text search, session recall, the Catchup Inbox and the memory export, and no title or message preview is stored; the messages stay in the local database until the session has been idle for an hour, then the session is permanently deleted with its attachments - Self-hosted: chats are stored on your own deployment rather than on a vendor server; the model provider you configure still processes what each turn sends, incognito or not
Credential Protection
Form Credential Vault
Passwords and TOTP seeds never enter the LLM context. You configure labeled credentials in Settings → Credentials; the agent only sees label names (e.g.github-personal) and calls fill_credential (browser and desktop use the same action). The Harness resolves the label in memory and injects at the DOM or OS input layer — plaintext never flows back into chat, tool args, or logs.
Provider API keys (OpenAI, Anthropic, Gemini, etc.) are passed via LiteLLM’s api_key parameter — zero os.environ writes. Combined with process-level sandbox isolation, this architecturally eliminates cross-user credential leakage. 279 credential security tests passed.
Payment-card CVV has no dedicated
use_payment_method API yet (unlike FSB’s browser extension). Password-type fields are covered; card checkout may need manual approval or future API.Zero-Plaintext External Secrets Vault & Dynamic Rotation (1Password & Bitwarden)
For enterprise environments requiring centralized secret management without exposing sensitive credentials to disk or developer machines, Myrm provides native integration with enterprise password managers:- Native Secret URI Resolution:
- Supports
op://<vault>/<item>/<field>(1Password CLI / Connect API),bw://<item-id>(Bitwarden CLI), andbws://<secret-id>(Bitwarden Secrets Manager). - Database records store only reference URIs — zero plaintext secrets ever touch persistent disks.
- Supports
- Single-Flight Dogpile Prevention (
_FlightCall):- High-concurrency agent workflows resolving the same credential concurrently are coalesced into a single resolution call, completely eliminating CLI process storms and locking deadlocks.
- In-Memory TTL Caching & 401 Dynamic Rotation:
- Resolved credentials are kept strictly in-memory with a configurable 600s TTL.
- Upon encountering HTTP 401/403 authorization failures during API calls, the gateway instantly invalidates cached tokens and transparently re-resolves the rotated secret, guaranteeing uninterrupted long-running task autonomy.
- Non-Interactive Execution Isolation (
_build_noninteractive_env):- Resolvers strip all interactive prompts, desktop notifications, and GUI popups, enforcing deterministic non-blocking execution in headless backend and CI/CD environments.
- Command-Scoped Delivery:
- A resolved secret reaches a sandbox command only through that command’s environment and is removed when the command ends; the shell itself starts with no credentials. Commands of one conversation share that shell, so this limits what is delivered; it does not contain a command that deliberately tampers with the shell (for example by installing a trap).
- Rigorous Verification:
- 92.1% statement coverage across
core/security/external_secrets/from its 10 harness unit tests, all passing (measured withpytest --cov, 2026-10-28). - 100% Chrome real-browser E2E verification (
test_external_secrets_settings_chrome_e2e.pyexecuted in exclusive isolation, 1 passed in 248.02s).
- 92.1% statement coverage across
Leak Detection
40+ regex patterns detect credentials in agent output:- API keys (OpenAI, Anthropic, AWS, GCP, Azure, etc.)
- Database connection strings
- JWT tokens and session IDs
- SSH private keys
- Entropy-based detection for unknown credential formats
PII Redaction & Privacy-Aware Routing
Myrm provides 8-layer PII defense with 57+ detection capabilities — the deepest privacy protection of any AI agent platform: Detection (3 engines, 57+ types):- Regex PII Scanner: 12+ structured types (phone, ID card, passport, bank card with Luhn validation, SSN, email, address, courier number, private IP, etc.)
- LLM Semantic Scanner: 20+ non-structured types (medical health, political views, financial records, precise locations, biometrics) with PL2/PL3/PL4 classification
- Credential Leak Scanner: 25+ secret patterns (AWS, OpenAI, Anthropic, GitHub, Slack, JWT, PEM keys, etc.) with Shannon entropy analysis
Privacy-Aware Model Routing: With a local model configured, requests are routed by sensitivity level — S1 to cloud, S2 to cloud (with the S2 action above applied) or local, S3 to the local model (the raw data never leaves the machine). Without a local model, routing is off: every request goes to the cloud with the S2/S3 actions already applied. Configurable fallback: block or force-redact-then-cloud.
GUI Configuration: Full privacy controls in Settings — enable/disable toggle, per-level action selection, deep scan toggle, local model connection test, custom keywords/regex/sensitive tools, and a try-it box that shows what the model would receive for a sample sentence under the current settings.
Data Flow & Privacy Disclosure (Settings)
Settings → Security Policy → Data Flow & Privacy Disclosure gives a live, configuration-driven map of where your data goes — not a static vendor subprocessors page:
Provider training policies link to official docs where available. Cross-border routing hints appear when Privacy Routing is enabled with cloud egress.
Why it matters vs competitors: Cursor and Claude publish static data-usage pages that do not reflect your enabled MCP tools or connectors. Myrm’s panel updates from your live configuration (including SSE refresh when channels reconnect on desktop).
Summary Path Protection
When long conversations are compressed into structured summaries, PII and credentials can survive the summarization process. Myrm applies dual redaction (redact_leaks + redact_pii) to all summary fields before persistence — ensuring phone numbers, emails, API keys, and other sensitive data never persist in compressed conversation history.
Taint Tracking
TaintTracker follows the information flow of sensitive data through the agent’s execution, ensuring PII doesn’t leak through indirect channels (e.g., a tool reading a file containing credentials, then using that data in a web request).
Agent Export & Import Security
Export. An agent leaves your machine as an Agent Plugins package after one reviewed redaction pass. The pass covers everything a recipient can read — system prompt, description, starter prompts, workspace templates and every shipped skill file. Each finding (API key, token, home-directory path) is shown and either redacted or explicitly kept by you; the export waits for every decision, and a decision made against an outdated preview is refused.
Import. A package from outside is untrusted input:
- Every skill goes through the full install pipeline and a whole-file security scan; a skill with a clean
SKILL.mdbut a malicious script is rejected and leaves nothing behind. - Agents can only narrow their own permissions, and a package never carries security policy:
security_overrides,default_security_preset,trusted_desktop_appsand other machine-local fields are dropped on import. Tool grants are limited to the default set and the loop budget cannot exceed the system default. - MCP servers are imported disabled; you enter the keys yourself, they are never read from the package.
Privacy-safe Rule Sharing
When sharing procedural memory rules (e.g., with teammates or the community), additional privacy layers are applied automatically:- Path anonymization — user home directory paths are replaced with
<USER>placeholders - Credential redaction — API keys and secrets are truncated to safe prefixes (e.g.,
sk-pro...f456) - Metadata stripping — timestamps, update counts, and internal IDs are removed from exported rules
Password-Protected Sharing
Artifact and conversation share links support optional password protection with a stateless, zero-database design:
Password protection is fully optional. Links created without a password work exactly as before, with no UX changes or performance overhead.
Revoke anywhere, instantly — and it stays revoked
Share links are revocable at any time, for both artifacts and conversations:
The web UI share dialog shows the live status (link URL, remaining expiry, revoke button) every time you open it — matching the ChatGPT/Notion share-dialog baseline — and stays open showing a “revoked” state after you revoke, so the control is never unreachable.
Hermes, LobsterAI, CoPaw, deer-flow, and jiuwenclaw offer no artifact or conversation sharing. OpenClaw publishes a whole thread at its normal chat address behind a public-access switch, including images and tool-call summaries; a Myrm conversation link is time-limited, can be password-protected, is revoked per link, and shows only the user and assistant text. Even mainstream products (ChatGPT Shared Links, Claude Shared Chats) lack TTL auto-expiry, password protection, and search-engine blocking — Myrm adds all three on top of the immediate-revoke baseline they share.
What a conversation link shows
Agent Secret Management — Zero Plaintext Exposure
Per-agent secrets (custom API keys, tokens, environment variables) use a zero-plaintext-exposure architecture:Competitors (e.g., Multica) return plaintext environment variables to the frontend and must rely on sentinel values (”****”) to prevent accidental overwrites. Myrm eliminates this entire attack surface by never exposing values.
Audit Trail
Structured Audit Trail
Every security decision is recorded in a structured audit log with Prometheus real-time metrics:- 37 typed security decisions (ALLOW, DENY, ASK, SSRF_BLOCKED, PII_REDACTED, TAINT_ESCALATE, etc.)
- Prometheus
policy_denial_totalcounter for real-time anomaly detection - Session-scoped accumulator with
TaintTrackercross-tool information-flow tracking - Cron job metadata automatically embeds the full security audit for post-run analysis
Event Types
37+ structured decision types cover the complete security lifecycle, including:TOOL_CALL_START/TOOL_CALL_ENDAPPROVAL_REQUESTED/APPROVAL_GRANTED/APPROVAL_DENIEDMODEL_SWITCHED/FALLBACK_ACTIVATEDITERATION_LIMIT_REACHED/BUDGET_EXHAUSTEDLOOP_DETECTED/CANCELLEDCOMPRESSION_TRIGGERED/CHECKPOINT_CREATED
Profile Audit Engine
The Profile Audit Engine provides real-time configuration risk assessment for every Agent profile. When you open the Security tab in Agent settings, a Health Score Card instantly shows your agent’s security posture:- Score: 0–100 (higher = safer), deducted per finding severity
- Risk Level: Safe / Low / Medium / High / Critical (5-level color-coded)
- 6-Dimension Grouped View: Findings grouped by checker dimension with per-dimension color coding — expand any dimension to see individual findings with severity borders, titles, and actionable recommendations
- One-Click Fix: Policy gap findings include Fix (toggle switch) or Configure (navigate to settings section) buttons for immediate remediation
Six Detection Dimensions
Each dimension shows issue count or “Pass” status. Dimensions with issues can be expanded to reveal individual findings.
Design
- Zero LLM: Pure deterministic rule engine — no token cost, instant response
- Plugin architecture: Each checker implements
BaseCheckerand can be extended independently - Auto-refresh: Results update automatically when you save Agent configuration changes
- Framework-level: Available to any project using the harness engine, not just the product UI
- Test coverage: 37 backend unit tests + 15 frontend component tests (52 total)
Workspace Rules Security
Myrm automatically discovers and loads project-level rule files from 17 discovery points (13 root-level filenames + 4 subdirectory patterns), covering all major AI tool ecosystems:- Root files:
.myrm.md,AGENTS.md,CLAUDE.md,SOUL.md,.cursorrules,.clinerules,.windsurfrules, and their case variants - Subdirectories:
.myrm/rules/*.md,.cursor/rules/*.mdc,.claude/CLAUDE.md,.github/copilot-instructions.md - First-Match-Wins: Only the highest-priority file loads per directory, preventing conflicts
- Zero-config migration: Users from Hermes (
SOUL.md), Cline (.clinerules), Cursor (.cursorrules), Claude Code (CLAUDE.md), Windsurf (.windsurfrules) can bring their rule files unchanged
- 113 detection patterns across 26 threat categories
- Anti-obfuscation: Leet speak, invisible Unicode, whitespace folding, Base64 decoding
- Chinese injection detection: Supports CJK character-based prompt injection
- Blocked content is replaced with a
[BLOCKED]placeholder with structured metadata
Emergency Controls
Security Dashboard
A dedicated/security page provides full GUI visibility into the system’s security posture — no CLI commands needed:
Additional capabilities:
- Setup Panel: Guided configuration of webhooks, monitored repos, and GitHub tokens
- Multi-source: Pulls data from GitHub, Control Plane, or merged sources based on deployment mode
- One-click refresh: Real-time data reload per tab
- Export: Audit logs exportable in CSV or JSON format for SIEM integration
hermes config view security, hermes pairing list) — users get the same information with visual analytics and no terminal expertise required.
Smart Approval (Auto Mode)
Smart Intent Guard is enabled by default for all new users. An auxiliary LLM (Transcript Classifier) reviews tool calls in real-time, enabling long unattended agent sessions without sacrificing safety. If no dedicated reviewer model is configured, Myrm automatically uses the user’s default model as a fallback — no additional setup required to benefit from intelligent approval.
Fail-safe guarantees:
- Classifier errors → fall back to HITL (never auto-approve on failure)
temperature=0for deterministic, reproducible decisions- Pydantic-enforced structured output (no free-text manipulation)
- Taint labels injected for context-aware judgment
Smart DENY → User Override (Once)
When the Transcript Classifier recommends DENY, Myrm does not silently reject the action. Instead, it shows a clear approval card:
This prevents “false positive lockout” where the AI reviewer misclassifies a legitimate action, while maintaining full audit visibility.
vs competitors: Hermes offers
smart_denied_for_owner with CLI-only once/deny buttons but no visual reason display, no audit logging, and no layered hard-deny for taint/outbound paths.
High-Risk Scenario: Always Allow Hidden
In 6 high-risk scenarios, the “Always Allow” button is automatically hidden from the approval card — users can only approve once or reject. This prevents accidental permanent bypass of security checks for dangerous operations:
Normal, low-risk approvals still show “Always Allow” as usual. Users experience zero friction change for safe operations.
vs competitors: Hermes hides permanent allow only for
tirith content-security warnings (1 trigger). OpenClaw controls via backend allowedDecisions array with an “Always Allow Unavailable” warning message. Myrm covers 6 trigger scenarios — the most comprehensive in the industry.
Command Denylist (User-Defined Hard Floor)
Users can define glob patterns that permanently block specific commands — regardless of YOLO mode, Smart Intent Guard decisions, or permission rules. This provides a user-controlled safety net that cannot be bypassed by any approval mechanism.
The command denylist operates at Layer 2a.5 in the approval pipeline — after permission rules but before YOLO bypass, ensuring denied commands are always blocked.
The Natural Language Policy Generator can also produce command denylist and network blocklist rules from plain language descriptions (e.g., “block all force push and database drop commands”) — the generated patterns are validated, previewed with human-readable explanations, and applied only after user confirmation.
Memory Write Trust Isolation
All memory writes pass through a unified security pipeline — even those triggered internally by the AI:
No competitor implements memory write trust isolation — most agents write extracted preferences directly to the user profile without approval, validation, or priority guardrails.
Security Profiles: One-Click Safety Modes
MyRM provides three built-in security profiles that users can switch between from the Settings UI:
Profiles are persisted to the database and survive server restarts. Each Agent can also have its own independent security configuration — enabling scenarios like a “research-only analyst” agent alongside a “full-access developer” agent.
Cron Job Execution Policy (Per-Job Least Privilege)
Scheduled Agent jobs support a dual-layer policy independent of the bound Agent profile:
Where to edit: Settings → Scheduled Tasks → open a job → Execution policy editor in run history (same placement pattern as allowed filesystem roots). New jobs stay unrestricted by default.
Built-in safeguards:
- Fail-closed by default — jobs without explicit capability declarations deny dangerous operations (shell, code execution, MCP) automatically. A warning banner guides users to configure the capability fence or enable YOLO mode per-agent.
- Preset packs (web-only / research / devops) dual-write capability fence + tool scope, aligned with blueprint SSOT.
- Read-it-Later blueprint uses router mode (
__wiki_source_sync__) with empty tools — deterministic server-side pull, zero LLM agent turns, no browser or code execution. - Lifecycle guard rejects cron prompts/commands/pre-flight probe scripts/shell acceptance criteria containing Myrm restart/stop or
pkill myrm-agentpatterns — prevents self-inflicted outage loops. - Restricted jobs do not silently gain baseline tools — a file-only cron will not auto-enable
code_execute; unrestricted jobs still inherit the Agent baseline.
cron_mode: deny/approve boolean toggle — all jobs share the same policy. OpenClaw/LobsterAI/CoPaw/deer-flow/jiuwenclaw have no cron capability at all. Myrm provides per-job granular capability declarations with GUI editing, blueprint auto-fill, and fail-closed defaults.
Subagent Recursive Isolation: 5-Layer Defense
When agents delegate tasks to subagents, a common failure mode is uncontrolled recursive spawning — subagents spawning more subagents until token budgets are exhausted. MyRM enforces 5 layers of isolation:
Additional safety nets: payload hash deduplication prevents delegation loops, result caching avoids redundant work, and sub-agents get no memory write tools and only a read-only memory view, which prevents cross-agent data contamination.
Multi-Agent File Protection: 6-Layer Defense
When multiple agents work in the same workspace simultaneously, file conflicts are the #1 source of data corruption. MyRM enforces 6 layers of defense — all code-enforced, zero Prompt reliance:
How it works in practice:
- A parent agent delegates 3 coding tasks to parallel subagents
- All three work in the same workspace — no copies, no merge step
- Before each write,
file_activity_trackeris checked for another agent’s recent edits to the same file - If the line ranges overlap,
file_conflict_guardblocks the write; an edit to another region of the same file only produces a warning - When a subagent finishes,
subagent_managerclears its tracking records
vs CaMeL Guard (hermes-agent-camel)
The CaMeL Guard project implements a research-based trust boundary model (trusted controller vs untrusted data). Myrm’s security architecture provides significantly deeper coverage:Skill Quarantine Sandbox & Atomic Installation
To guard against malicious third-party packages and partial installation failures, Myrm’s execution harness integrates a quarantine and atomic installation pipeline:- Quarantine Sandbox Directory: Remote skills (Git or ZIP) are extracted and staged in an isolated temporary directory before touching the active workspace.
- Path Traversal Containment: All relative paths inside skill packages are sanitized against the sandbox boundary, blocking Zip Slip and relative directory escape attempts.
- Pre-Activation Security Gate: Regex, AST, and LLM semantic security checks run entirely inside the quarantine directory. Rejected packages are purged without touching disk storage.
- Atomic Replace with Automatic Rollback: Installations and upgrades create a
.bakbackup and perform an atomic swap. File system IO errors trigger an instant rollback to the previous version. - Fault-Tolerant Multi-Source Search: Aggregated skill registry queries run with per-source timeouts and fault isolation, preventing slow or failing registries from hanging the discovery UI.
Anti-Contamination & Canary Protection Gate
To ensure evaluation integrity and prevent benchmark dataset contamination:- Dynamic Canary Token & GUID Dual-Track Protection: Automatically detects and injects benchmark Canary watermarks (
CANARY_GUIDand dataset-specificcanary_token). - In-Episode Outbound Search Sanitization: Intercepts and scrubs Canary watermarks in outbound search/fetch queries in real time, preventing benchmark prompt leaks to external search engines and training corpora.
- Pre-Run Workspace Cleanliness Verification: Recursively scans agent workspaces prior to evaluation turns to ensure ground-truth patches and hidden verification files are physically excluded from live environments.
- Trajectory Anti-Cheating & Secret Probing Defense: Scans agent tool execution trajectories for attempts to probe hidden verification paths (
/hidden_tests/,verifier.toml) or dump shell environment variables/secrets (printenv,export,/proc/*/environ). Violations trigger an immediate FAIL with structured diagnostic reports. - End-to-End Visual Violation Transparency: Surfaced directly in the WebUI with Canary verification status and detailed violation diagnostic cards.
Channel & Operator Scoped Memory ACL (Anti-Poisoning & Anti-Leakage Gate)
When external multi-user channels (Feishu, WeCom, Telegram, Discord, Slack) interact with agents:- Write-Plane Poisoning Prevention (
allow_shared_write=False): Tool-layer physical intercept automatically downgrades any attempt to write tosharedglobal memory intobound(current session scope), preventing untrusted channel participants from poisoning organizational shared knowledge. - Read-Plane Recall Isolation (
default_scope="same_source"): Server-side conversation provider forcibly locks conversation history searches to the same source channel, blocking malicious prompt injection attacks from cross-recalling private WebUI conversations, credentials, or personal workflows. - Zero Prompt Token Overhead & 100% Cache Preservation: Enforced entirely at the runtime execution layer with static tool descriptions, preserving full prompt cache hit rates.
Agentic Code Security Scan (Verify-then-Report Skill)
Myrm ships a prebuiltsecurity-diff-scan skill that runs an autonomous agentic vulnerability scan on diffs and codebases:
- Verify-then-Report Dynamic PoC Validation: In contrast to traditional SAST tools that flood developers with false positives, the skill requires a minimal Proof-of-Concept (PoC) exploit to run in the sandbox before a Critical or High finding is reported. Candidates whose exploit fails are discarded or downgraded to informational, eliminating alert fatigue.
- AST Incremental Slicing: Slices diff contexts to under 300 lines to maximize prompt cache hit rates.
Control UI Surface Error Redaction
To prevent sensitive credential leakage during screen-recording demos, screenshot troubleshooting, or console error returns:- Dual-Tier UI & API Filtering: The frontend
errorRedactor.tsintercepts alltoast.error,toast.warning, and API Client error pipelines, automatically masking high-entropy API keys, Bearer/JWT tokens, and database URI passwords. - Local Path Normalization: Replaces sensitive local developer paths (e.g.,
/Users/username/...or/home/username/...) with~/..., preventing internal user directory disclosure. - Server-Side Serialization Safety Net: FastAPI global exception handlers (
errors.py) sanitize error messages and details before dispatching JSON responses to clients.
Approved Scripts TOCTOU Drift Guard
To defend against Time-of-Check to Time-of-Use (TOCTOU, CVE-2026-32921) attacks:- Evaluation Snapshot Locking: When a user approves an external script command (e.g.,
python script.py), the Harness extracts the script operand and records its SHA-256 content hash snapshot during the security evaluation phase. - Execution-Boundary Revalidation: At the execution boundary (
apply_approval_decisions), the file’s current SHA-256 hash is recomputed. If the script was modified, overwritten, or symlink-swapped while awaiting user approval, it triggersSCRIPT_OPERAND_DRIFT_REJECTand halts immediately. - Hide Allow Always: Commands involving dynamic external script operands automatically suppress the “Always Allow” option, blocking malicious attackers from leveraging existing allowlists to run unreviewed code.
Frontend Chart SVG Strict Sanitization (Mermaid Preview)
To prevent Stored XSS attacks via model-generated or untrusted Mermaid diagrams:- Strict Engine Configuration: Forces Mermaid rendering configuration to
securityLevel: 'strict'andhtmlLabels: false, disabling inner HTML script execution vectors. - Recursive DOMParser Attribute Sanitization: Recursively inspects the rendered SVG DOM tree using
sanitizeMermaidSvg, stripping dangerous tags (<script>,<foreignObject>,<iframe>,<object>). - Neutralized Inline Events and Pseudo-Protocols: Strips all case-insensitive
on*inline event listeners and purgeshref/xlink:hrefattributes containing pseudo-protocols, ensuring complete immunity against Stored XSS across chat bubbles and fullscreen modal views.
Plugin Packaging Integrity Guard
To prevent catastrophic runtime crashes caused by unbuilt or missing build artifacts in third-party plugin packages:- Static Ingestion Verification: Statically verifies referenced local build artifacts and entrypoint scripts (
node dist/index.js,python server.py,./bin/server) at archive ingest time against the package files. - Component-Level Localized Fault Isolation: Automatically skips broken MCP servers while allowing functional Skills and Agents to install smoothly, preventing a single unbuilt component from halting the entire import workflow.
- Adaptive Flag Stripping and Normalization: Strips interpreter flags (
-u,--loader), normalizes Windows backslashes and${PLUGIN_ROOT}macros, and detects bare relative entrypoint arguments (args: ["dist/index.js"]). - GUI Hardening and Accidental Install Protection: Surfaces clear warning badges with actionable build instructions (e.g.,
npm run build), defaults broken servers to skip, and protects against accidental bulk installs.
Child Process Credential Token Isolation
To prevent untrusted scripts and child processes from exfiltrating sensitive tokens from the host environment:- Tri-State Inheritance Policies (SSOT):
CORE: Strict POSIX and runtime whitelist (preservesPATH,HOME,USER, developer tools, andGIT_AUTHOR_*identity while stripping all sensitive tokens).ALL: Full environment inheritance accompanied by 57 dynamic linker/proxy hijacking blocklists and 8-dimensional sensitive token wildcards.NONE: Complete environment isolation with zero inherited variables.
- 100% Execution Surface Coverage: Applied across persistent shell sessions, Python subprocesses, background daemons, browser sandboxes, and CUA execution environments.
- Zero False Positives for Toolchains: Intelligently distinguishes credential patterns (
AUTH_TOKEN,API_KEY) from developer authorship metadata (GIT_AUTHOR_NAME,GIT_COMMITTER_EMAIL), guaranteeing smooth Git commits and local developer workflows.
Zero-Key Subprocess Sanitization vs MITM Proxy
To eliminate TLS disruption and massive performance degradation caused by OpenClaw-style self-signed MITM proxies:- Fail-Closed Physical Sanitization: Strips all sensitive credentials at child environment creation time, ensuring
printenvin subprocesses can never expose plaintext secrets. - In-Memory Controlled LLM Invocation: Agent core inference connections are established directly within the runtime memory without proxy overhead, eliminating
CERTIFICATE_VERIFY_FAILEDerrors. - Dedicated Agent-in-Sandbox Isolation: Leverages dedicated volume isolation and containerization, providing true multi-tenant physical boundaries with zero configuration friction.
Deterministic Execution-Defense vs Jailbreak Red-Teaming
To counter adversarial prompt injection and multi-turn jailbreak attempts (e.g., PAIR, Many-Shot):- Untrusted Data Envelope: Wraps untrusted external data (web content, attachments) in strict physical envelopes, stripping instruction privileges at the system prompt protocol layer to defeat indirect injection.
- Non-Bypassable Layer 1–5 Onion Physical Guard: Bypasses fragile, slow, and evadable external LLM evaluators by enforcing fail-closed physical barriers at the system call boundary. Even if a model is semantically jailbroken, destructive operations and credential exfiltration are physically halted before OS execution.
- Immutable Causal Audit Trail: Tracks all tool calls, approval decisions, and blocks with tamper-evident cryptographic metadata, fulfilling enterprise compliance and auditability requirements out of the box.
Kernel-Level Sandbox & Supply Chain Defense (Bubblewrap / Seatbelt & Google OSV)
To counter third-party dependency vulnerabilities (CVEs) and eliminate sandbox escape risks without heavy brittle CLI interceptors:- Agent-in-Sandbox Kernel Isolation (Linux Bubblewrap & macOS Seatbelt): All code execution runs in dedicated kernel-level namespaces (
--unshare-user,--unshare-pid,--unshare-net). Root filesystem is mounted read-only (--ro-bind /usr), and host credentials (~/.ssh,~/.aws) are physically unmapped (ENOENT). - Default-Deny Network Boundary: Sandbox code execution is strictly network-isolated (
--unshare-net) by default. Malicious CVE payloads cannot reverse-shell or exfiltrate local data. - Google OSV.dev Intelligence & Offline Advisory Catalog: Combines real-time Google OSV.dev CVE batch queries (
osv_scanner.py) with offline known-compromised package catalogs (security_advisories.py) and install-script audits (package_audit.py).
Enterprise Outbound Proxy & Loopback Exemption
To ensure seamless, secure outbound connectivity across complex corporate firewall and TLS-inspection environments:- Native Asynchronous Network Stack (httpx): Fully inherits system
HTTP_PROXY,HTTPS_PROXY,ALL_PROXY, andNO_PROXYwithout fragile Node.js-style global dispatcher patches. - Mandatory Loopback Exemption (Anti-Deadlock Invariant): Automatically injects
localhost,127.0.0.1, and::1into bypass rules, completely preventing local UI, WebSocket, and IPC traffic from routing into external proxies. - Enterprise TLS Inspection Compatibility (
tls_compat.py): Trusts the operating system’s certificate store plus the CA bundles you name and relaxes onlyVERIFY_X509_STRICTfor corporate proxies, without disabling certificate chain verification, eliminating SSL handshake errors across the agent’s Python HTTP clients. - Child Process Proxy Credential Scrubbing: Strips embedded basic-auth proxy passwords before passing environments to untrusted workers, defeating credential extraction attacks.
Protected Instructions & Anti-Persistence Injection Shield
To eliminate persistent backdoor infection through indirect prompt injection attempting to tamper with system steering files:- Protected Instruction Hardening: Core steering assets including
AGENTS.md,SOUL.md,CLAUDE.md, and.cursorrulesare registered under protected path defense (path_security.py). Any mutation attempt forfeits “Allow Always” exemptions and triggers mandatory Monaco Diff approval cards. - Kernel Read-Only Mounts & Shell AST Redirect Veto: In sandbox environments, steering files are mounted read-only (
--ro-bind). In shell executors (shell_command_analyzer.py), AST-driven full-pipe parsing vetos redirection commands (echo > AGENTS.md,sed -i,tee), halting persistent jailbreaks at the system boundary. - Zero-Disk OS Keychain Custody of the Vault Master Key, AES-256-GCM Ciphertext for Saved Keys: The agent vault’s master key is delegated to the OS keyring (macOS Keychain, Linux SecretService, Windows Credential Manager). Keys saved in settings (model providers, search, MCP, channel credentials, the local-model key) are stored in SQLite only as AES-256-GCM ciphertext; their encryption key comes from an environment variable or a mode-0600
.encryption_keyfile in the state directory, not from the OS keychain, so a copy of the database without that file does not expose them.
Multi-Channel DM Session Enclave & Anti-Poisoning Gate
To eliminate cross-talk between multi-user conversations, open-mode superuser privilege escalation, and vector memory poisoning when agents are accessed via external messaging channels (Feishu, WeChat, Telegram, Slack, etc.):- 4-Tuple Physical Session Enclave (
routing_enclave_key): Strictly isolates sessions via(tenant_id, channel, peer_id, agent_profile_id), physically preventing conversation cross-talk and data leaks across tenants, channels, senders, and multi-agent personas while seamlessly maintaining backwards-compatible 2-tupleparse_enclave_keyresolution; - Stranger Privilege Escalation Defense Gate (Anti-Privilege Escalation Gate): Closes the critical vulnerability in OPEN policy where unpaired senders automatically fell back to inheriting
default_user_id(sandbox superuser privileges); unpaired senders are strictly assigned isolated guest identities (guest_{channel}_{sender_id}) with zero access to privileged execution tools; - Long-Term Memory Anti-Poisoning Fence (Anti-Poisoning Fence): Directly validates authentication state in the inbound persistence pipeline
record_inbound; visitor and unpaired messages are strictly stamped withlearning_eligible=False, physically blocking prompt injection attempts from polluting long-term memory and vector indices.
Controlled Micro-budget Autonomous Payment & Spending Limit Vault (Commerce)
To enable agents to autonomously execute micro-payments during long-running workflows (e.g. purchasing third-party CAPTCHA solves, pay-per-call API tokens, ephemeral compute, or temporary proxy bandwidth) without breaking autonomy with constant popups or risking unbounded credit card drainage:- Deterministic
SpendGovernorPure State Machine (spend_governor.py):- Zero External I/O: Designed as a pure state machine decoupled from specific payment providers, ensuring minimal latency and zero vendor lock-in.
- Integer Cents Accounting: Replaces vulnerable floating-point math with exact integer cents (
cents: int), completely eliminating rounding errors and cumulative precision drifts across concurrent transactions. - Dual Hard Limits: Enforces strict
per_transaction_limit_centsanddaily_limit_centsthresholds. Any over-limit attempt is physically blocked and flagged asAPPROVAL_REQUIRED. - Merchant & Category Whitelists: Restricts payments strictly to approved domains (supporting wildcards like
*.api.stripe.com) and service categories (api_compute,dataset, etc.), defeating malicious prompt injections attempting to transfer funds to adversary accounts. - UTC Calendar Day Atomic Rolling & 3600s Lease Compaction: Atomically rolls daily counters at midnight UTC (
YYYY-MM-DD), preventing 24-hour sliding window deadlocks; automatically evicts finalizedCOMMITTED/RELEASEDleases older than 3600s to avoid memory leaks.
- Two-Phase Idempotent Lease Commit/Release:
- Idempotency-Key Pre-allocation: Enforces
idempotency_keydeduplication, allowing safe retries across flaky networks without duplicate holds. - HMAC-SHA256 Cryptographic Lease Signatures: Generates tamper-proof lease signatures (
hmac_sha256(lease_id + amount + ts)). Tampered lease IDs or falsified payment amounts are rejected instantly. - Hold/Commit/Release Lifecycle: Pre-allocates funds on hold, accurately reconciles final charged amounts, and guarantees immediate fund release on task cancellation.
- Idempotency-Key Pre-allocation: Enforces
- Offline Persistent Ledger & Crash-Resilient Boot Reconciliation (
spending_ledger.json):- Cold-Boot Self-Healing (
restore_daily_spent): Upon server boot,BudgetServicescans local committed transactions for the current UTC day and restores the exact daily spent watermark intoSpendGovernor. This eliminates the critical reboot-bypass vulnerability where adversaries induce crashes to reset spending counters. - WebUI Spending Vault & Emergency Freeze: Provides real-time budget utilization gauges, merchant allowlist management, and an instant one-click
Emergency Freezetrigger to halt all active payment channels.
- Cold-Boot Self-Healing (
- Competitive Parity vs. Six Major Frameworks:
- Unlike Hermes, OpenClaw, Codex, DeepSeek-Harness, Pi, and OpenCode—which either completely lack micro-payment sandboxes or expose raw credentials to LLM prompt injection—Myrm provides the industry’s first defense-in-depth commerce spending safety suite, backed by 100% statement test coverage.
Session Canary
Hidden indirect prompt injections (text in matching background colors or inside HTML comments) can steer an agent into leaking what it knows. The session canary is on by default.- Per-session token: every agent session gets a random
CANARY-...token. It is appended to the system prompt together with an instruction never to repeat it, so the system prompt differs from session to session; - Leak detection: after every model turn the guardrail checks the reply text and the tool-call arguments for the token. A hit is recorded in the audit log as
CANARY_LEAKEDand the token is scrubbed from the reply text. Tool calls are not blocked.
Irreversible Destructive Action Hard Stop Line & Workspace Snapshot Rollback Suite
When autonomous LLM agents generate high-blast-radius or irreversibly destructive shell commands (such asrm -rf /, git reset --hard, git clean -fdx, find -delete, mkfs, dd, or inline destructive scripts via python -c "import shutil; shutil.rmtree('.')" / node -e), traditional agent architectures suffer from either catastrophic unconfirmed execution in autonomous/YOLO mode or irreversible repository annihilation caused by accidental approval clicks. To eliminate this existential risk, Myrm establishes an industry-first four-in-one physical hard-stop and workspace snapshot rollback safety architecture:
1. Bash AST Syntax Tree Hard Stop & Blast Radius Classification
- Deep Syntax Tree Semantic Inspection: The Harness engine parses full command pipelines, compound sequences, and inline scripts using a zero-dependency lexical state machine and AST analyzer (
destructive_rules.py, 386 lines), preventing evasions via environmental prefixes or nested quotes; - Deterministic Capability Level Escalation: Irreversible operations are physically classified into
CapabilityLevel.IRREVERSIBLE_DESTRUCTIVE; - Stripping ‘Allow Always’ & Mandatory Explicit CONFIRM Typing: Destructive approval cards unconditionally strip and disable
allow_alwaysprivileges to prevent permanent bypass backdoors. The front-end renders a fiery red alert banner (DestructiveConfirmationBanner), requiring the user to explicitly typeCONFIRMbefore the approve button activates; - YOLO Mode Hard Veto: Destructive action hard-stops hold supreme physical priority over
--yoloautonomous flags, guaranteeing that destructive operations can never execute unsupervised.
2. Zero-Copy Millisecond-Level Workspace Snapshotting
- Isolated Temporary Index via
GIT_INDEX_FILE: In the millisecond window before an approved destructive action runs,workspace_snapshot.pybuilds an isolated temporary Git index (git read-tree HEAD->git add -A->git write-tree->git commit-tree); - 100% Untracked New File Capture: Unlike standard
git stash, this isolated temporary index captures all untracked and modified files with zero race conditions, committing a dedicated snapshot ref (refs/myrm-snapshots/{snapshot_id}); - Zero Disk Copy Overhead & Worktree Cleanliness: Operates without copying large directories or polluting the developer’s working stage, adding less than a few milliseconds of runtime overhead.
3. 10-Minute Dynamic Countdown & Anti-Penetration Rollback Gate (600s TTL)
- Dynamic Countdown Undo Card (
DestructiveUndoCard): Once a destructive action executes, the WebUI immediately mounts an interactive undo card featuring a 10-minute dynamic countdown with strict Lucide vector icons and dual-theme responsive styling; - Server 600s TTL Physical Guard: The
POST /api/v1/approvals/{id}/rollbackendpoint enforces a strict 600-second time-to-live ceiling, physically rejecting stale rollback attempts to prevent accidental corruption of subsequent intended work; - Instant Lossless Reversion: Clicking “Undo & Rollback Workspace” atomically restores the entire workspace state back to the exact pre-execution snapshot, completely reversing accidental deletions in milliseconds.
4. Empirical Evidence & Competitive Parity vs. Six Major Frameworks
- Full Spectrum Comparison (Myrm vs. Hermes / OpenClaw / Codex / DeepSeek-Harness / Pi / OpenCode):
- Hermes / OpenClaw / OpenCode: Lack destructive classification; prompts can wipe repositories unsupervised in auto/YOLO mode;
- Codex CLI: Offers simple terminal prompt prompts with zero workspace snapshotting or undo mechanisms;
- Myrm: The industry’s first holistic defense suite combining Bash AST hard stops, mandatory CONFIRM typing, zero-copy snapshots, and 10-minute TTL anti-penetration rollback;
- Quality Gates & Test Coverage:
- Harness unit and security suite: 32/32 tests passed (2.85s) with 244 total security tests green;
- Server endpoints and integration suite: 5/5 tests passed, with 338 server tests green;
- Frontend Approval components: 30/30 tests passed with 1,840 modules and 0 orphans;
- Real Chrome CDP browser E2E test
test_pending_approvals_chrome_e2e.py: 100% pass (1 passed in 165.59s, zero mock).
15. Object-Capability (OCap) Zero-Trust Delegation Mesh & Capability Attenuation Suite
1. The Death of Ambient Authority in Multi-Agent Systems
Traditional agent architectures suffer from Ambient Authority: spawned subagents inherit full environment permissions, allowing malicious prompt injections to pivot horizontally and exfiltrate secrets or corrupt critical databases.- Hermes / OpenClaw: Restrict a subagent through tool allow and deny lists (
delegate_tool_toolsets.py,delegated-tool-policy.ts); which paths an allowed tool may touch is not bounded per spawn; - Claude Code / Codex: A subagent inherits the parent’s permission mode or sandbox policy, so the boundary belongs to the session rather than to each spawn;
- Myrm: Employs Object-Capability (OCap) delegation, issuing every
delegate_tasksubagent (single and batch modes) an unforgeable HMAC-SHA256 capability handle that the local file and shell executors enforce on each operation. Council, alternatives and Dynamic Workflow children do not receive one. Among the products we reviewed, none binds a per-spawn, path-scoped signed capability.
2. High-Performance Architecture Innovations
- Unforgeable Token Signing & Scoped Confinement: Each subagent runs under a signed handle scoped to its parent’s own workspace plus any extra directories the parent’s path policy and the user’s session grants already allow, whether a path is given directly or through a symlink; the model’s own
contextnever becomes the child’s runtime context. A spawn from an already confined parent is attenuated from the parent’s handle (attenuate_capabilityrejects any elevation withAttenuationError), so a child never exceeds its parent and a read-only parent only spawns read-only children. A read-only subagent is denied writes and shell execution, and an expired or tampered handle is denied. The handle bounds file operations to the granted paths and locks shell commands to the granted working directory; the command text itself is checked by the command validator, and strong isolation of what a command can reach is the job of the OS or cloud sandbox; - Stateless Validation (CWE-400 Proof): Handle validity is a signature and expiry check, so the framework retains nothing per spawn: there is no registry to grow, prune or leak in a long-running daemon;
- Hierarchical Path Escape Defense (CWE-59 Proof): Combines lexical normalization with physical topological path resolution (
os.path.realpath) to neutralize symlink boundary escape attacks; a full guard check (signature, expiry and scope) costs about 8–16 μs for a path that does not exist yet and about 50–60 μs when the path exists and must be resolved (range of four runs of 20,000 calls on the development machine); - 100% Prompt Cache Preservation: Capability enforcement executes purely in coroutine
ContextVarand physical executor gates, introducing 0 bytes of dynamic pollution into system prompts.
3. Empirical Verification & Quality Gates
- Harness Core Tests: unit tests for signing, attenuation, symlink containment and the guard in
core/security/test_ocap_mesh.py; - Spawn Trust Boundary: entry-level tests driven from the
delegate_taskparameters (test_spawn_trust_boundary.py), and a scripted child run through the real executors (test_spawn_capability_wiring.py) that proves a read-only child cannot write and cannot spawn a writable child.
What Gets Stored When You Approve, and What Happens When You Don’t
Approvals are where trust is actually spent, so they are worth reading closely. What is kept. Every approval stores the exact request it authorised — not just the words “approved”. The record carries the action type and a risk grade, so a later audit can tell what was permitted, not merely that something was. What happens when you walk away. An approval that nobody answers is not left hanging, and it is never quietly treated as consent: it is rejected on expiry, the record says so explicitly, and the task waiting on that decision is woken so it can continue with a “no”. How that shows up in the UI. The expiry moment is visible on the approval card, and the same separation you get in the note channel also holds here: a machine-written line such as “auto-approved” can never be presented as if it were something you said.Honest note. “The approval record keeps the approved payload and expires on time” is true today. “The executed action is guaranteed to be byte-identical to what you approved, and only a human outside the agent can approve it” are still roadmap items. Do not read a well-kept approval log as a tamper-proof one.