How to Check Whether a VS Code Extension Is Safe Before Installing It

Learn how to evaluate a VS Code extension before installing it. Check the publisher, verify the source, review permissions, and use VS Code's built-in security features.

6 min read

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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 signalWhat it means
Verified badge (blue checkmark)Publisher has proven domain ownership to Microsoft. Strong trust signal.
Known organization nameMicrosoft, Red Hat, GitHub, Docker, AWS, Google, MongoDB, and similar. These publishers have reputations to protect.
Individual developer nameNot inherently unsafe, but requires more scrutiny. Check their GitHub profile and other extensions.
Generic or misleading nameA publisher named "MicrosoftTools" that is not actually Microsoft is a red flag.
New publisher with one extensionA 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 flagWhy it matters
No public repository or websiteYou 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 commandsThe extension can execute arbitrary programs on your machine
Requests network access for no clear reasonThe extension might be sending your code or data to an external server
Copied description or name from a popular extensionTyposquatting: a malicious extension with a name similar to a legitimate one
Reviews mentioning data collection or adsUsers reporting unexpected behavior after installation
Empty or very short READMEThe 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:

  1. Open the Extensions view and find the extension.

  2. Click the gear icon and review the Feature Contributions tab again.

  3. 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.

  1. Search the extension's source repository for security discussions or issues.

  2. 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

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.
RunePowered by Rune AI

Frequently Asked Questions

What does the trust dialog mean when I install an extension?

Since VS Code 1.97, when you install an extension from a third-party publisher, VS Code shows a trust confirmation dialog. It asks you to confirm that you trust the publisher. This is a security feature because extensions run with the same permissions as VS Code itself. Take the dialog seriously. If you do not recognize the publisher, cancel and research them first.

What is a verified publisher and does it guarantee safety?

A verified publisher has proven ownership of a domain to Microsoft. The verified badge (blue checkmark) means the publisher's identity is confirmed. It does not guarantee that every extension from that publisher is safe, but it is a strong signal that the publisher is a legitimate organization, not an anonymous account.

Can an extension be malicious even if it has high ratings and many installs?

Yes, though it is rare. A malicious actor could buy or take over a popular extension, or an extension could be compromised through a supply chain attack. Always check the date of the last update and review recent reviews for suspicious reports. An extension that was safe last year might not be safe today.

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.