Syntax
Description
Scan dependencies for known vulnerabilities using the OSV (Open Source Vulnerabilities) database. Maintains a local cache for fast lookups and supports npm, pip, Go modules, and other ecosystems.Subcommands
cve sync
Synchronize vulnerability data for project dependencies.Target directory containing manifest files (package.json, requirements.txt, go.mod, etc.)
Refresh cached entries even if they’re fresh (within update_interval_hours)
- Discovers package manifests and lockfiles
- Fetches vulnerability data from OSV
- Caches results locally for fast subsequent lookups
- Respects configured update interval (default: 24 hours)
cve scan
Scan project dependencies and report vulnerabilities.Target directory containing manifest files
Refresh cache before scanning (forces fresh data fetch)
cve explain
Get detailed vulnerability information for a specific package.package[@version]: Package name, optionally with version (e.g.,[email protected])
Package ecosystem:
npm, PyPI, Go, Maven, RubyGems, etc.Fetch fresh data instead of using cache
Configuration
CVE scanning must be enabled in your config:Exit Codes
- 0: Command completed successfully
- 1: Error occurred (e.g., CVE disabled, network error, parse error)
Examples
Initial setup and sync
Scan for vulnerabilities
Explain specific package
Explain by name (all cached versions)
Force refresh cache
Check specific Python package
Integration in CI
Regular maintenance
Supported Ecosystems
- npm (package.json, package-lock.json)
- PyPI (requirements.txt, Pipfile.lock)
- Go (go.mod, go.sum)
- Maven (pom.xml)
- RubyGems (Gemfile.lock)
- Cargo (Cargo.lock)
Cache Location
By default:~/.vectra-guard/cve/cache.json
Configure via:
Related Commands
- audit - Multi-tool security audit (includes CVE scanning)
- scan-security - Static code analysis