DEV Community

Cover image for Scanning Open Source Packages for Malicious Code 🚨
Abhisek Datta
Abhisek Datta

Posted on

Scanning Open Source Packages for Malicious Code 🚨

Malicious code in open sources is real and people get hacked due to it as we have seen with changed-files incident, ultralytics hack and multiple such incidents. vet now supports identification of malicious OSS packages through active code analysis.

πŸš€ Getting Started

brew tap safedep/tap
brew install safedep/tap/vet
Enter fullscreen mode Exit fullscreen mode

For other installation methods, refer to README.md

  • Onboard to SafeDep Cloud to use the code analysis infrastructure using vet
vet cloud quickstart
Enter fullscreen mode Exit fullscreen mode

🐞 Malicious Package Scanning

  • Scan a single package
vet inspect malware --purl pkg:/npm/llm-oracle@1.0.2
Enter fullscreen mode Exit fullscreen mode
  • Scan a repository with auto-discovered packages
vet scan -D /path/to/repo --malware
Enter fullscreen mode Exit fullscreen mode

πŸ” Supported Ecosystems

Ecosystem Support
Javascript (npm) βœ…
Python (pypi) βœ…
Java (Maven) ❌
Go (modules) βœ…
Rust (crates.io) ❌
Ruby (rubygems) βœ…

➑️ Raise an issue to request an ecosystem to be prioritised

πŸ‘Ύ Live Demo

πŸ“Š Resources

Top comments (0)