Get started with SafeDep PMG - Package Manager Guard that protects against malicious open source packages
View the PMG source code and contribute on GitHub
Package Manager Guard (PMG) protects developers from getting compromised by malicious packages by wrapping your favorite package manager and blocking malicious packages at install time.
PMG requires no configuration - just install and use it as you normally would with your package managers.
PMG is a security wrapper for package managers that:
Download the latest release from our GitHub releases page and add it to your PATH.
The easiest way to get started is with pmg’s automated setup:
This command will:
~/.pmg.rc
file containing package manager aliasesAfter running pmg setup install
, restart your terminal or run source ~/.zshrc
(or your shell’s config file) to activate the aliases.
You can also run pmg manually without aliases:
If pmg detects a malicious package, it will block the installation and show you a warning.
PMG currently supports the following package managers:
Package Manager | Status | Command Example |
---|---|---|
npm | Active | npm install <package> |
pnpm | Active | pnpm add <package> |
pip | Active | pip install <package> |
yarn | Planned | Coming soon |
poetry | Planned | Coming soon |
uv | Planned | Coming soon |
which npm
should point to pmgpmg version
--verbose
to see detection detailsRun pmg --help
to see all available commands and options. PMG is designed to be transparent - you should barely notice it’s there until it protects you from a malicious package!