safedep/pmg

PMG protects developers, AI agents from malicious open source packages using proxy, sandbox and SafeDep's threat intelligence feed.

What it solves

Package managers like npm and pip execute thousands of lines of unreviewed code during installation, leaving developers and AI coding agents vulnerable to malicious packages, typosquatting, and hijacked legitimate libraries that can exfiltrate credentials or compromise systems.

How it works

PMG acts as a transparent firewall that wraps common package managers (including npm, pnpm, yarn, bun, pip, poetry, and uv). It intercepts installation commands and passes them through three layers of protection:

  1. Threat Intelligence: Checks packages against SafeDep's real-time community API to block known malware without requiring an account.
  2. Dependency Cooldown: Blocks package versions published within a configurable time window to avoid recently compromised releases.
  3. Opt-in Sandboxing: Runs installations inside OS-native sandboxes (such as macOS Seatbelt or Linux Landlock) to restrict system access if a threat bypasses the first two layers.

It also maintains local audit logs of every installation for verification.

Who it’s for

Developers and AI coding agents who want to prevent the installation of malicious dependencies without changing their existing workflows or requiring API keys.

Highlights

  • Transparent Interception: No workflow changes; users and agents continue using standard commands like npm install.
  • Zero Config: Works across Zsh, Bash, and Fish shells out of the box.
  • Free and Open Source: Apache 2.0 licensed and requires no account or API key.
  • CI/CD Integration: Provides a GitHub Action to analyze and enforce policies during CI workflows.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project