{"id":37593250,"url":"https://github.com/safedep/pmg","last_synced_at":"2026-03-04T10:00:41.390Z","repository":{"id":293453752,"uuid":"951643407","full_name":"safedep/pmg","owner":"safedep","description":"PMG protects developers from getting hacked by malicious open source packages. Stop the next Shai-Hulud or S1ngularity before it happens.","archived":false,"fork":false,"pushed_at":"2026-02-16T16:03:28.000Z","size":15338,"stargazers_count":98,"open_issues_count":16,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-16T23:41:21.296Z","etag":null,"topics":["developer-tools","devsecops","hacktoberfest","malicious-code","npm","open-source","pnpm","supply-chain-security"],"latest_commit_sha":null,"homepage":"https://safedep.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/safedep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.txt","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-20T02:29:47.000Z","updated_at":"2026-02-16T16:03:31.000Z","dependencies_parsed_at":"2025-06-24T08:23:12.603Z","dependency_job_id":"e742d323-1dc4-4110-9094-bfce6127802d","html_url":"https://github.com/safedep/pmg","commit_stats":null,"previous_names":["safedep/pmg"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/safedep/pmg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safedep%2Fpmg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safedep%2Fpmg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safedep%2Fpmg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safedep%2Fpmg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/safedep","download_url":"https://codeload.github.com/safedep/pmg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safedep%2Fpmg/sbom","scorecard":{"id":656561,"data":{"date":"2025-08-17T22:39:46Z","repo":{"name":"github.com/safedep/pmg","commit":"cd306884e3c6a7f34d9b32d21c309103d0314669"},"scorecard":{"version":"v5.1.1","commit":"cd152cb6742c5b8f2f3d2b5193b41d9c50905198"},"score":6.6,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"19 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:29","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:30","Info: jobLevel 'contents' permission set to 'read': .github/workflows/container.yml:24","Info: jobLevel 'contents' permission set to 'read': .github/workflows/publish-npm.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:21","Info: topLevel 'contents' permission set to 'read': .github/workflows/container.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/goreleaser.yml:11","Warn: no topLevel permission defined: .github/workflows/publish-npm.yml:1","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18","Info: topLevel 'contents' permission set to 'read': .github/workflows/secret_scan.yml:8","Warn: topLevel 'security-events' permission set to 'write': .github/workflows/vet-ci.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/vet-ci.yml:10","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":9,"reason":"dependency not pinned by hash detected -- score normalized to 9","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-npm.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/safedep/pmg/publish-npm.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-npm.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/safedep/pmg/publish-npm.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-npm.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/safedep/pmg/publish-npm.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/publish-npm.yml:96","Info:  20 out of  23 GitHub-owned GitHubAction dependencies pinned","Info:  12 out of  12 third-party GitHubAction dependencies pinned","Info:   2 out of   2 containerImage dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#license"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#cii-best-practices"}},{"name":"Dependency-Update-Tool","score":0,"reason":"no update tool detected","details":["Warn: no dependency update tool configurations found"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dependency-update-tool"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3787 / GHSA-fv92-fjc5-jj9h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":9,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 27 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#sast"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:70"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#packaging"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.0.9 not signed: https://api.github.com/repos/safedep/pmg/releases/238253596","Warn: release artifact v0.0.8 not signed: https://api.github.com/repos/safedep/pmg/releases/235976348","Warn: release artifact v0.0.7 not signed: https://api.github.com/repos/safedep/pmg/releases/230079208","Warn: release artifact v0.0.6 not signed: https://api.github.com/repos/safedep/pmg/releases/229953800","Warn: release artifact v0.0.5 not signed: https://api.github.com/repos/safedep/pmg/releases/227338315","Warn: release artifact v0.0.9 does not have provenance: https://api.github.com/repos/safedep/pmg/releases/238253596","Warn: release artifact v0.0.8 does not have provenance: https://api.github.com/repos/safedep/pmg/releases/235976348","Warn: release artifact v0.0.7 does not have provenance: https://api.github.com/repos/safedep/pmg/releases/230079208","Warn: release artifact v0.0.6 does not have provenance: https://api.github.com/repos/safedep/pmg/releases/229953800","Warn: release artifact v0.0.5 does not have provenance: https://api.github.com/repos/safedep/pmg/releases/227338315"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":6,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Info: 'stale review dismissal' is required to merge on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Warn: codeowners review is not required on branch 'main'","Info: 'last push approval' is required to merge on branch 'main'","Warn: no status checks found to merge onto branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/safedep/.github/SECURITY.md:1","Info: Found linked content: github.com/safedep/.github/SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: github.com/safedep/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#security-policy"}},{"name":"Contributors","score":10,"reason":"project has 4 contributing companies or organizations","details":["Info: found contributions from: 3SLabs, boringtools, null-open-security-community, safedep"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#contributors"}},{"name":"CI-Tests","score":10,"reason":"30 out of 30 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-08-21T14:48:47.146Z","repository_id":293453752,"created_at":"2025-08-21T14:48:47.146Z","updated_at":"2025-08-21T14:48:47.146Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30076933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","devsecops","hacktoberfest","malicious-code","npm","open-source","pnpm","supply-chain-security"],"created_at":"2026-01-16T09:53:31.713Z","updated_at":"2026-03-04T10:00:41.385Z","avatar_url":"https://github.com/safedep.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./docs/assets/pmg-banner.png\" alt=\"PMG GitHub Banner\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003ePackage Manager Guard (PMG)\u003c/h1\u003e\n    \u003ch3\u003ePrevent supply chain attacks before they happen.\u003c/h3\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Docs](https://img.shields.io/badge/Docs-docs.safedep.io-2b9246?style=flat-square)](https://docs.safedep.io/pmg/quickstart)\n[![Website](https://img.shields.io/badge/Website-safedep.io-3b82f6?style=flat-square)](https://safedep.io)\n[![Discord](https://img.shields.io/discord/1090352019379851304?style=flat-square)](https://discord.gg/kAGEj25dCn)\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/safedep/pmg)](https://goreportcard.com/report/github.com/safedep/pmg)\n![License](https://img.shields.io/github/license/safedep/pmg)\n![Release](https://img.shields.io/github/v/release/safedep/pmg)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/safedep/pmg/badge)](https://api.securityscorecards.dev/projects/github.com/safedep/pmg)\n[![CodeQL](https://github.com/safedep/pmg/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/safedep/pmg/actions/workflows/codeql.yml)\n\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./docs/demo/pmg-intro.gif\" width=\"800\" alt=\"pmg in action\"\u003e\n\u003c/div\u003e\n\n## Why PMG?\n\nModern software development relies heavily on open-source packages. However, standard package managers (`npm`, `pip`, etc.) prioritize convenience over security, executing arbitrary code (like `postinstall` scripts) on your machine without validation. This vector is frequently exploited by attackers to steal credentials or inject backdoors.\n\n**PMG acts as a security middleware layer.** It wraps your package manager to:\n\n1. **Analyze** packages for malware before they are installed.\n2. **Sandbox** the installation process to prevent system modification.\n3. **Audit** every package installation event.\n\n## Quick Start\n\nGet protected in seconds.\n\n### 1. Install\n\n**MacOS / Linux (Homebrew)**\n\n```bash\nbrew install safedep/tap/pmg\n```\n\n**NPM**\n\n```bash\nnpm install -g @safedep/pmg\n```\n\n\u003e See [Installation](#installation) for additional methods.\n\n### 2. Setup\n\nConfigure your shell to use PMG automatically.\n\n```bash\npmg setup install\n# Restart your terminal to apply changes\n```\n\n### 3. Use\n\nContinue using your favorite package manager tools as usual. PMG works silently in the background.\n\n```bash\nnpm install express\n# or\npip install requests\n```\n\nIf a malicious package is detected, PMG blocks it immediately:\n\n```text\n[PMG] Blocked malicious package: malicious-lib@1.0.0\n[PMG] Reason: Known malware signature detected\n```\n\n## Features\n\n| Feature                          | Description                                                                                                      |\n| -------------------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| **Malicious Package Protection** | Real-time protection against malicious packages using [SafeDep](https://docs.safedep.io/cloud/malware-analysis). |\n| **Sandboxing**                   | Enforces least privilege using OS native sandboxing to contain installation scripts.                             |\n| **Dependency Analysis**          | Deep scans of direct and transitive dependencies before they hit your disk.                                      |\n| **Event Logging**                | Keeps a verifiable audit trail of all installed packages.                                                        |\n| **Zero Config**                  | Works out of the box with sensible security defaults.                                                            |\n| **Cross-Shell**                  | Seamlessly integrates with Zsh, Bash, Fish, and more.                                                            |\n\n## Supported Package Managers\n\nPMG supports the tools you already use:\n\n| Ecosystem   | Tools    | Status | Command Example     |\n| ----------- | -------- | ------ | ------------------- |\n| **Node.js** | `npm`    | Yes    | `npm install \u003cpkg\u003e` |\n|             | `pnpm`   | Yes    | `pnpm add \u003cpkg\u003e`    |\n|             | `yarn`   | Yes    | `yarn add \u003cpkg\u003e`    |\n|             | `bun`    | Yes    | `bun add \u003cpkg\u003e`     |\n|             | `npx`    | Yes    | `npx \u003cpkg\u003e`         |\n|             | `pnpx`   | Yes    | `pnpx \u003cpkg\u003e`        |\n| **Python**  | `pip`    | Yes    | `pip install \u003cpkg\u003e` |\n|             | `poetry` | Yes    | `poetry add \u003cpkg\u003e`  |\n|             | `uv`     | Yes    | `uv add \u003cpkg\u003e`      |\n\n## Installation\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHomebrew (MacOS/Linux)\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nbrew tap safedep/tap\nbrew install safedep/tap/pmg\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eNPM (Cross-Platform)\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nnpm install -g @safedep/pmg\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eGo (Build from Source)\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Ensure $(go env GOPATH)/bin is in your $PATH\ngo install github.com/safedep/pmg@latest\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBinary Download\u003c/strong\u003e\u003c/summary\u003e\n\nDownload the latest binary for your platform from the [Releases Page](https://github.com/safedep/pmg/releases).\n\u003c/details\u003e\n\n## Trust and Security\n\nSecurity is our first class requirement. PMG builds are reproducible and signed.\n\n* **Attestations**: GitHub and npm attestations are used to guarantee artifact integrity.\n* **Verification**: Users can cryptographically prove the binary matches the source code.\n* See [Trusting PMG](docs/trust.md) for verification steps.\n\n## Usage Guide\n\nPMG runs transparently, but you can control it when needed.\n\n### Paranoid Mode\n\nTreat all unverified or suspicious packages as malicious.\n\n```bash\npmg --paranoid npm install \u003cpackage\u003e\n```\n\n### Dry Run\n\nSimulate installation to check for malware without writing to disk.\n\n```bash\npmg --dry-run npm install \u003cpackage\u003e\n```\n\n### Debugging\n\nEnable verbose logs for troubleshooting.\n\n```bash\npmg --debug npm install \u003cpackage\u003e\n```\n\n### Emergency Bypass\n\u003e ⚠️ **Warning**: Bypassing security checks exposes users to risk.\n\n```bash\nexport PMG_INSECURE_INSTALLATION=true\nnpm install \u003cpackage\u003e\n```\n\n## Advanced Documentation\n\n* [Trusted Packages Configuration](docs/trusted-packages.md)\n* [Proxy Mode Architecture](docs/proxy-mode.md)\n* [Sandboxing Details](docs/sandbox.md)\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to build and test PMG locally.\n\n## Telemetry\n\nPMG collects anonymous usage data to improve project stability and reliability.\nTo disable: `export PMG_DISABLE_TELEMETRY=true`.\n","funding_links":[],"categories":["Dependency intelligence"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafedep%2Fpmg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafedep%2Fpmg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafedep%2Fpmg/lists"}