feat: add suppport for bypassing the blocking behavior of malicious packages (#53)

* feat: add suppport for bypassing the blocking behavior of malicious packages

* feat: add InsecureInstallation config to bypass malware scanning with tests

* ui: introduce ShowWarning interaction method

* guard test fix
This commit is contained in:
Sahil Bansal
2025-07-02 19:09:27 +05:30
committed by GitHub
parent 0e17378d3e
commit ca752edf79
7 changed files with 275 additions and 1 deletions
+14
View File
@@ -67,6 +67,7 @@ pnpm add <package-name>
- [Dry Run](#dry-run)
- [Verbose Mode](#verbose-mode)
- [Debugging](#debugging)
- [Environment Variables](#environment-variables)
- [🤝 Contributing](#-contributing)
- [🚫 Limitations](#-limitations)
@@ -214,6 +215,19 @@ Store the debug logs in a file:
pmg --debug --log /tmp/debug.json npm install <package-name>
```
## Environment Variables
### PMG_INSECURE_INSTALLATION
Allows bypassing the blocking behavior when malicious packages are detected during installation.
> ⚠️ **Warning**: This is a security feature bypass. Use with extreme caution and only when you understand the risks.
```bash
export PMG_INSECURE_INSTALLATION=true
pmg npm install <package-name>
```
## 🤝 Contributing
Refer to [CONTRIBUTING.md](CONTRIBUTING.md)