Integrated development environments (IDEs)
Authored by:
🔑 Key Takeaway: Treat the IDE as an execution environment. Keep external projects in Restricted Mode, inspect workspace configuration before trust, verify extensions independently, and isolate the editor from production access.
Integrated development environments (IDEs) combine an editor, terminal, debugger, task runner, language servers, extensions, source-control clients, and remote-development bridges. This convenience also gives repository-controlled configuration several ways to select programs, start tasks, retrieve content, or influence tools that already have the developer's privileges.
An IDE does not execute every file it opens. The risk depends on a trust decision, enabled feature, extension behavior, vulnerability, or explicit action. Identify that condition before describing a project as safe or dangerous.
Why workspace trust matters
Visual Studio Code uses Workspace Trust to separate trusted projects from Restricted Mode. Restricted Mode limits or disables tasks, debugging, workspace settings, and extensions that could execute code. Similar editors may use different names and enforcement, so teams should document the equivalent controls for each approved IDE.
Workspace Trust is a security boundary, not a nuisance prompt. Grant it only after the repository and its workspace configuration have been reviewed in an isolated environment. A familiar sender, legitimate project name, or clean top-level source file does not establish trust in nested configuration or later updates.
Workspace-controlled execution
Inspect every workspace file that can select an executable, command, environment, remote resource, or extension:
| Surface | Risk | Review |
|---|---|---|
.vscode/tasks.json | A task may run a shell command, including after folder open when automatic tasks are allowed | Commands, arguments, dependencies, problem matchers, and runOptions.runOn |
.vscode/settings.json | Workspace settings may redirect interpreters, formatters, linters, test runners, or other tools | Every executable path, environment variable, extension-specific setting, and remote URL |
.vscode/launch.json | Debug configuration may run a program, task, adapter, or pre-launch command | Program paths, task references, adapters, arguments, and environment files |
.vscode/extensions.json | Recommendations can pressure developers to install unnecessary or lookalike extensions | Publisher, extension identifier, ownership, source, permissions, and current advisories |
.idea/ and editor-specific files | Other IDEs expose equivalent project settings, tasks, plugins, and run configurations | Project-controlled executables, hooks, remote content, and plugin requests |
.devcontainer/ | Container settings may request mounts, capabilities, forwarded credentials, or host integration | Image source, features, lifecycle commands, mounts, sockets, privileges, and forwarded agents |
Visual Studio Code tasks configured with runOptions.runOn: folderOpen can run when a folder opens after the workspace
is trusted and automatic tasks are permitted. Restricted Mode blocks task execution. Keep automatic tasks managed, and
review the exact task rather than relying on a harmless-looking label or filename.
Extensions and preview surfaces
Extensions execute with broad access to the editor context and may start processes, read the workspace, and make network requests according to the platform and extension design. Verify an extension through independent channels:
- Confirm the exact publisher and extension identifier; display names and icons are not identities
- Match the marketplace listing to the expected source repository and release process
- Review recent ownership changes, releases, security advisories, and requested capabilities
- Prefer organization-approved extensions and remove extensions that no longer have a business need
- Keep the IDE and approved extensions patched
Do not install a VSIX package supplied inside an untrusted repository or by the contact who sent it. Sideloading bypasses marketplace distribution and runs the package provided by the sender. A workspace recommendation is also not approval to install an extension.
Previews, language servers, schema resolvers, and extensions may retrieve remote content when a file opens or renders, depending on configuration. Treat unexpected remote references as possible beacons or untrusted parser input. Restrict remote content and outbound network access in the external-code environment.
Opening untrusted projects
- Open the initial copy in a disposable, credential-free environment that cannot reach production
- Inspect
.vscode/,.idea/,.devcontainer/, editor rules, and agent configuration with a plain text viewer - Keep Workspace Trust in Restricted Mode until tasks, settings, extensions, and tool paths are reviewed
- Decline automatic tasks, repository-local VSIX packages, and unexpected extension recommendations
- Disable forwarded SSH/GPG agents, credential helpers, cloud credentials, wallets, and password-manager integration
- Restrict egress and review remote resources requested by previews, language servers, and extensions
- Re-check workspace configuration after every pull or branch change before preserving trust
- Export reviewed source changes only; discard editor state, installed extensions, build outputs, and caches
Static analysis inside the IDE can improve feedback during normal development, but it does not validate the IDE, extension, or repository configuration that hosts it. Keep the pipeline's independent security testing and review controls in place.
Further reading
- DevSecOps overview: how the pages of this framework fit together
- Developer-targeted intrusions: threat model and safe handling for external repositories
- Developer machine confinement: confining agent and IDE workloads on the laptop
- Repository hardening: controls for the code the IDE pushes
- Security testing: pipeline counterparts to IDE analysis
- Visual Studio Code Workspace Trust: Restricted Mode and trust-sensitive features
- Visual Studio Code tasks: task configuration and automatic tasks
- Visual Studio Code extension runtime security: extension signatures, publisher trust, and runtime controls