Subscribe to the Non-Human & AI Identity Journal

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.

Expanded Definition

Workspace Trust is the editor-side boundary that keeps a repository in a passive, review-only state until the user explicitly allows project logic to run. In practice, it prevents automatic execution of tasks, scripts, or extensions that a workspace may try to trigger, which matters because source files can carry instructions as well as code. In NHI and agentic AI environments, the control is a local execution safeguard, not an identity control, but it directly affects how secrets, build steps, and developer tooling are exposed to abuse. Definitions vary across vendors on which actions are blocked by default, so implementation details should be checked rather than assumed. The closest governance analogue is the zero-trust principle in NIST Cybersecurity Framework 2.0, where trust is explicit, contextual, and revocable. Workspace Trust should be treated as a guardrail for untrusted codebases, not as a substitute for PAM, RBAC, or NHI secret hygiene. The most common misapplication is assuming a trusted repository is safe to execute automatically, which occurs when cloned content, contributed build files, or AI-generated project scaffolding is opened without review.

Examples and Use Cases

Implementing Workspace Trust rigorously often introduces friction for developers, requiring organisations to weigh safer project onboarding against faster task execution.

  • A contractor opens an unfamiliar codebase, and the editor suppresses task runners until the workspace is trusted, reducing the chance that hidden setup scripts execute on first load. That control is often part of a broader NHI risk posture described in the Ultimate Guide to NHIs.
  • A build repository contains a post-clone script that references cloud credentials; Workspace Trust helps ensure the file is inspected before the script can run, aligning local workflow with NIST Cybersecurity Framework 2.0 expectations for controlled execution.
  • An AI-assisted coding session produces scaffolding that includes terminal commands and dependency hooks. Trust settings make the developer opt in before those commands can execute, which is especially important when agent-like tools have tool access and limited judgment.
  • A security team standardises onboarding so that only repositories from curated internal sources are trusted automatically, while external forks remain untrusted until reviewed, reducing accidental script execution in mixed-trust environments.
  • A DevOps engineer investigates why a project did not install dependencies on open. The issue is not a bug but a deliberate trust boundary that forces an explicit decision about whether the workspace should be allowed to act on the user’s behalf.

Why It Matters in NHI Security

Workspace Trust matters because many identity incidents begin with execution, not authentication. If a repository can cause scripts to run before review, it can reach the same operational surface area as compromised service accounts, leaked tokens, or malicious build automation. NHI governance guidance in the Ultimate Guide to NHIs shows why this matters: 30.9% of organisations store long-term credentials directly in code, and that makes a trusted workspace a high-value target for credential theft and lateral movement. The control also supports the posture described by NIST Cybersecurity Framework 2.0, where execution risk is reduced through managed, least-privilege workflows rather than broad implicit trust. In an NHI context, the concern is not only human developer safety but also whether build automation, agents, and local tools can be induced to execute with access to secrets, APIs, or deployment paths. Organisations typically encounter the consequences only after a malicious repository, poisoned dependency, or compromised collaboration request triggers an unexpected script, at which point Workspace Trust becomes operationally unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-02 Covers secret exposure and unsafe code-adjacent execution paths.
NIST CSF 2.0 PR.AC-4 Supports controlled access and least-privilege execution decisions.
NIST Zero Trust (SP 800-207) Applies zero-trust logic to local execution boundaries and trust decisions.

Treat workspace execution as a secret-exposure control and verify no credentials run with untrusted code.