Skip to content

CLI commands

The vulnmgmt CLI (aliased vm) is a Click application. cli.py defines the top-level main group and a handful of commands directly, then attaches the command groups defined in the cli_*.py modules and the integration packages.

Every command supports --help. Run vulnmgmt <command> --help for the authoritative option list. For what happens under the hood, see the Processing pipeline.

Command groups at a glance

CommandSourcePurpose
process, research, analyze, versions, vendors, export, infocli.pyLegacy inventory processing, CVE research, reporting
integrationscli.pyRapid7 / Defender / SentinelOne setup, search, sync, reports
vulncli_vuln.pyModern scan/enrich/score pipeline
cpecli_vuln.pyCPE dictionary search & application mapping
intunecli_intune.pyIntune CSV → dedupe → NVD scan pipeline
enrichcli_enrich.pyCVE enrichment (NVD / EPSS / CISA KEV)
dbcli_db.pyPostgreSQL schema & migrations
synccli_sync.pyRapid7 → database sync
workercli_worker.pyBackground scheduler control
cw / connectwiseintegrations/connectwiseConnectWise Manage ticketing
epssintegrations/epssFIRST.org EPSS scores

Top-level commands (cli.py)

process

Process an application-inventory CSV and generate a vulnerability tracking Excel workbook (legacy pandas path).

OptionPurpose
INPUT_FILE (arg)Path to inventory CSV
-o, --outputOutput .xlsx (default vulnerability_report.xlsx)
--max-rowsMax rows to process (default 5000)
--no-vendor-summary, --no-high-prioritySkip those sheets
-q, --quietQuiet mode
Terminal window
vulnmgmt process AppInventory.csv -o vuln_report.xlsx

research

Research vulnerabilities across NVD, CVE.org, and CISA KEV.

OptionPurpose
--cveCVE ID (e.g. CVE-2024-1234)
--product, --vendorProduct / vendor search
-o, --outputSave results to JSON
Terminal window
vulnmgmt research --cve CVE-2024-1234
vulnmgmt research --product "Chrome" --vendor Google -o results.json

analyze

Risk-score and analyze an inventory CSV (legacy RiskAnalyzer / DeepAnalyzer).

OptionPurpose
INPUT_FILE (arg)Inventory CSV
--risk-scoringRun risk scoring
--deep-analysisRun deep analysis
--topShow top N risky apps (default 20)
-o, --outputSave analysis JSON
Terminal window
vulnmgmt analyze data.csv --risk-scoring --top 10

versions

Track software versions across the inventory and produce a version-spread Excel report.

Terminal window
vulnmgmt versions data.csv -o version_report.xlsx
vulnmgmt versions data.csv --app "Google Chrome"

vendors

View the built-in vendor security-bulletin database (VENDOR_SECURITY_URLS).

Terminal window
vulnmgmt vendors --list
vulnmgmt vendors --search Microsoft
vulnmgmt vendors --stats

export

Export processed applications to JSON or CSV with optional filters.

OptionPurpose
--formatjson or csv
-o, --outputOutput path (required)
--filter-vendor, --min-devicesFilters
Terminal window
vulnmgmt export data.csv --format csv -o filtered.csv --min-devices 50

info

Print configuration (output/data dirs, rate limits, cache) and the feature list.

Terminal window
vulnmgmt info

integrations

A group for enterprise security platforms. PLATFORM is one of rapid7, defender, sentinelone (support varies per subcommand). Credentials are stored encrypted via the key manager.

SubcommandPurpose
setup PLATFORMInteractive credential setup (encrypted, with rotation policy)
info PLATFORMShow integration info & quick stats
test PLATFORMTest the connection
search PLATFORMAdvanced asset/vuln filtering (Rapid7) — --asset-filter, --vuln-filter, --limit
explore PLATFORM RESOURCEBrowse vulnerabilities / assets / devices--severity, --search, --search-type, --cvss-min, --export, --raw
test-asset PLATFORMVulnerability lookup for one asset (Rapid7) — --asset
report PLATFORMGenerate a full Excel report — -o, --include-vulns, --include-cves
sync PLATFORMSync vulnerabilities/assets/alerts/… to xlsx/json/csv — --type, --limit, --filter
keys list|delete|rotateManage stored credentials
Terminal window
vulnmgmt integrations setup rapid7
vulnmgmt integrations explore rapid7 vulnerabilities --severity Critical --export critical.csv
vulnmgmt integrations report sentinelone -o s1_report.xlsx --include-cves

vuln — modern scan pipeline (cli_vuln.py)

The end-to-end scan/enrich/score workflow. Enrichment reads threat-intel API keys from a .env.local file (VirusTotal, OTX, GreyNoise, Shodan, AbuseIPDB, URLhaus).

SubcommandPurposeKey options
convert CSVConvert Intune/Defender CSV → scan-ready JSON (extract unique apps)--filter-app, --filter-vendor, --min-devices, --max-devices, --platform, --limit, --explain
lookupLook up + optionally enrich/score a single app--app, --version, --vendor, --assets, --criticality, --enrich, --sources, -o
scan APPS_FILEScan many apps from a JSON/CSV file--enrich, --sources, -o
pipeline INPUT_FILERun all 5 steps (load → map → enrich → score → report)-o, --excel
export JSON_FILEExport scan JSON to a 6-sheet Excel or a DOCX report-f xlsx|docx, -o
docsPrint integration documentation / API links
cpeThe CPE subgroup (see below)
Terminal window
# Full workflow
vulnmgmt vuln convert data/AppInvRawData.csv --min-devices 50 -o apps.json
vulnmgmt vuln scan apps.json --enrich -o results.json
vulnmgmt vuln export results.json -o report.xlsx
# Single app, enriched and scored
vulnmgmt vuln lookup --app "Apache Log4j" --version "2.14.1" --vendor Apache --enrich
# One-shot pipeline
vulnmgmt vuln pipeline apps.json -o results.json

cpe — CPE management (cli_vuln.py)

Search and map CPE entries. Available both as vulnmgmt cpe … and vulnmgmt vuln cpe ….

SubcommandPurpose
search KEYWORDSearch the NVD CPE dictionary (-n max results, -o JSON)
matchMatch an app to CPEs with confidence scores (--app, --version, --vendor)
lookup CVE_IDGet CPE match criteria (version ranges) for a CVE
mapSave an app→CPE mapping to cpe_mappings.json (--cpe, --confidence)
listList saved mappings (--app filter)
Terminal window
vulnmgmt cpe search "Foxit Reader"
vulnmgmt vuln cpe match --app "Foxit Reader" --version "7.1.5" --vendor Foxit
vulnmgmt vuln cpe lookup CVE-2021-44228

intune — Intune inventory pipeline (cli_intune.py)

Purpose-built for raw Intune AppInventory exports: import, deduplicate by app+version, aggregate device counts, then scan against NVD with version-range matching.

SubcommandPurposeKey options
import CSVImport & summarize inventory (dedupe, device counts)--min-devices, --platform, --top, --exclude-microsoft, --filter-vendor, --filter-app, -o
scan CSVImport then scan top apps against NVD--top, --min-devices, --exclude-microsoft, --filter-app, --rate-limit, -o
lookup APP_NAMEQuick CVE lookup for one app-v/--version (required), --vendor
stats CSVVendor/platform/version stats without hitting NVD
Terminal window
vulnmgmt intune import AppInvRawData.csv --exclude-microsoft --top 30
vulnmgmt intune scan AppInvRawData.csv --top 10 --exclude-microsoft
vulnmgmt intune lookup "Greenshot" -v "1.3.312"

enrich — CVE enrichment (cli_enrich.py)

Test and run enrichment against NVD, FIRST.org EPSS, and CISA KEV, operating on CVEs already stored in the database.

SubcommandPurpose
test-nvd CVE_IDFetch CVSS/dates from NVD
test-epss CVE_IDFetch EPSS score + risk interpretation
test-kev CVE_IDCheck the CISA KEV catalog
test-all CVE_IDRun all three source tests
runEnrich DB CVEs missing CVSS/EPSS (--limit, --force)
statusShow enrichment coverage (CVSS/EPSS/KEV/fully enriched)
Terminal window
vulnmgmt enrich test-all CVE-2021-44228
vulnmgmt enrich run --limit 100
vulnmgmt enrich status

db — database management (cli_db.py)

Manage the PostgreSQL schema (uses Alembic + pg_dump). See the schema summary.

SubcommandPurpose
initInitialize the schema (--force drops existing tables)
migrate -m MSGCreate an Alembic autogenerate migration
upgradeApply pending migrations (alembic upgrade head)
statusConnectivity, table count, record counts, current migration
backuppg_dump to a timestamped .sql file (-o)
Terminal window
vulnmgmt db init
vulnmgmt db migrate -m "add findings index"
vulnmgmt db upgrade
vulnmgmt db status

sync — Rapid7 → database (cli_sync.py)

Run the Rapid7 sync tasks and inspect what has been synced. (Distinct from integrations sync, which exports to files.)

SubcommandPurpose
run rapid7Full (--full, default) or --incremental sync into Postgres
statusActive asset count, updates in last 24h, last sync time
historyRecently synced assets (--hours)
Terminal window
vulnmgmt sync run rapid7 --full
vulnmgmt sync status

worker — background scheduler (cli_worker.py)

Control the APScheduler worker that runs the periodic sync/enrichment/SLA jobs (see worker jobs).

SubcommandPurpose
startStart the blocking APScheduler worker
statusCheck the vulnmgmt-worker Docker container
logsTail worker logs
schedulePrint the scheduled-job table
Terminal window
vulnmgmt worker start
vulnmgmt worker schedule

cw / connectwise — ConnectWise Manage (integrations/connectwise)

Manage PSA tickets from vulnerability findings.

SubcommandPurpose
testTest the ConnectWise connection
boards, statuses, priorities, companiesList reference data
tickets listList tickets on a board (-b, -c, --include-closed, -n)
tickets createCreate a vuln ticket (--cve, --app, --severity, --cvss, -c, -b)
tickets view ID / tickets update IDView / update / close a ticket
sync create-ticketsBulk-create tickets from a findings file (-f, -c, -b, --threshold, --dry-run)
sync close CVE_IDS…Close tickets for remediated CVEs
Terminal window
vulnmgmt cw tickets create --cve CVE-2024-1234 --app "Foxit Reader" \
--severity HIGH -c 123 -b 45
vulnmgmt cw sync create-tickets -f findings.json -c 123 -b 45 --threshold HIGH --dry-run

epss — EPSS scores (integrations/epss)

Query FIRST.org EPSS exploit-probability scores directly.

SubcommandPurpose
score CVE_IDSingle CVE EPSS score
batch CVE_IDS…Batch lookup (--delay)
high-riskList high-EPSS CVEs (--threshold, --limit)
stats / clearCache stats / clear cache
Terminal window
vulnmgmt epss score CVE-2021-44228
vulnmgmt epss high-risk --threshold 0.5 --limit 25