Join our Newsletter — 33% off our NHI Course

Could JetBrains AI coding agents bypass workspace trust?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20842
Topic starter  

TL;DR: Repository hook files can trigger local shell commands in JetBrains AI coding agents even when the workspace is marked untrusted, according to Bloom Security. That makes repo trust a developer decision the plugin must enforce, not a setting users can assume will protect them.

Editorial analysis by NHI Mgmt Group, based on content published by Bloom Security: “I Can’t Believe (A)I Trusted Him: How Six JetBrains AI Coding Agents (73M+ Downloads) Silently Execute Untrusted Code”.

By the numbers:

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

Key questions

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.

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.

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.

Practitioner guidance

  • 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.

Bottom line: A repository can become a command source inside an IDE when agent plugins execute hook files without checking workspace trust.

Glossary terms: Workspace Trust, Agent Hook, Fail-open, Fail closed

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →



   
Quote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.