Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Chaintrap Agent Shield — AI-Coding SecurityNew to Visual Studio Code? Get it now.
Chaintrap Agent Shield — AI-Coding Security

Chaintrap Agent Shield — AI-Coding Security

Debarshi Ghosh

|
1 install
| (1) | Free
AI-coding supply-chain security: scan npm/PyPI/Maven/Go/crates and other OSV ecosystems plus MCP pins, flag malware and CVEs, then Fix issues on manifests (not hashed lockfiles).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
Chaintrap Agent Shield

Chaintrap Agent Shield

Marketplace  ·  GitHub  ·  Privacy

AI-coding supply-chain security for Cursor / VS Code. Chaintrap inventories registry pins (npm, PyPI, Maven, Go, crates, and other OSV ecosystems) in the open workspace and in MCP configs, classifies each as malicious packages or vulnerable packages (CVE/GHSA), and surfaces a posture rollup so you can review what the agent pulled in.

Fix issues

The Fix issues control is the tools icon on Workspace posture, Dependencies, and MCP servers. One click plans the workspace; you confirm before any file is written.

Fix issues tools button on the Chaintrap view title

The confirm dialog groups every action and says why:

  • Delete known-bad or OSV malware pins (and that MCP server) from the manifest.
  • Pin / upgrade unpinned or range specs, and vulnerable exact pins, to the highest OSV-clean version that fits (same major first; later major only if every same-major release is still dirty).
  • Skip what cannot be edited safely: URL/docker MCP, git/file specs, hashed lockfile with no sibling manifest, Swift/Hex/Gradle DSLs, or no clean published version.

Edits manifests (package.json, requirements.txt, pom.xml, go.mod, Cargo.toml, Gemfile, composer.json, pubspec.yaml, mcp.json, and similar). It does not rewrite hashed lockfiles and does not run npm, npx, pip, cargo, go, or mvn. After a write, posture counts refresh from disk and Checked this workspace records when Fix issues last ran and when malware/CVE last hit zero.

Fix issues confirm dialog: delete malware, pin or upgrade vulnerable and unpinned packages, skip the rest Chaintrap activity bar: Dependencies and MCP servers grouped as malicious, vulnerable, or unpinned

Why this exists

  • Agents edit lockfiles and MCP configs. That’s where malicious packages and vulnerable versions land.
  • MCP servers often run via npx / pip. Those pins are dependencies too — just not in your package.json.
  • You need visibility in the editor. Review baseline vs “delta since this session opened” before you trust outputs.

Coverage

  • Dependencies: workspace manifests and lockfiles across OSV ecosystems (npm including bun.lock, PyPI including pyproject.toml, Maven pom.xml / Gradle lockfiles, Go, Cargo, RubyGems, NuGet, Packagist, GitHub Actions, Pub, Hex, Swift, Hackage, CRAN, Conan). With a lockfile, locked transitives are included. Manifest-only trees get a coverage gap (direct pins only). Unparseable project files (e.g. Gradle DSL without gradle.lockfile) are listed as present-not-scanned, not skipped silently.
  • MCP servers (MCP security): the package inferred from each server entry in workspace .vscode/mcp.json or .cursor/mcp.json (for example npx, uvx, pipx, go run, cargo install), plus user-level MCP configs. URL, docker, and java -jar servers stay unchecked with a reason.
  • Unpinned MCP servers: config has a package name and no version, so the pin cannot be checked.

Findings are malicious packages or vulnerable packages (CVE or GHSA). High and critical findings require an acknowledgement in the editor.

In-editor acknowledgment modal for a critical malicious package Confirm removal of one MCP server from mcp.json Confirm removal of a malicious PyPI pin from the manifest

Malicious MCP servers are removed from that config by server id. Malicious npm and PyPI pins are removed from package.json or requirements.txt.

Operation

  1. Install pri17m.chaintrap-agent-shield.
  2. Open a workspace folder. Status bar: Chaintrap: scanning workspace…
  3. Open the Chaintrap activity bar: Workspace posture first (attention, coverage gaps, what was checked), then Dependencies or MCP servers.
  4. Click Fix issues (tools icon) to delete malware pins and write exact OSV-clean versions. Confirm the dialog first.
  5. Before trusting an AI agent’s output, run Chaintrap: Review agent changes since last session.

No API key is required for the workspace scan. The extension reads dependency and MCP files in open folders, does not execute workspace code, and does not upload source. It queries OSV with package name + version only. See PRIVACY.md.

Commands

Command Action
Chaintrap: Rescan workspace baseline Run the workspace inventory again
Fix issues Tools icon on posture / Dependencies / MCP: delete malware, pin or upgrade the rest. Manifests only
Chaintrap: Show workspace posture Focus the Workspace posture tree (also bound to the status bar)
Chaintrap: Review agent changes since last session List findings that appeared after this window opened
Chaintrap: Acknowledge high/critical finding Record that a serious finding was reviewed
Chaintrap: Uninstall malicious package Remove a malware pin or that MCP server from the config
Chaintrap: Open finding location Open the file that pinned the package

MIT. github.com/pri17m/chaintrap-agent-shield

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft