A cloned repository can carry agent settings, MCP definitions, hooks and instructions that activate the moment you open it. Trust prompts and restricted modes keep that project configuration inert until a person accepts it. Several 2025 vulnerabilities came from project files that agents loaded, or rewrote, without a trust check.
Read in this order
- OfficialVS Code: Workspace TrustStart here: the restricted-mode model that most agents copy.
- OfficialGemini CLI: Trusted foldersHow an agent CLI gates project config behind a trusted folder.
- OfficialClaude Code security advisoriesReal advisories showing what trust-check gaps looked like in practice.