安装

Windows

1
scoop install osv-scanner

MacOS

1
brew install osv-scanner

扫描

扫描目录

1
osv-scanner -r /path/to/your/dir

扫描Lockfile

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# node
osv-scanner --lockfile=/path/to/your/package-lock.json

# rust
osv-scanner --lockfile=/path/to/your/Cargo.lock

# python
osv-scanner --lockfile 'requirements.txt:/path/to/your/extra-requirements.txt'

# java
osv-scanner --lockfile=/path/to/your/pom.xml

# golang
osv-scanner -L /path/to/your/go.mod

# 保存扫描结果
osv-scanner -L package-lock.json --output scan-results.txt