Skip to main content
PMG (Package Manager Guard) blocks malicious packages at install time. It wraps the package managers you already use, so every npm install or pip install is checked against SafeDep’s malware intelligence before any code runs. It is free, open source, and needs no account or API key. PMG runs on macOS, Linux, and Windows. Native Windows interception uses .cmd PATH shims in PowerShell and cmd.exe. Windows has no sandbox or background proxy daemon. See the Windows setup guidance.

What PMG does

  • Blocks before code runs: catches malicious packages at install time, not after they are already in your environment.
  • No workflow change: wraps your existing package managers. You and your AI coding agents run the same commands.
  • Deep dependency analysis: resolves and checks the full transitive dependency tree, not just the package you asked for.
  • No account needed: uses SafeDep’s free community API. Apache 2.0 licensed, no signup or API key.

How it works

PMG intercepts each install command, resolves the dependency tree, and checks every package against SafeDep’s malicious package intelligence before allowing the install to proceed. Known malicious packages are blocked outright. A dependency cooldown, on by default, also skips package versions published inside a recent time window, when a freshly compromised release is most likely to slip through. It supports npm, pnpm, yarn, bun, aube, npx, pnpx, aubx, aubr, pip, pipx, poetry, uv, and uvx. Support for go and cargo is experimental. For dependency-resolution internals and CLI flags, see the PMG repository. On macOS and Linux, PMG can also run each install in a sandbox that blocks credential reads, and apply a network policy that limits the hosts an install can reach. On a CI runner or a shared Linux host, PMG can also run as one persistent proxy that every package manager uses. With kernel enforcement, the Linux kernel routes every process through that proxy, and a process cannot opt out. The containers that the host starts can be routed too.
Connect PMG to SafeDep Cloud and the installs it checks sync to Endpoint Hub as Package Guard events, a timeline of package activity across your team’s endpoints. Local blocking works the same with or without an account.

Get started

PMG Quickstart

Install PMG and protect your package managers in minutes.

Stop Install Scripts from Reading Your Secrets

Run package installs in the PMG sandbox.

Limit the Hosts a Package Install Can Reach

Allow an install to reach only the hosts it needs.

Hold Back Newly Published Package Versions

Set the dependency cooldown window and exempt packages.

Use PMG with a Private Registry or Mirror

Check packages from an internal registry.

PMG in GitHub Actions

Block malicious packages in CI and limit the hosts a job can reach.

Sandbox Your AI Coding Agent

Run Claude Code, Codex, or Pi in the PMG sandbox.

Deploy on Kubernetes

Protect package installs in Kubernetes workloads and group events by workload.

Kernel Enforcement on Linux

Make the kernel route every process and container on a Linux host through PMG.

Deploy with MDM

Install PMG on macOS, Linux, and Windows fleets through your MDM.

Malicious Package

How SafeDep detects malicious packages across registries.

PMG on GitHub

Source, full documentation, and CI usage.

Alert on PMG blocks

Stream malicious and cooldown blocks from SafeDep Cloud to Slack or any webhook.