VS Code extensions run with the same permissions as VS Code itself. A malicious extension can read your files, execute commands, exfiltrate data, or install malware. Before you click Install, spend two minutes checking the signals that indicate whether an extension is trustworthy. If you are new to extensions entirely, start with the guide on how to install, disable, and update extensions.
VS Code has three built-in security layers: the publisher trust dialog, extension signature verification, and Workspace Trust. But the most important layer is your own judgment before installing anything.
Quick safety checklist
Run through these six checks before installing any extension:
-
Who is the publisher? Look at the publisher name on the extension details page. Is it a company you recognize (Microsoft, Red Hat, GitHub, Docker) or an unknown account? A verified publisher badge confirms the publisher's identity.
-
Is there a public repository? Legitimate extensions usually link to a public GitHub repository. Open it and check the number of contributors, recent commits, and open issues.
-
How many installs and what rating? High install counts and a 4+ star rating are positive signals. But a malicious extension can accumulate downloads quickly before being detected.
-
When was it last updated? An extension untouched for 3+ years may have unresolved vulnerabilities. It may also not support current VS Code security features like Workspace Trust.
-
What does it contribute? Click the Feature Contributions tab. Be suspicious of extensions that request file system, terminal, or network access when their purpose does not require it.
-
What do recent reviews say? Scroll to reviews and filter by most recent. Look for reports of suspicious behavior or unexpected network requests.
Understanding the publisher
Every extension has a publisher identifier, shown as publisher.extension (for example, ms-python.python). The publisher is a permanent account on the Visual Studio Marketplace.
| Publisher signal | What it means |
|---|---|
| Verified badge (blue checkmark) | Publisher has proven domain ownership to Microsoft. Strong trust signal. |
| Known organization name | Microsoft, Red Hat, GitHub, Docker, AWS, Google, MongoDB, and similar. These publishers have reputations to protect. |
| Individual developer name | Not inherently unsafe, but requires more scrutiny. Check their GitHub profile and other extensions. |
| Generic or misleading name | A publisher named "MicrosoftTools" that is not actually Microsoft is a red flag. |
| New publisher with one extension | A publisher created days ago with zero installs and no repository. Proceed with extreme caution. |
To see all extensions by a publisher, click the publisher name on the details page. A legitimate publisher usually has multiple extensions and a consistent naming pattern.
What the trust dialog actually tells you
Since VS Code 1.97, when you first install an extension from a third-party publisher, a dialog appears with the message:
"Do you trust the publisher 'publisher-name'?"
This dialog is not a formality. It is VS Code asking you to consciously take responsibility for the code that extension will run. The extension will have access to:
- All files in any workspace you open
- The integrated terminal
- Network requests through VS Code's APIs
- Your settings and configuration
If you click Trust, VS Code remembers your choice for that publisher. Future extensions from the same publisher will not show the dialog again.
If you click Cancel, the extension is not installed.
You can manage your trusted publishers later by running Extensions: Manage Trusted Extensions Publishers in the Command Palette. Trusted publishers are also stored in your settings under extensions.trustedPublishers, but the command is the reliable way to review and remove them.
Extension signature verification
The Visual Studio Marketplace cryptographically signs every extension when it is published. When you install an extension, VS Code verifies this signature to confirm:
- The extension was not tampered with after it was published
- The extension came from the claimed publisher
If verification fails, VS Code shows the error: Cannot install extension because Visual Studio Code cannot verify the extension signature.
Do not disable signature verification by setting extensions.verifySignature to false unless you absolutely trust the source and understand the risk. Signature failures can mean the file was modified, corrupted during download, or published without proper signing.
How Workspace Trust protects you
Workspace Trust is a separate security layer that activates after extensions are installed. When you open a new, unfamiliar folder, VS Code opens it in Restricted Mode.
In Restricted Mode, extensions that have not declared Workspace Trust support are disabled. Extensions that partially support it run with limited functionality. AI agents, tasks, debugging, and the terminal are blocked until you trust the workspace.
You see a Restricted Mode badge in the Status Bar. The editor shows a banner at the top. Click the banner link to review which extensions are affected.
This means even if you installed a questionable extension, it will not run automatically when you open an untrusted project. You control when trust is granted.
You can trust a folder from the banner, the Status Bar badge, or by running Workspaces: Manage Workspace Trust in the Command Palette. For a deeper explanation of how Workspace Trust and Restricted Mode work, read the Workspace Trust guide.
Red flags to watch for
| Red flag | Why it matters |
|---|---|
| No public repository or website | You cannot verify the source code. The extension could do anything. |
| Vague description with buzzwords | "Supercharge your workflow with AI-powered magic" without explaining what it does |
| Requests to run external commands | The extension can execute arbitrary programs on your machine |
| Requests network access for no clear reason | The extension might be sending your code or data to an external server |
| Copied description or name from a popular extension | Typosquatting: a malicious extension with a name similar to a legitimate one |
| Reviews mentioning data collection or ads | Users reporting unexpected behavior after installation |
| Empty or very short README | The publisher did not take time to document what the extension does |
How to check an extension after installing it
If you have already installed an extension and want to audit it, start with these steps:
-
Open the Extensions view and find the extension.
-
Click the gear icon and review the Feature Contributions tab again.
-
Open the extension's installed folder. On macOS and Linux it is at ~/.vscode/extensions/. On Windows it is at %USERPROFILE%\.vscode\extensions\.
Look for the extension by its publisher and name. Review the package.json for suspicious scripts.
-
Search the extension's source repository for security discussions or issues.
-
Look for unexpected network activity. If the extension accesses the network for no clear reason, disable it and investigate.
If you suspect an extension is malicious, uninstall it immediately and report it to vsmarketplace@microsoft.com. Include the extension ID.
Rune AI
Key Insights
- Always check the publisher before installing. Look for a verified badge (blue checkmark), a known company name, and a link to an official website or repository.
- Review the extension details: number of installs, star rating, last update date, and recent reviews. An extension last updated years ago may have unresolved security issues.
- Check the Feature Contributions tab. Extensions that request unnecessary permissions (like running external commands or accessing files outside your project) deserve extra scrutiny.
- The trust dialog (VS Code 1.97+) and signature verification are built-in safety checks. Do not ignore them.
- Workspace Trust in Restricted Mode disables extensions that have not opted into running safely in untrusted workspaces. Use it when opening code from unfamiliar sources.
Frequently Asked Questions
What does the trust dialog mean when I install an extension?
What is a verified publisher and does it guarantee safety?
Can an extension be malicious even if it has high ratings and many installs?
Conclusion
A safe extension comes from a known publisher, has a public repository, shows recent updates, lists reasonable permissions, and has a history of positive reviews. Use VS Code's built-in security layers: the trust dialog, extension signature verification, and Workspace Trust. If you want to learn how to manage extensions after installing them, read the guide on installing, disabling, and updating extensions.
More in this topic
How to Use VS Code with WSL 2 on Windows
Run VS Code connected to Windows Subsystem for Linux so you can develop in a full Linux environment with native tools, terminals, and debugging, all from Windows.
20 Best VS Code Extensions for Web Developers in 2026
Twenty carefully chosen VS Code extensions every web developer should know. Covers formatting, linting, frameworks, debugging, Git, and developer experience.
How to Install, Disable, Update, and Uninstall VS Code Extensions
Learn how to install, disable, update, and uninstall VS Code extensions from the Marketplace and the command line. Step-by-step instructions for every action.