Independent analysis by NHI Mgmt GroupSource article: Bloom Security, “I Can’t Believe (A)I Trusted Him: How Six JetBrains AI Coding Agents (73M+ Downloads) Silently Execute Untrusted Code” (June 30, 2026)

TL;DR: Six JetBrains AI coding agents with more than 73 million downloads silently executed repository-defined hooks without checking whether the workspace was trusted, according to Bloom Security, creating a path to steal keys, tokens and source code. Workspace trust only works when plugins enforce it; an advisory gate leaves untrusted repo content able to spawn local shell commands.


At a glance

What this is: NHI Mgmt Group's analysis, drawing on Bloom Security's blog post: Six JetBrains AI coding agents loaded repository hook files and executed local commands without checking workspace trust.

Why it matters: AI coding assistants now inherit the same trust boundary as the IDE itself, so plugin behaviour can turn a cloned repository into a code-execution path on developer endpoints.

By the numbers:

  • The same issue appeared in six popular JetBrains AI coding assistants, with over 73 million downloads between them.

Context

Workspace trust is supposed to separate untrusted repository content from the developer’s local machine, but that boundary fails when a plugin treats repository files as executable configuration without checking trust first. In an IDE, the issue is not just whether code is opened, but whether repo content can trigger a command on the endpoint before the user has any meaningful chance to review it. The same problem spans AI coding agents, extensions, and repo-supplied hook files.

The core identity question is whether an AI coding agent should be allowed to act on repository-supplied instructions before the workspace has been trusted. In a developer toolchain, that matters because the agent is operating with the user’s permissions, so the trust decision has direct consequences for secrets, source code, and local system access. AI coding agents security becomes a governance issue, not just an IDE feature.


Key questions

Q: How do I stop repository hooks from running in untrusted workspaces?

A: Disable automatic hook execution in untrusted repositories and only allow it after a workspace trust decision. Use workspace trust to block tasks such as post-checkout, pre-commit, or other repository-supplied scripts until the project is reviewed. Treat cloned code as untrusted by default, especially when the workspace can trigger local commands or modify files.

Q: Why do AI coding agents create endpoint command-execution risk?

A: AI coding agents create endpoint command-execution risk because they can turn repository context into shell commands, file edits, or tool calls without a human reviewing each action. If the agent has access to the workspace, terminal, or secret-bearing files, a malicious prompt, dependency, or repository payload can steer it into executing attacker-controlled commands.

Q: What is the difference between trusted projects and restricted mode?

A: Trusted projects allow broader tool use and repository actions after the workspace has been approved, while restricted mode limits what the editor or agent can do in untrusted code. Restricted behaviours usually block command execution, extension activation, and other operations that could be triggered by the project contents. The difference is the level of trust granted to the workspace.

Q: What signs suggest an AI coding agent is executing untrusted code?

A: Signs include unexpected shell commands, file changes outside the requested task, attempts to read secrets, repeated prompts to approve actions, and tool calls that do not match the user request. A trust API can help record or surface the workspace state, but the main indicator is an agent crossing from code suggestion into executable action on unreviewed content.


Technical breakdown

Why workspace trust matters in the IDE

Workspace trust is a boundary between repository content that may be hostile and the local runtime that can execute commands, load tasks, or run extensions. The safe design is to fail closed: if trust is absent, dangerous behaviours stay disabled unless the plugin explicitly opts in under a trust-aware model. Bloom Security’s example shows what breaks when that model is not enforced by default. The plugin still loads repo-controlled hook definitions and can hand them to a shell, which means trust becomes advisory rather than preventive.

Practical implication: Treat trust as an execution precondition, not a UI state, and block any repository-controlled command path until it is satisfied.

How repository hook files become command execution

A hook system turns a configuration file into a trigger for local actions. The usual pattern is simple: the plugin reads a repo-relative file, validates that it contains a command string, and then runs that command when a lifecycle event fires such as session start or prompt submission. If the command is passed to a shell without additional restriction, the configuration becomes code execution. That is why a file that looks like harmless project metadata can actually control what happens on the developer endpoint.

Practical implication: Inspect hook locations as executable surfaces and assume any repo-controlled command string can become a shell escape.

Why advisory trust checks fail open

An advisory trust check asks the plugin to decide for itself whether the project is trusted. That is weaker than a platform-enforced gate because silence defaults to action. If the plugin never calls the trust API, nothing stops it from running hooks in an untrusted workspace. Bloom Security’s finding is therefore not just about missed validation, but about a control model that assumes every plugin author will implement the same safety check correctly and consistently.

Practical implication: Prefer platform mechanisms that disable unsafe behaviour by default, and do not rely on every extension to remember the same trust check.


Threat narrative

Attacker objective: The attacker aims to turn a benign-looking repository into local command execution that exposes developer secrets and source assets.

  1. Entry occurs when a developer opens an untrusted repository in JetBrains and starts an AI coding session, giving the plugin access to workspace-controlled files.
  2. Credential or code access happens when the plugin loads a repository hook file and passes its command string to the local shell under the developer’s privileges.
  3. Impact follows when the executed command steals cloud keys, access tokens, or source code, or plants a backdoor on the endpoint.

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

Workspace trust only works when the platform enforces it: Bloom Security’s finding shows that an advisory trust model is not enough when third-party plugins can still execute repository-controlled commands. The dangerous assumption is that every extension will voluntarily respect the trust boundary the same way the IDE does. In practice, that assumption collapses as soon as a plugin treats trusted and untrusted workspaces identically.

Repository hooks are executable identity artefacts, not harmless config: Once a plugin maps repo content to shell execution, the configuration file itself becomes part of the trust surface. That creates a named failure mode: repo-controlled shell execution in untrusted workspaces. The implication is that AI coding agents inherit endpoint risk from the repository they read, which means the governance problem sits at the intersection of IDE policy, extension design, and developer endpoint control.

The dangerous default is the real pattern, not six separate mistakes: Bloom Security’s six examples point to one broader governance gap: platforms that assume a plugin will remember to ask whether the workspace is trusted. That is a broken premise for developer tooling that ingests untrusted code and then executes local actions on the user’s behalf. Practitioners should read this as a platform trust design issue, not a one-off review miss.

Agent hooks blur the line between reading code and running code: AI coding agents are built to consume repository context, which makes it easy to miss when that context includes commands that alter the endpoint. The control failure is not the presence of hooks alone, but the absence of a binding trust check before execution. Security teams should treat that as a distinct class of endpoint governance failure across IDEs and agent plugins.

Workspace trust becomes a shared responsibility across the IDE and the agent: JetBrains provides the trust API, but the plugin decides whether to call it. That delegation split is where the risk lives, because the platform can create a safe boundary while the agent silently ignores it. Practitioners need to evaluate whether the extension architecture can fail closed before they allow it on developer machines.

From our research library:

What this signals

Workspace trust needs to be enforced at execution time: The practical lesson is that security teams should stop treating IDE trust banners as sufficient protection. If a plugin can still read repository-defined hooks and spawn local commands, the control has failed at the point that matters most.

This pattern will keep resurfacing anywhere agentic IDE features meet repository-controlled configuration, because the same design tension exists in terminals, sidecars and extension hosts. Teams should expect more pressure to evaluate whether extensions fail closed by default, especially when tools are allowed to act on local files before any review step.

Agent hooks create a trust boundary that is easy to describe and easy to bypass. That makes them a useful test case for AI agent identity security programmes that need to decide which runtime actions an assistant may take on a developer endpoint.


For practitioners

  • Enforce trust-gated hook execution Block any repository-supplied hook, command, or sidecar process until the IDE reports the workspace as trusted, and re-check that state when it changes.
  • Audit hook file locations on cloned repositories Search for hook configuration in repository-relative paths before starting an AI chat session, especially in projects opened from the internet or a third party.
  • Disable agent hook features in untrusted workspaces Keep hook-related features off until plugin behaviour is proven to fail closed, because a global feature flag is not the same as a per-workspace trust decision.
  • Review endpoint exposure from AI coding extensions Inventory every IDE extension and coding agent on developer endpoints, then test whether each one can still execute local actions when trust is absent.

Key takeaways

  • A repository can become a command source inside an IDE when agent plugins execute hook files without checking workspace trust.
  • The issue is structural, not isolated, because the dangerous default appears across multiple JetBrains AI coding agents.
  • Developer endpoint governance now has to account for plugin trust boundaries, not just repository content and user behaviour.

Related NHI Mgmt Group resources: AI Coding Agents Security Guide · Agentic AI Identity Guide · AI Agent Identity Security Buyer's Guide · Enterprise AI Copilot Security Guide


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 address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI02 — Tool MisuseRepository hooks let an agent trigger shell commands through a workspace file, which is a tool misuse path.
Recommendation — Restrict agent tool execution to trusted contexts and block repository-controlled commands by default.
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationThe plugin fails to verify workspace trust before acting on repository-controlled commands.
Recommendation — Enforce trust checks before any NHI-controlled command path is allowed to execute.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThe issue is about whether the plugin is authorized to execute workspace-supplied actions on the endpoint.
Recommendation — Apply authorization controls so untrusted workspace content cannot trigger privileged local actions.
MITRE ATT&CKTA0002;TA0006 — Execution; Credential AccessThe attack chain uses local command execution to reach developer secrets and source code.
Recommendation — Map hook-based shell execution to TA0002 and TA0006, then hunt for suspicious child processes and secret access.

Key terms

  • Workspace Trust: A trust control in code editors that separates passive file viewing from active execution of project-defined tasks. When disabled or bypassed, the editor can run repository instructions in the user’s context, which turns source control content into an execution path.
  • Agent Hook: A hook is a deterministic command that runs at a fixed point in an AI agent's workflow, such as before a tool call or after an edit. It is used to allow, deny, annotate, or verify actions regardless of what the model intended to do.
  • Fail-open: A fail-open system defaults to the safer operational state when it cannot trust its own conclusion. In a SOC, that means human review instead of auto-resolution. The control objective is to preserve uncertainty, evidence, and accountability when automation cannot reach a defensible answer.
  • Fail closed: Fail closed means a system denies access when a dependency, policy check, or security service cannot make a confident decision. In AI retrieval pipelines, this prevents partial or unauthorised documents from leaking into the model when the authorization layer errors or returns incomplete results.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org