By NHI Mgmt Group Editorial TeamDomain: AI SecuritySource: terraPublished May 7, 2026

TL;DR: A benign-looking OpenClaw skill can later become an injection path by using workspace files and heartbeat routines to execute attacker-updated instructions, bypassing protections aimed at malicious installs and external-content prompts, according to terra. In agentic systems, trusted context can behave like code when third-party content is allowed to update it after installation.


At a glance

What this is: Terra Security’s research shows that a benign-looking OpenClaw skill can become a delayed injection vector by using trusted workspace files and heartbeat routines to execute attacker-controlled updates.

Why it matters: This matters because IAM, NHI, and agentic AI programmes must govern not just initial access but also the trust boundaries around post-install updates, workspace context, and delegated execution paths.

👉 Read Terra Security’s analysis of OpenClaw workspace trust and agent hijacking


Context

Agent workspace trust becomes a security problem when content that looks operational is later treated as authoritative instruction. In OpenClaw’s case, the issue is not classic malicious installation or direct external prompt injection, but the way trusted workspace files can be updated remotely after setup and still executed by the agent.

For IAM and NHI teams, that creates a familiar governance failure in a new form: authority is being delegated to a non-human actor through mutable content, not a stable policy boundary. The result is a control gap between approved installation time and trusted execution time, which is exactly where agentic AI security starts to overlap with NHI governance.


Key questions

Q: How should security teams govern AI agent routines that read mutable workspace files?

A: Treat every mutable workspace file as a governed trust boundary, not a harmless support asset. Security teams should require owner approval, version control, and provenance checks before an agent can execute instructions from a file that third parties can update after installation. If the file can change remotely, the trust decision must be repeated, not inherited.

Q: Why do recurring agent tasks create more risk than one-time prompts?

A: Recurring tasks create standing authority. A one-time prompt can be reviewed in the moment, but a heartbeat or scheduled routine keeps reusing the same trust relationship and can pick up later changes in the source material. That makes delayed payloads, repository updates, and post-install instruction changes much more dangerous than a single prompt event.

Q: What do security teams get wrong about prompt engineering for AI agents?

A: They often assume better wording is enough to create reliable control. In practice, prompt style can help, but it does not create a secure boundary when the agent is still free to reinterpret context. Real governance comes from structure, validation, and constrained action paths.

Q: Who is accountable when an AI agent acts on instructions from a third-party skill update?

A: Accountability should sit with the organisation that allowed the recurring trust path to exist, not just with the skill publisher. Security, platform, and IAM owners need to define who can approve mutable instructions, who can write the files, and who must revoke the path when the skill is no longer required.


Technical breakdown

Workspace trust as an execution boundary

OpenClaw’s model treats workspace files as trusted local context, while external web content is marked untrusted and wrapped. That distinction matters because the agent’s heartbeat process reads HEARTBEAT.md and executes listed tasks as part of normal runtime behaviour. If a third-party skill can influence what gets written into that workspace, then the trust decision shifts from content origin to file location, which is a weaker security boundary. In practice, the system is not merely reading instructions. It is converting mutable text into recurring execution intent.

Practical implication: review which workspace files are allowed to influence agent execution, and restrict any file path that can be modified by third parties.

Delayed payloads in agent skills

The attack pattern depends on time separation. A skill looks harmless at installation, passes review, and later receives updated instructions through a repository change or changelog update. Because the agent rereads those files during heartbeat execution, the malicious content arrives after the original trust decision. That bypasses install-time scanning and content-wrapper protections because the payload is neither present at install nor delivered through external content. The core risk is not the skill itself, but the ability to mutate trusted instructions after approval.

Practical implication: treat post-install repository changes as a separate trust event and require revalidation before any skill-driven routine can execute updated instructions.

Prose becomes code in agentic systems

This research highlights a broader agentic AI pattern: text in a trusted control plane can function like executable logic even when it never becomes traditional code. A routine that says to apply procedure updates from a writable file creates a persistent control channel if that file can be altered remotely. That is an identity and authorisation problem as much as an AI safety problem, because the agent is effectively inheriting authority from content it cannot independently verify. The control failure is contextual trust without lifecycle governance.

Practical implication: bind agent actions to verified provenance and immutable approval states, not just to the presence of instructions in a trusted directory.


Threat narrative

Attacker objective: The attacker wants to turn a benign skill into a persistent remote instruction channel that can exfiltrate data or trigger arbitrary agent actions.

  1. Entry occurs when a user installs a benign-looking skill from GitHub and adds a heartbeat instruction that points the agent to a routine file in the workspace.
  2. Credential_harvested is not the primary stage here, but the attacker gains durable control over execution context by updating repository content that the agent later trusts.
  3. Impact follows when the heartbeat executes the updated routine and sends sensitive workspace data or triggers other attacker-chosen actions from within trusted context.

NHI Mgmt Group analysis

Trust-boundary failures in agentic systems now look more like lifecycle problems than prompt problems. This research shows that the decisive issue is not whether the initial skill was malicious, but whether a later update can inherit the original approval. That shifts the governance question from content moderation to lifecycle control, which is a familiar identity pattern in a new runtime. For practitioners, the lesson is that trust must be revalidated whenever a non-human actor consumes mutable context.

Agent workspace files are becoming de facto non-human identities. When a heartbeat routine treats a file as an authorised source of action, the file is no longer just storage. It is an identity-bearing object with delegated power to shape execution. That creates an access-control problem that sits between IAM, NHI governance, and AI safety. Practitioners should treat file-based instruction paths as governed assets, not operational conveniences.

Prose-based payloads expose a control gap that code scanning will miss. The article’s key insight is that attack content can be embedded in human-readable update text and still drive privileged behaviour. That means the security model must extend beyond static malware detection into provenance, change control, and policy enforcement for generated or authored instructions. In agentic environments, scanner coverage alone will not close the boundary.

Persistently reachable update channels create standing privilege for AI agents. Once a routine can keep checking for new instructions from a third-party repository, the agent inherits an always-on trust relationship that resembles standing access. That is exactly the condition zero-trust programmes try to eliminate in human and machine identity models. For security architects, the implication is clear: recurring execution paths need explicit lifecycle controls, not implicit trust.

Named concept: remote instruction channel. This pattern turns a benign initial skill into a remotely updatable control path that can change what the agent does after approval. It matters because the compromise is not a one-time injection but an ongoing authority relationship. Practitioners should recognise remote instruction channels as a distinct class of agentic AI governance failure.

What this signals

Agentic AI programmes will need lifecycle controls that look much closer to identity governance than traditional prompt hardening. Once a routine can repeatedly consume mutable context, the control objective becomes provenance, revocation, and change management. That is why the gap between approved installation and approved execution will become one of the most important risk boundaries in agent security.

Remote instruction channel: this is the point at which a writable file or repository starts acting like delegated authority for an agent. The practical implication is that teams must model agent workspace paths as access-controlled assets and align them to identity and change governance rather than treating them as incidental configuration.

For teams working through NHI governance, the lesson maps cleanly to standing privilege and offboarding. If a skill or update path can still influence an agent after it should have been retired, the problem is not just technical exposure but lifecycle failure. The relevant control question is whether the organisation can prove who can change the instruction source, when, and under what approval state.


For practitioners

  • Separate install-time trust from update-time trust Require a fresh approval step whenever an agent skill or routine reads instructions from a repository, changelog, or other mutable source. Do not allow post-install content changes to inherit the original installation decision.
  • Lock down workspace instruction files Restrict which files can influence agent execution, and treat HEARTBEAT.md-style paths as privileged assets with explicit write controls, version history, and owner approval.
  • Verify provenance before every recurring run Bind scheduled agent activity to signed or otherwise verified content so a heartbeat cannot act on repository updates that were not independently validated.
  • Apply NHI-style lifecycle controls to agent routines Offboard unused skills, revoke repository write paths, and review every recurring execution chain as if it were a non-human identity with delegated authority.
  • Instrument for update-driven behaviour changes Alert when a previously approved skill starts requesting new file reads, new destinations, or new exfiltration paths after a repository change.

Key takeaways

  • This research shows that benign installation does not eliminate agentic AI risk when later updates can rewrite trusted execution paths.
  • The attack matters because it bypasses static defences by moving control from external content into mutable workspace context.
  • Practical defence starts with lifecycle governance for agent routines, including provenance checks, write restrictions, and reapproval on change.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10Agent instruction abuse and tool misuse are central to this workspace trust attack.
OWASP Non-Human Identity Top 10NHI-01The attack turns a routine into a non-human identity trust path with delegated authority.
NIST AI RMFGOVERNThe issue is governance of delegated AI behaviour and change authority.
NIST CSF 2.0PR.AC-4The article exposes over-broad trust in who or what can influence agent actions.
NIST SP 800-53 Rev 5AC-6Least privilege is directly relevant to who can alter agent routines and workspace files.

Assign clear accountability for agent instruction sources and require approval for post-install changes.


Key terms

  • Remote Instruction Channel: A remote instruction channel is a path that lets an external party change what a system will do after it has already been trusted. In agentic AI, this often appears as mutable workspace content, repository updates, or scheduled routines that are later consumed as authoritative guidance.
  • Trusted Workspace Context: Trusted workspace context is local content that a system treats as safe to execute or follow because it sits inside an approved environment. In agent systems, this can include files, prompts, and runbooks, and it becomes risky when untrusted parties can modify it after approval.
  • Provenance Validation: A control approach that verifies where a payment, credential, or approval came from, who authorised it, and whether its path matches expected business logic. It is stronger than appearance-based review because it anchors trust in lineage and context, not visual similarity.
  • Recurring Execution Chain: A recurring execution chain is a scheduled or repeated agent action that keeps reusing the same instructions or files over time. It increases risk because any later change to the source material can influence future behaviour, turning a one-time approval into an ongoing trust relationship.

What's in the full report

Terra's full analysis covers the operational detail this post intentionally leaves for the source:

  • Step-by-step attack flow showing how the heartbeat routine reads mutable workspace content and executes it as trusted instruction.
  • Code and implementation detail around HEARTBEAT.md handling, including how the trusted workspace path is used at runtime.
  • Disclosure discussion showing how Terra framed the trust-boundary issue and how the platform responded.
  • Concrete examples of exfiltration, persistence, and arbitrary execution that demonstrate the blast radius of the pattern.

👉 Terra Security’s full post covers the attack chain, the workspace trust boundary, and the disclosure context.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, and secrets management. It is designed for practitioners who need to apply identity discipline to delegated and non-human execution paths.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 1, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org