Hermes Agent prompt injection protections

Hermes Agent scans context files such as AGENTS.md and SOUL.md before loading them, but its security policy places prompt injection alone out of scope, so containment must come from the operating system and approval controls.

On this page

Does Hermes Agent protect against prompt injection? What the built-in controls cover

A team that wants to run Hermes Agent over files and web content it does not fully trust should start by knowing what the agent does about prompt injection and what it does not. Hermes Agent ships a heuristic scan of context files such as AGENTS.md, .cursorrules and SOUL.md before they load, and a command approval layer that decides what the agent may run. Neither is a containment boundary. The project's security policy does not treat prompt injection on its own as a security vulnerability, so a report of an injected instruction that changes agent behavior is out of scope unless it chains to an in-scope outcome.

Because Hermes Agent is open source with no enterprise edition, every one of these controls is part of the single open-source release. There is no separate tier with stronger injection detection, central policy or vendor-managed filtering to buy. Your reviewers should read the current security documentation in the Hermes Agent docs and confirm which scan rules and approval behaviors the version you deploy actually includes, since these controls are described as heuristics and may change between releases.

The project's own policy is that running the default local backend with untrusted inputs is outside the supported posture, and that wrapping the whole agent process is the supported posture for untrusted content. In practice, the organization must supply containment itself: an isolated host or container, restricted network egress, scoped credentials and file access, and monitoring of what the agent executes. Treat the context file scan and approval rules as one layer of defense, plan the containment boundary before any team member points the agent at external content, and document who owns that boundary.

Prompt injection controls by capability and edition

This table sorts each Hermes Agent prompt injection control by where it comes from: built into the agent, dependent on an outside component you supply, or unavailable or out of scope. Hermes Agent has no enterprise edition, so every control applies to the same open-source product. The main takeaway is that the agent's own checks reduce exposure but do not contain a hostile model, so an operating system boundary or wrapping layer must carry that job.

ControlBuilt inNeeds an outside componentNot available or out of scope
Context file scanningAGENTS.md, .cursorrules and SOUL.md are scanned before loading, and flagged files are blocked with a warningReview of shared repositories and access control over files the agent loadsNo documented scanning of fetched web content; confirm with the project
approvals.deny glob patternsMatching commands are blocked before YOLO or approval-off settings are checkedYour own review of pattern coverage, since globs cannot list every command formNo documented deny control for instructions arriving through fetched content
Approval modesCommand approval prompts, with YOLO mode skipping themCentral enforcement of the chosen mode; confirm what the docs allow an admin to lockNo enterprise-enforced approval policy, because no enterprise edition exists
Default local backend with untrusted inputNone for this use; the security policy places it outside the supported postureRun the work on a separate host or sandbox backend, then confirm its isolation scopeUnsupported posture under the project's security policy
Whole-process wrappingNone built in; the project names it the supported posture for untrusted contentAn operating system or container wrapper around the whole agent process, configured and tested by youNot a built-in control; confirm which wrapper options the project documents
Prompt injection report handlingVulnerabilities go to private GitHub security advisories with a 90-day disclosure window or until a fix shipsYour own intake and triage for injection findings in your deploymentPrompt injection alone is out of scope; reports need a chained, in-scope outcome. No bug bounty.

How Hermes Agent scans context files and checks commands

Hermes Agent runs two checks that reduce prompt injection risk before the agent acts on untrusted text: a scan of context files before they load, and approvals.deny glob patterns that block matching commands. The documented behavior for context files is that files such as AGENTS.md, .cursorrules and SOUL.md are scanned before loading, and a flagged file is blocked with a warning instead of being loaded into the agent's instructions. Before you approve a rollout, ask the team which context files will live in the repositories the agent can read, who can edit them, and whether a change to one of them goes through code review. A file that passes the scan today can still be changed later, so the scan does not replace review of those files.

The deny rules are the more useful control for an admin because they hold even when someone relaxes approvals. According to the Hermes Agent security docs, approvals.deny glob patterns block matching commands before YOLO mode or approval mode off is checked, so a deny rule still applies when approvals are relaxed. Confirm the exact pattern syntax, the default deny list and where the setting lives in your version with the project's Hermes Agent docs: Security page, then test the rules against the commands your staff are most likely to run. Treat the deny list as one layer in a policy you write, not as a complete list of dangerous commands.

These checks run inside the agent process, and the project's own security policy says the only boundary against an adversarial model is the operating system. A scanner matches what it recognizes, so content it does not recognize, such as an encoded instruction, an unusual command form or a fetched page that changes shape, can pass through. The checks therefore reduce risk rather than contain it. For untrusted inputs, plan to run the whole process inside a boundary you control, and review the Hermes Agent SECURITY.md guidance on supported posture before deciding which backend and network controls apply.

Where untrusted content meets the agent's controls

The diagram starts with fetched web content and repository context files, which enter the agent as untrusted input. Context files such as AGENTS.md, .cursorrules and SOUL.md pass a security scan before loading, and a flagged file is blocked with a warning. The model then proposes a terminal command, which is checked against approvals.deny glob patterns before approval mode decides whether it runs. The command then runs on the selected backend. Check that the operating system boundary is the only containment layer, since the security policy treats heuristic controls as something other than containment.

Untrusted inputs reach the command runner only after heuristic checks, and the operating system is the containment layer.

Decisions the organization must make before allowing untrusted input

Hermes Agent's prompt injection controls are heuristics, not containment, so most of the risk is decided by how the agent is deployed and governed. The five decisions below set how far a successful injection can reach, how much a reviewer must inspect, and which content the agent is allowed to trust.

Local backend or container backend

The local backend runs commands directly on the host where Hermes Agent runs, so any command the agent executes has the host's user permissions. The repository lists six built-in terminal backends (local, Docker, SSH, Modal, Daytona and Vercel Sandbox). Decide which one each deployment uses, and confirm with your own environment what the chosen backend can reach, including mounted volumes, network access and stored credentials.

Repository backends

Wrap the whole process

The SECURITY.md states that running the default local backend with untrusted inputs is outside the supported posture, and that whole-process wrapping is the supported posture for untrusted content. Decide whether the agent process will run inside an outer boundary such as a container, VM or separate host account. Reviewers should then verify that boundary, since it, not the agent's own checks, is the containment layer.

Read SECURITY.md

Deny patterns to maintain

The security docs say approvals.deny glob patterns block matching commands before YOLO or approval mode off is checked. That makes the deny list a control your team owns. Decide which command families are blocked for every deployment, who approves changes to the list, and how changes are reviewed. Confirm that the list is kept in version control so that a change leaves a record.

Security docs

Whether approval mode stays on

Approval prompts are the human check between an injected instruction and a command. Turning approval off or enabling YOLO mode removes that check for everything the deny list does not catch. Decide whether any deployment that reads untrusted content may run with approvals enabled, and who may change the setting. Reviewers should confirm the current default and the change path in the version they deploy.

Which sources count as trusted

Context files such as AGENTS.md, .cursorrules and SOUL.md are scanned before loading, and a flagged file is blocked with a warning. A scan is not a guarantee, so the organization must decide which repositories, documentation and fetched pages the agent may read at all. Record that list per deployment, require review of new context files in trusted repositories, and treat web content and issue text as untrusted by default.

How the answer changes for fetched web content, shared repositories and sensitive data

Teams that read only trusted internal repositories face the lowest injection exposure, but the risk does not drop to zero. Hermes Agent scans context files such as AGENTS.md, .cursorrules and SOUL.md before loading them, and a flagged file is blocked with a warning. That scan is a heuristic control. It can catch obvious planted instructions, but the project's security documentation and its SECURITY.md state that the operating system is the only boundary against an adversarial model.

  • Context file scanning: Confirm that the blocking warning reaches a person who will act on it, and review what the scan has stopped.
  • Approvals.deny patterns: Define glob patterns for destructive commands, because these block matches before YOLO or approval mode off is checked.
  • Approval mode: Keep approvals enabled for commands that write outside the project directory.
  • Repository change control: Treat edits to context files as code changes that require review, since a merged file loads in later sessions.
  • Single operator: Confirm one trusted operator per instance, consistent with the project's description of a single-tenant personal agent.

Check who can write to each repository the agent reads, and record the scan and approval settings in your configuration baseline.

Order of work before approving Hermes Agent for untrusted content

This sequence moves from scoping what the agent will read to documenting the risk that remains after controls are in place. Each step produces a record that a security reviewer can check before the tool is approved for any content that is not fully trusted.

  1. Classify every content source the agent will read

    Security and IT list each source the agent may load: repository context files such as AGENTS.md, .cursorrules and SOUL.md, web pages it fetches, messages arriving through the gateway, and files staff paste in. Each source is labeled trusted, internal or untrusted. Hermes Agent scans context files before loading them and blocks flagged files with a warning, but that scan is a heuristic, so any source outside the trusted label is treated as untrusted in later steps. The output is a signed-off source register that names an owner for each entry.

  2. Choose and test the isolation boundary

    The platform team selects a backend for the agent's terminal commands and confirms that the default local backend is not used for untrusted input, because the project's security policy places that setup outside its supported posture. The team then tests whether the chosen Docker, SSH, Modal, Daytona or Vercel Sandbox backend, or whole-process wrapping, limits file access, network egress and credentials as the design requires. The security policy states that the operating system is the only boundary against an adversarial model, so the test must be run on the host or container itself. Done means a written test log showing what the process can and cannot reach.

  3. Define deny patterns and review approval mode

    The security lead writes approvals.deny glob patterns for commands that must never run, then confirms that these patterns block matching commands even when YOLO mode or approval mode off is set. Engineering records the approval mode in use and confirms that no environment enables YOLO for agents that read untrusted content. Deny patterns are tested with sample commands that include common variants and chained shell syntax. Done means a reviewed configuration file and a test result for each pattern, with the approver's name recorded.

  4. Run a context file red-team scenario

    The security team, separate from the engineers who configured the agent, plants crafted instructions in a context file, a fetched web page and a gateway message. The scenario asks the agent to read a secret, send data to an external address or run a destructive command. The team records whether the content scanner flags each file, whether the agent acts on the instruction, and whether the isolation boundary and deny patterns stop the action. Any scenario that succeeds is logged as a finding. The scenario is illustrative until the team runs it against the real configuration and keeps the results.

  5. Set monitoring of command execution

    Operations configures logging that captures each command the agent proposes, each approval or denial, and each file or network target the sandbox touches. Logs are sent to a store the agent cannot modify. The team confirms what the tool records by default and what must be added at the host or container level, and checks the retention period in the organization's own policy. Done means a test command produces a log entry in the central store that the security team can query, and an alert fires for a denied command.

  6. Document the accepted residual risk

    The risk owner writes a short statement that lists what the controls do not prevent, including prompt injection that reaches the model without being flagged, and records who accepted each residual risk and under what conditions. The security policy places prompt injection alone outside its vulnerability scope, so the organization cannot rely on the project to fix such findings and must plan its own response. The statement is reviewed by security and procurement and reopened when the agent version, backend, or content sources change. Done means a signed record that gates production use.

What a security reviewer asks to see for prompt injection controls

This table lists the prompt injection controls a reviewer should request from Hermes Agent, what each control actually covers, and where the project's own documents place its limits. Read each row as a question to put to the vendor or to your own configuration, not as proof of protection. The main takeaway is that the documented scan and approval controls are heuristic checks, and the project treats prompt injection alone as out of scope for vulnerability reports.

ControlWhat to ask forWhere it comes from
Context file scanningConfirm which context files are scanned (AGENTS.md, .cursorrules, SOUL.md) before loading, what a blocked file looks like in logs, and which file types fall outside the scanHermes Agent security docs
Documented limits of the context scanA written statement that the scan is a pre-load check on named files and is not a guarantee against injected instructions in fetched web or tool contentHermes Agent security docs and SECURITY.md
approvals.deny patternsThe exact glob list in your configuration, with evidence that matching commands are blocked even when YOLO or approval mode off is setHermes Agent security docs
Approval mode settingThe approval mode in each deployed profile, who may change it, and a config file showing it is not set to YOLO or approval off for untrusted inputsYour deployment configuration, checked against Hermes Agent security docs
Isolation boundaryWhich terminal backend runs commands, confirmation that untrusted content is processed by wrapping the whole process, and an explanation of why the default local backend is excludedHermes Agent SECURITY.md and repository README
Out-of-scope statementA copy of the SECURITY.md text that places prompt injection alone outside vulnerability reports, and a written decision on who owns that residual risk internallyHermes Agent SECURITY.md
Vulnerability reporting pathConfirmation that reports go through private GitHub security advisories, that no bug bounty is run, and that your team has a named contact for chained exploitsHermes Agent SECURITY.md
Disclosure windowThe 90-day coordinated disclosure window or until a fix ships, and your own plan for patching a chained issue before the window closesHermes Agent SECURITY.md

Questions buyers ask about Hermes Agent prompt injection

Will the Hermes Agent project accept a prompt injection report as a vulnerability?

Not on its own. The Hermes Agent SECURITY.md lists prompt injection alone, without a chained in-scope outcome, as out of scope for vulnerability reports. A report is more likely to be accepted when it links prompt injection to a concrete, in-scope impact, such as a bypass of a defined security control. Reviewers should read the Hermes Agent SECURITY.md before writing internal intake rules, because the project's own triage decides what counts as in scope. Your team should treat prompt injection as a risk to govern through deployment design, not as a defect the vendor will fix on report.

Does the context file scanner block every malicious instruction file?

No. The Hermes Agent security docs say context files such as AGENTS.md, .cursorrules and SOUL.md are scanned before loading, and a flagged file is blocked with a warning. That is a heuristic check on a known set of files. It does not establish that a file is safe, and an injection phrased differently may pass. The scanner also does not cover content the agent fetches from web pages, repositories or tool output during a run. Treat it as one early filter and confirm its detection behavior against your own test cases before relying on it.

What does whole-process wrapping cost, and who has to build it?

Your own platform or security team builds it, so the cost is internal engineering effort plus the infrastructure to run it. The SECURITY.md says running the default local backend with untrusted inputs is outside the supported posture, and whole-process wrapping is the supported posture for untrusted content. Effort depends on how many workloads touch untrusted input, how isolation is enforced (for example, a container or a separate host with restricted network egress and credentials), and how logs are kept. No supplied figure gives the effort, so ask your engineering lead to scope it against your environment. DeployOpen can plan, implement and harden that isolation inside your own infrastructure under a fixed-scope, written agreement.

Does an enterprise edition of Hermes Agent add prompt injection controls?

The public project does not describe an enterprise edition. The Hermes Agent repository promotes Nous Portal, a subscription that bundles model access and a Tool Gateway, and it does not describe an enterprise edition of Hermes Agent as of the read date in our research. Do not assume added injection defenses from a subscription. Ask the vendor in writing which controls, if any, a paid offering adds, and whether those controls are documented in the security policy. Until that answer is in writing, plan around the open-source trust model.

How long does coordinated disclosure take for a Hermes Agent vulnerability?

The SECURITY.md sets the coordinated disclosure window at 90 days or until a fix ships, whichever the project reaches first in its policy. Reports should go privately through GitHub security advisories. The project runs no bug bounty, so there is no paid reward process for reporters. For your own planning, the window is a ceiling on public disclosure, not a commitment to ship a fix within any period. Record each reported issue in your internal risk register and confirm the status directly with the project when it matters to a deployment decision.

Can our own team run prompt injection protections without outside help?

Often yes, if your team has container, network and secrets-management skills and time to test. The work includes choosing isolation for untrusted inputs, restricting egress and credentials, reviewing context files before they reach the agent, and testing injection cases against your real workflows. The main ongoing cost is staff time for testing and upkeep after each upstream change. Teams without that capacity can contract an implementation partner. DeployOpen implements and hardens open-source platforms in the client's own infrastructure, runs AI agent security testing including red teaming, and works under a fixed-scope written agreement, with retainers for continuous testing.

How DeployOpen tests Hermes Agent prompt injection exposure

DeployOpen plans, implements and tests self-hosted open-source platforms inside the client's own infrastructure, and runs security testing that includes AI systems and agents. For Hermes Agent, we start from the written security posture and then test how context files and fetched content reach the agent in your environment.

How we scope

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Scope names which context files, fetched sources and messaging channels the agent may read in your environment.
  • Scope records which terminal backend and approval settings are in use, since they change what a successful injection can reach.
  • Ongoing support and continuous testing are available as a retainer after the initial assessment.

How we build

  • We configure the agent inside your own infrastructure, including the backend and isolation boundary you have chosen.
  • We set up approval rules and deny patterns so that blocked commands are tested, not assumed to be blocked.
  • We build test cases with injected instructions in context files and fetched web content, and record what the agent does.
  • We separate heuristic controls from containment and document where each control stops and where it does not.

How we hand over

  • You receive a written report of test cases, observed agent behavior, and the boundaries that were and were not reached.
  • Findings are mapped to specific settings, files and network paths so your team can verify and reproduce them.
  • We document the configuration baseline, including the wrapping or isolation approach, for your security review file.
  • Handover includes a review session where your engineers and security reviewers can question each result.

How we support

  • Retesting after configuration changes, agent upgrades or new context sources is available under a retainer.
  • We track the project's published security policy and advisories and flag changes that affect your test baseline.
  • Support covers questions from your security team about remediation, scope changes and new integrations.
  • Confirm with DeployOpen the exact retainer terms, response expectations and deliverables in your written scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.