By NHI Mgmt Group Editorial TeamBased on ClawSecure: “The Sleeper Agent Problem: Why a Clean Scan Today Doesn’t Guarantee Safety Tomorrow” (February 24, 2026)

TL;DR: Clean scans on AI skills do not prove runtime safety once developers can quietly change code after installation, according to ClawSecure. The real control gap is post-installation integrity monitoring, because trust in an initially safe skill can be weaponised later through updated dependencies, credential harvesting, or command-and-control behaviour.


At a glance

What this is: ClawSecure argues that AI skills can turn malicious after a clean initial scan, making one-time review insufficient once installed code can change later.

Why it matters: For IAM, NHI, and AI governance teams, this is a runtime integrity problem as much as a code review problem, because post-install trust can be abused through changed skill behavior and expanded permissions.


Context

AI skills that update after installation create a governance gap that point-in-time review cannot close. A clean scan only proves the code was acceptable at the moment of review, not that the installed version remains the same after the next commit or dependency change.

This matters because skills often run with broad local permissions and can touch files, environment variables, shells, browser sessions, and APIs. That makes the trust boundary closer to a agent identity lifecycle problem than a normal software review problem.


Key questions

Q: What breaks when a cleanly scanned AI skill is updated after installation?

A: The original approval no longer matches the executable state. Once the code changes, the user is effectively trusting a new artifact with the old security decision, which opens the door to secret theft, command execution, or persistence. Security teams need to revalidate the changed version before allowing it to run, not after the compromise is already in place.

Q: Should organisations prioritise continuous monitoring over more review gates for AI?

A: Yes, when the systems involved update faster than formal approval cycles can track. More review gates can slow delivery without improving risk visibility if they are not connected to live system state. The better approach is to place controls at the points where models, data, and access actually change.

Q: What are the warning signs that an AI skill is operating outside its intended boundary?

A: Look for unusual tool combinations, unexpected external calls, repeated privilege requests, and data movement that does not match the skill’s declared purpose. Those patterns suggest the skill is acting as a confused deputy or has absorbed poisoned instructions from untrusted content.

Q: How should teams respond when an installed AI skill’s code changes?

A: Stop relying on the old approval and treat the update as a new security event. Re-scan the changed code, compare findings against the baseline, revoke any secrets the skill could access, and remove the skill if the new version introduces harvesting, persistence, or command-and-control behaviour. The goal is to stop the changed code before it can execute again.


Technical breakdown

How post-installation code drift becomes a security failure

Sleeper agent attacks exploit the difference between a scanned artifact and a living repository. In Git-based delivery models, the installed skill is not fixed: the developer can push later commits that alter behavior without changing the user’s original trust decision. The dangerous part is not simply that code changed, but that the execution context still treats the skill as previously approved. That breaks the assumption that review, approval, and use all describe the same binary state. In practice, the security question becomes whether the system can detect content-hash drift before the next execution path loads the updated code. See the AI Coding Agents Security Guide.

Practical implication: Treat repository-backed skills as mutable runtime assets and require integrity checks before every execution of updated code.

Why broad permissions turn a skill update into a credential risk

An AI skill running with user-level permissions can access environment variables, files, clipboard data, shells, and browser sessions. That makes an apparently ordinary update a high-impact delivery channel for secret theft, command execution, or persistence. The article’s key point is that the exploit surface is created by the combination of trusted installation and expansive runtime access. Once those two conditions exist together, a later code change can convert an ordinary utility into a credential-harvesting foothold without changing the user’s workflow in visible ways.

Practical implication: Reduce the permissions granted to installed skills and isolate any skill that can reach secrets or shell execution.

What continuous monitoring changes in the control model

Continuous monitoring replaces a one-time approval model with a change-detection model. Instead of asking whether the skill was safe on day one, the control asks whether the installed code still matches the last approved state. That is why hash drift, dependency updates, and re-scan triggers matter. In governance terms, the control objective shifts from preventing installation of bad code to detecting post-installation transformation of good code into bad code. This is a closer match for AI agent ecosystems, where trust is dynamic and the code path can evolve after the original evaluation. Read Top 10 Agentic AI Identity Issues.

Practical implication: Use hash-based change detection and automatic rescanning to make code drift visible before users run the changed skill.


Threat narrative

Attacker objective: The attacker wants to convert a trusted AI skill into a post-installation malware channel that steals secrets and extends access without obvious user suspicion.

  1. Entry occurs when a useful skill is published in a clean state and gains trust through successful scans and downloads.
  2. Credential access begins after a later update introduces a harvester, encoded payload, or dependency that can read environment variables and other secrets.
  3. Escalation follows when the modified skill uses the user’s existing permissions to run shell commands, persist access, or expand into other workflows.
  4. Impact is achieved when credentials, data, or sessions are exfiltrated or reused for lateral movement across the user environment.
  • tj-actions/changed-files compromise 2025: A stolen bot token let attackers poison tj-actions/changed-files so pipelines printed their CI/CD secrets to public logs (CVE-2025-30066).
  • CircleCI breach 2023: Malware stole a CircleCI engineer's SSO session; attackers exfiltrated customers' CI/CD secrets and keys, forcing a platform-wide rotation.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

The sleeper agent problem is really a runtime integrity problem, not a review problem. A clean pre-installation scan answers a narrow question about one version of code, while the attack depends on later code drift after trust has already been granted. That makes the control failure structural: organisations are approving a moving target as if it were static. The practitioner conclusion is to govern code changes as security events, not just development events.

AI skills collapse the boundary between software supply chain risk and NHI governance. Once a skill can read environment variables, use shell access, and call external services, it behaves like a non-human actor with delegated authority rather than a simple application bundle. The trust decision is therefore about who or what can act at runtime, not just what code was inspected at install time. Agent identity lifecycle governance becomes relevant wherever the skill can persist, update, and act with retained privileges.

ClawSecure’s article exposes a named concept worth tracking: post-installation trust drift. The issue is not merely malicious code, but the decay of the original trust decision after installation, update, and reuse. That concept explains why a skill can remain functionally familiar while becoming security-hostile underneath. The practitioner conclusion is to treat trust as revocable and time-bound after every code change.

Continuous rescanning is necessary but not sufficient on its own. Detection matters only if it is tied to decisive operational responses such as blocking execution, removing the skill, or revoking exposed secrets. Otherwise, monitoring becomes another audit trail for a known weak spot. The practitioner conclusion is to pair drift detection with enforcement actions that actually stop changed code from running.

OWASP ASI-10 fits this pattern because the skill’s behaviour can diverge from its approved intent after installation. The article’s scenario shows why rogue behaviour is often a lifecycle issue rather than a single malicious commit. That matters for agent governance because intent can remain constant in documentation while execution changes in the repository. The practitioner conclusion is to monitor the runtime state, not just the declared description.

Read next: AI Coding Agents Security Guide

What this signals

Trust in AI skills needs an expiry condition. The practical governance shift is from installation approval to continuous verification after every code change, because the control objective is no longer only to filter bad submissions. It is to prevent a once-acceptable skill from becoming a new runtime actor with the same standing permissions. That is a agent identity lifecycle problem as much as a scanning problem.

Post-installation trust drift is the right mental model for this category. When the code that users rely on can change silently after adoption, security teams need controls that watch for drift, not just for initial maliciousness. The programme implication is straightforward: if changed code can still execute, the original review process has failed to govern the actual risk.

OpenClaw-style ecosystems force security leaders to align AI governance, software supply chain monitoring, and secret protection around runtime state rather than static artefacts. That means update events, hash changes, and new network destinations become governance signals, not developer noise. Teams that cannot see those signals will miss the point at which a trusted skill becomes an active threat.


For practitioners

  • Implement hash-based change detection Track every installed skill against its last approved SHA-256 hash and force a re-scan when the hash changes.
  • Re-scan every updated skill before use Do not allow updated repository code to execute until the new version has been reviewed for new dependencies, callbacks, or encoded payloads.
  • Minimise permissions for installed skills Remove access to environment variables, shell execution, clipboard data, and browser sessions unless the workflow genuinely requires them.
  • Alert on new external endpoints Flag any skill update that introduces command-and-control callbacks, exfiltration destinations, or unexpected network destinations.
  • Retire unused skills quickly Remove dormant skills from the estate so you reduce the number of codebases that can drift, update, or be repurposed later.

Key takeaways

  • A clean first scan does not guarantee that an AI skill remains safe after installation if the underlying repository can change later.
  • The article’s central evidence is a pattern of code drift, where updated skills can introduce credential harvesters, command-and-control callbacks, or exfiltration logic after trust is established.
  • The control that matters most is continuous integrity monitoring tied to enforcement, because changed code must be revalidated or blocked before it runs again.

Related NHI Mgmt Group resources: Agentic AI Identity Guide · AI Coding Agents Security Guide · Top 10 Agentic AI Identity Issues · tj-actions/changed-files compromise 2025


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, OWASP Non-Human Identity Top 10 and MITRE ATT&CK define the specific risk controls and attack patterns relevant to this term.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI10 — Rogue AgentsThe article centres on AI skills that diverge from approved behaviour after installation.
Recommendation — Map changed-skill monitoring to ASI10 and block execution when behaviour no longer matches the approved state.
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageThe attack uses updated skill code to expose environment variables and other secrets.
NHI-07 — Long-Lived SecretsThe article shows how persistent installed skills keep access long after the initial scan.
NHI-04 — Insecure AuthenticationThe skill’s retained access and update path weaken trust in how it authenticates and executes.
Recommendation — Scan installed skills for secret access paths and revoke any credential exposure immediately. Shorten the effective lifetime of skill permissions and revalidate access whenever code changes. Reassess authentication and trust boundaries for every mutable skill before it can execute again.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe attack chain includes secret theft and movement across the user environment.
Recommendation — Map skill drift to credential access and lateral movement tactics, then hunt for exposed secrets and follow-on access.

Key terms

  • Sleeper-Agent Attack: A compromise pattern in which a trusted AI agent component later ships malicious behaviour through an update. The component appears legitimate at first, then turns unsafe after trust has already been earned, which makes version re-validation essential.
  • Runtime Integrity: Runtime integrity is the assurance that what a system executes matches what defenders expect at the moment of execution. It matters because malware or exploit code can change memory, cache, or process behaviour without changing the on-disk file, which makes artifact-based checks incomplete on their own.
  • Code Quality Drift: Code quality drift is the gradual loss of consistency in a codebase when new changes are reviewed against weak, uneven, or context-light standards. Over time, small defects and architectural shortcuts accumulate until delivery slows and maintenance becomes more expensive.
  • AI Supply Chain Rug Pull: AI Supply Chain Rug Pull is the abrupt replacement of a trusted AI model, dataset, package or service with a harmful or degraded version after users have depended on it. Defenders should pin versions, verify provenance, monitor for unexpected ownership or behaviour changes and review updates before adoption.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps practitioners turn identity control objectives into practical governance across modern digital systems.
NHIMG Editorial Note
Published by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org