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.
How trusted projects change the trust boundary
Trusted projects are an approval state, not a different product mode. Once a workspace is trusted, the editor or agent can use more of the environment and repository context to support normal development tasks. That usually means fewer guardrails around commands, extensions, and project-triggered behaviour, because the workspace is being treated as a known-good context rather than an unknown one.
The practical question is not whether the workspace is “safe” in the abstract, but whether its contents and behaviours are allowed to influence the local environment. The moment you approve a project, you are accepting a wider blast radius from scripts, tasks, and tooling that may run as part of the development workflow.
What restricted mode blocks and why that matters
Restricted mode is the safer default when a project has not earned trust. It limits what the editor or agent can do with untrusted code, especially where project contents could trigger execution or alter the local environment. In practice, that means blocking or constraining actions such as command execution, extension activation, and other behaviours that could be abused through repository content.
That distinction matters because many developer compromises start with something that looks routine, such as opening a cloned repository, accepting a prompt, or enabling an extension too early. The Developer Workstation and IDE Security Guide covers this trust boundary in the IDE context, including workspace trust, extension allowlists, and the edge cases that appear when untrusted code is opened.
When to approve trust, and when to keep the workspace restricted
Trust should be granted only after the repository and its automation are understood, because the approval changes what local execution paths are available. If the project came from an external source, includes unfamiliar scripts, or has hidden build steps, restricted mode is the better starting point. The approved state should be reserved for codebases and workflows that your team is comfortable letting influence the workstation.
For developer-focused environments, the same principle appears in wider guidance on untrusted repositories and code handling. Security for Software Engineers reinforces the operational habit of treating repository trust as a security decision, not a convenience toggle. Web3 Developer Operational Security Guide shows the same pattern in a higher-risk setting, where untrusted code, fake job lures, and malicious repositories are common delivery paths.
Risk and Threat Considerations
Trusted project approval widens the attack surface if the repository is malicious or later becomes compromised. The core risk is that code, scripts, or extension-triggering content can gain enough influence to run actions the user did not intend, which turns a convenience setting into a local execution path for an attacker.
Failure mechanism: An attacker places harmful behaviour inside repository contents, then relies on the user to approve trust so the editor or agent will execute commands, load extensions, or otherwise act on that content.
Impact: The result can be code execution, local data exposure, credential theft, or a larger compromise of the developer workstation and adjacent development systems.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
CIS Controls v8, NIST SP 800-53 Rev 5, OWASP ASVS and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | CIS-5 — Account Management | Workspace trust changes local execution authority and should be governed as access control. |
| Recommendation — Limit trusted workspace approvals to approved users and review who can enable broader execution. | ||
| NIST SP 800-53 Rev 5 | AC-6 — Least Privilege | Restricted mode enforces reduced authority for untrusted project content. |
| Recommendation — Apply least privilege so untrusted workspaces cannot trigger unrestricted local actions. | ||
| OWASP ASVS | V13 — Configuration | IDE trust settings are security-relevant configuration that changes execution behavior. |
| Recommendation — Harden workspace trust and extension settings to default-safe values. | ||
| NIST CSF 2.0 | PR.AA-05 — Least Privilege | Trusted vs restricted mode is fundamentally about limiting what untrusted content can do. |
| Recommendation — Constrain workspace permissions so untrusted projects cannot execute beyond necessity. | ||
Practitioner Guidance
What to verify: Before approving a workspace, check whether the repository contains install scripts, task runners, or extension dependencies that can influence the local machine. If the codebase is external or newly cloned, treat trust approval as a deliberate review step rather than a routine click.
Common mistake: Teams often assume that “trusted” means the code is benign. In reality, it only means the workspace is trusted enough to allow broader local interaction, so the approval decision should reflect source provenance, repo maturity, and the cost of a bad assumption.
Practitioner takeaway: Restricted mode is the safer default for unknown code, while trusted projects should be used only when the workspace has earned enough confidence that broader local interaction will not create an unacceptable execution path.
Related resources from NHI Mgmt Group
- Why do trusted third-party updates create such a dangerous failure mode in software supply chains?
- What breaks when Restricted Admin mode and Credential Guard are not in place?
- What breaks when request on behalf of workflows are not restricted to trusted approvers?
- What breaks when unconstrained Kerberos delegation is left enabled on application servers instead of being restricted to trusted infrastructure?
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org