Safeguard
Developer Tools•

Does VS Code ask you to trust a publisher before installing?

Since VS Code 1.97, installing from a third-party publisher shows a trust dialog. Command line installs do not get automatic publisher trust. What to know.

Safeguard Security Team
4 min read

Yes, for extensions from third-party publishers. VS Code's documentation says that starting with version 1.97, installing such an extension shows a dialog asking you to confirm you trust the publisher. Extensions installed from the command line do not get automatic publisher trust, so scripts need a plan.

What the prompt is

Publisher trust is a gate on first install from a given publisher. The prompt tells a developer that code from this publisher will run inside the editor's extension host, with the same permissions as VS Code itself. VS Code's runtime security page states plainly that the extension host has the same permissions as VS Code.

In practice that means an extension can read and write files, make network requests and run external processes. The prompt is a human checkpoint, not a technical sandbox.

What the Marketplace does before you see it

The same documentation says the Marketplace signs extensions when published and VS Code checks the signature at install time, which confirms integrity and origin. It also says each published package is scanned for malware using several antivirus engines, and that an extension is not public until the scan is clear.

Those are useful controls. They are not a promise about future behavior, and they do not limit what an extension can do once running.

The command line detail

The documentation says extensions installed from the command line do not get automatic publisher trust. Why this matters:

  • Setup scripts that run the install command for a list of extensions skip the human checkpoint.
  • A bad entry in a shared script spreads quickly to every new laptop.
  • Review of the list becomes the control, since the prompt will not do it.

What to do

  1. Treat the script as the approval. Put it in a repository with review rules, and name an owner.
  2. Pair it with an allowlist. The AllowedExtensions policy limits what can be installed regardless of how. See our allowlist guide.
  3. Pin where practical. Version pins in the policy keep updates from surprising you.
  4. Keep a record. Note who approved each publisher and when.
  5. Check for the prompt on a test machine after upgrading VS Code, since behavior can change.

A short example of a safer setup script

Keep the list of extension IDs in a file in your repository and have the script read from it. Reviewers then see each addition as a diff, with a name attached. A change that adds a new publisher should need a second approver, because it is the equivalent of a new dependency. Log which machines ran the script and when, so you can answer the question of who has this extension if a publisher is later found to be a problem.

A decision table

Install routeHuman promptControl that remains
Marketplace, third party publisherYes, from 1.97The developer's judgment
Command lineNo automatic trustScript review and allowlist
VSIX fileSee the VSIX postSource checks, see below

For the VSIX case, read installing VS Code extensions from VSIX files. For a pre-install routine, see how to vet a VS Code extension.

Safeguard note

Safeguard provides an IDE extension for VS Code, JetBrains and Open VSX, and a free scan at gold.safeguard.sh/scan. It works alongside, not instead of, VS Code's own publisher trust.

Quick check

Which version added the publisher trust dialog?

VS Code's documentation says starting with version 1.97.

Is the prompt a sandbox?

No. The extension host has the same permissions as VS Code itself, so the prompt is only a checkpoint.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.