pkgscan.dev · Documentation

How to check a VS Code or Open VSX extension for malware

A VS Code extension is a zip file with JavaScript that runs inside your editor. It can read every file in your workspace, your environment variables, your shell history, and your clipboard, and it can start processes. That makes extensions a direct path from a registry to a developer machine. pkgscan scans the VSIX and shows what each engine found.

Updated 2026-11-05

What a VSIX can do

The extension manifest declares main and one or more activationEvents. Once activated, the extension runs as Node.js code in the editor process, with the permissions of your user account. Common malicious patterns include:

Scan an extension with pkgscan

Extension reports are addressable by publisher and version: /pkg/vscode-extension/{publisher}/{name}@{version}. pkgscan covers both the VS Code Marketplace and Open VSX identities, including extensions that were later delisted. You can also upload a .vsix, or check a SHA-256 that someone shared with you.

# Report for an Open VSX or Marketplace extension
curl -s https://www.pkgscan.dev/api/pkg/vscode-extension/esbenp/[email protected]

# Start a scan from a PURL
curl -s -X POST https://www.pkgscan.dev/api/scan/from-purl \
  -H "Authorization: Bearer pkg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"publisher":"esbenp","name":"prettier-vscode","version":"12.4.0"}'

Engines that run on a VSIX

EngineWhat it contributes
ArgusYeeth Security's content-analysis engine. It runs on Open VSX publish traffic in production.
SkillSpectorStatic analysis for AI agent skill files, prompt injection, and tool poisoning when the archive contains them
GuardDogExtension rules over the VSIX as an npm-format archive: lifecycle scripts, obfuscation, exfiltration patterns
OSV, Grype, deps.devKnown advisories for the extension identity, where the registry data supports it

Read the report like a reviewer

The aggregate line tells you whether a malware engine flagged the artifact. Open the engine grid underneath it and read the finding, not just the colour. GuardDog reports capabilities as well as threats: an extension that reads files and makes network requests will produce capability hits even when the code is benign. That is why pkgscan publishes GuardDog on its own and does not turn a single heuristic into a malware verdict.

Check the VSIX locally

# A VSIX is a zip
unzip -l extension.vsix
unzip -p extension.vsix extension/package.json | python3 -m json.tool

# First-party entry points and risky APIs
unzip -p extension.vsix extension/package.json | grep -E 'main|activationEvents'
unzip -p extension.vsix 'extension/dist/*.js' \
  | grep -oE 'child_process|\.env|exec\(|https?://[^" ]+' | sort -u | head -40

Check whether you were exposed

If an extension is taken down after you installed it, the useful question is not only was it malicious but when was it live. pkgscan's advisory directory tracks publication and takedown windows for malicious and vulnerable extensions on Open VSX and the VS Code Marketplace, so you can compare the window against your install dates.

Related: npm package scanning, extension advisories and exposure windows.

Check a package or file now: scan it on pkgscan.dev.