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)