In CI, PMG is non-interactive: flagged packages are always blocked, never prompted. For local development use the wrapped commands (
pmg npm install) covered in the PMG quickstart.Use the SafeDep PMG action
Run thesafedep/pmg action in server-mode, then add a final pmg proxy stop step to enforce the result.
pmg proxy stop --fail-on-violation step is what fails the job on a block and flushes the final events to the cloud. Without it the proxy keeps running and events still sync in the background, but the job won’t fail on a violation and the most recent events may be missed. The if: always() ensures it runs even when an earlier step fails.
PMG blocks malicious packages using SafeDep’s free community intelligence with or without credentials. Add the optional api-key and tenant-id to connect the run to SafeDep Cloud, so block events sync to Endpoint Hub before the runner is destroyed.
Example workflow
A full workflow that installs dependencies through PMG on every pull request:install-dependencies.yml
Use raw commands
To wire the proxy up directly without the action:PMG
How PMG blocks malicious packages at install time.
Malicious Package
How SafeDep detects malicious packages.

