Skip to content

Latest commit

Β 

History

History
205 lines (146 loc) Β· 6.58 KB

getting-started.md

File metadata and controls

205 lines (146 loc) Β· 6.58 KB

Getting Started with Vulfy

Welcome to Vulfy! This guide will help you install and run your first vulnerability scan in just a few minutes.

What is Vulfy?

Vulfy is a lightning-fast, cross-language vulnerability scanner that checks your project dependencies for known security issues. Built with Rust for maximum performance, it integrates with the OSV.dev database to provide accurate, up-to-date vulnerability information across 9 programming language ecosystems.

Installation

Option 1: Pre-built Binaries (Recommended)

Download the latest release for your platform:

# Linux x86_64
curl -LO https://github.com/mindPatch/vulfy/releases/latest/download/vulfy-linux-x86_64.tar.gz
tar -xzf vulfy-linux-x86_64.tar.gz
sudo mv vulfy /usr/local/bin/

# macOS (Intel)
curl -LO https://github.com/mindPatch/vulfy/releases/latest/download/vulfy-macos-x86_64.tar.gz
tar -xzf vulfy-macos-x86_64.tar.gz
sudo mv vulfy /usr/local/bin/

# macOS (Apple Silicon)
curl -LO https://github.com/mindPatch/vulfy/releases/latest/download/vulfy-macos-aarch64.tar.gz
tar -xzf vulfy-macos-aarch64.tar.gz
sudo mv vulfy /usr/local/bin/

# Windows
# Download vulfy-windows-x86_64.zip from releases page and extract to PATH

Option 2: Install with Cargo

If you have Rust installed:

cargo install vulfy

Option 3: Build from Source

git clone https://github.com/mindPatch/vulfy.git
cd vulfy
cargo build --release
sudo cp target/release/vulfy /usr/local/bin/

Verify Installation

vulfy --version
# Should output: vulfy 0.1.0

Your First Scan

Basic Scan

Navigate to any project directory and run:

vulfy scan packages

This will:

  • πŸ” Recursively scan for package files
  • πŸ“¦ Detect dependencies across all supported ecosystems
  • πŸ›‘οΈ Check for vulnerabilities using OSV.dev
  • πŸ“Š Display results in a beautiful table format

Example Output

πŸ” Scanning for package files...
πŸ“¦ Found 6 package files across 4 ecosystems

πŸ›‘οΈ  VULNERABILITY REPORT
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚ Title                                   β”‚ CVE ID       β”‚ Severity β”‚ Package         β”‚ Year β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€
β”‚ Remote Code Execution in lodash        β”‚ CVE-2021-123 β”‚ πŸ”₯ High  β”‚ lodash@4.17.0   β”‚ 2021 β”‚
β”‚ Path Traversal in express              β”‚ CVE-2022-456 β”‚ 🟑 Mediumβ”‚ express@4.16.0  β”‚ 2022 β”‚
β”‚ SQL Injection in sequelize             β”‚ CVE-2020-789 β”‚ πŸ”₯ High  β”‚ sequelize@5.0.0 β”‚ 2020 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š SCAN SUMMARY
β€’ Total packages scanned: 42
β€’ Vulnerable packages: 8
β€’ Total vulnerabilities: 12
β€’ πŸ”₯ High severity: 4
β€’ 🟑 Medium severity: 6
β€’ 🟒 Low severity: 2

Supported Ecosystems

Vulfy automatically detects and scans the following package managers:

Ecosystem Package Files Status
npm package-lock.json, yarn.lock, pnpm-lock.yaml, package.json βœ…
Python requirements.txt, Pipfile.lock, poetry.lock, pyproject.toml βœ…
Rust Cargo.lock, Cargo.toml βœ…
Java pom.xml, build.gradle, build.gradle.kts βœ…
Go go.mod, go.sum, go.work βœ…
Ruby Gemfile.lock, Gemfile, *.gemspec βœ…
C/C++ vcpkg.json, CMakeLists.txt, conanfile.txt βœ…
PHP composer.json, composer.lock βœ…
.NET *.csproj, packages.config, *.nuspec βœ…

Common Use Cases

Scan Specific Directory

vulfy scan packages --path /path/to/project

Save Results to File

# JSON format for programmatic use
vulfy scan packages --format json --output security-report.json

# CSV format for spreadsheet analysis
vulfy scan packages --format csv --output vulnerabilities.csv

# SARIF format for GitHub Security tab
vulfy scan packages --format sarif --output vulfy.sarif

Filter by Severity

# Only show high-severity vulnerabilities
vulfy scan packages --high-only

# Quiet mode (suppress progress info)
vulfy scan packages --quiet

Target Specific Ecosystems

# Only scan npm and Python packages
vulfy scan packages --ecosystems npm,pypi

# Scan only Rust projects
vulfy scan packages --ecosystems crates.io

Skip Development Dependencies

vulfy scan packages --no-dev-deps

Exit Codes

Vulfy uses standard exit codes for CI/CD integration:

  • 0: Scan completed successfully, no vulnerabilities found
  • 1: Vulnerabilities found or scan error occurred
  • 2: Invalid command line arguments

Next Steps

Now that you've run your first scan, you might want to:

  1. Configure Output Formats - Learn about JSON, CSV, and SARIF formats
  2. Set Up Automation - Monitor repositories continuously
  3. Integrate with CI/CD - Add Vulfy to your pipelines
  4. Customize with Policies - Create advanced filtering rules

Troubleshooting

Common Issues

"No package files found"

  • Ensure you're in a project directory with supported package files
  • Use --path to specify the correct directory
  • Check that package files aren't in ignored directories

"Network connection failed"

  • Vulfy requires internet access to query OSV.dev
  • Check your firewall and proxy settings
  • The OSV.dev API may be temporarily unavailable

"Permission denied"

  • Make sure the vulfy binary is executable: chmod +x vulfy
  • On macOS, you may need to allow the binary in Security & Privacy settings

Getting Help


Next: CLI Reference - Complete command documentation