vulnq - Vulnerability Query Tool
vulnq is a lightweight, multi-source vulnerability query tool that consolidates security data from multiple vulnerability databases. It accepts various software identifiers (PURLs, CPEs, hashes) and returns comprehensive vulnerability information including CVEs, severity scores, and available fixes.
Key Features
- Multiple ID Formats - Accepts PURLs, CPE strings, and file hashes
- Multi-Source Aggregation - Queries OSV.dev, GitHub Advisory, NIST NVD, and more
- Smart Format Detection - Auto-detects input format or accepts explicit flags
- Upgrade Path Suggestions - Identifies fixed versions when available
- Lightweight - API-only design, no local vulnerability databases
- Flexible Output - JSON, table, and markdown formats
Installation
pip install vulnq
For development:
git clone https://github.com/SemClone/vulnq.git
cd vulnq
pip install -e .
Quick Start
Command Line
# Query using Package URL (auto-detected)
vulnq pkg:npm/express@4.17.1
# Query using CPE string (example: Apache Log4j)
vulnq --cpe "cpe:2.3:a:apache:log4j:2.14.0:*:*:*:*:*:*:*"
# Note: Hash-based queries are not currently supported by vulnerability databases
# Query multiple identifiers from file
vulnq --input packages.txt
# Filter by severity
vulnq pkg:pypi/django@3.2.1 --min-severity high
# Output as JSON
vulnq pkg:gem/rails@6.0.0 --format json
# Include fixed versions only
vulnq pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1 --show-fixes
Python API
from vulnq import VulnerabilityQuery
# Initialize the query engine
vq = VulnerabilityQuery()
# Query by PURL
results = vq.query("pkg:npm/express@4.17.1")
# Query by CPE
results = vq.query_cpe("cpe:2.3:a:apache:log4j:2.14.0:*:*:*:*:*:*:*")
# Note: Hash queries are not currently supported by vulnerability databases
# Future versions may support this through file-to-package mapping services
# Process results
for vuln in results.vulnerabilities:
print(f"{vuln.id}: {vuln.severity} - {vuln.summary}")
if vuln.fixed_versions:
print(f" Fixed in: {', '.join(vuln.fixed_versions)}")
Supported Vulnerability Sources
- OSV.dev - Google's Open Source Vulnerability database
- GitHub Advisory Database - GitHub Security Advisories
- NIST NVD - National Vulnerability Database
- FIRST.org - Forum of Incident Response and Security Teams (planned)
- Sonatype OSS Index - Component vulnerability data (planned)
Supported Identifier Formats
Package URLs (PURLs)
pkg:npm/package@versionpkg:pypi/package@versionpkg:maven/group/artifact@versionpkg:gem/package@versionpkg:cargo/package@versionpkg:nuget/package@versionpkg:golang/module@version
CPE (Common Platform Enumeration)
cpe:2.3:a:vendor:product:version:*:*:*:*:*:*:*cpe:/a:vendor:product:version(legacy format)
File Hashes
- SHA256
- SHA1
- MD5
Configuration
vulnq can be configured via environment variables or config file:
# API Keys (optional, for higher rate limits)
export GITHUB_TOKEN="your_github_token"
export NVD_API_KEY="your_nvd_api_key"
# Cache settings
export VULNQ_CACHE_DIR="~/.vulnq/cache"
export VULNQ_CACHE_TTL="3600" # seconds
# Rate limiting
export VULNQ_MAX_CONCURRENT="5"
# Exploitability snapshots (see below)
export VULNQ_KEV_SNAPSHOT="/srv/snapshots"
export VULNQ_EPSS_SNAPSHOT="/srv/snapshots"
export VULNQ_SNAPSHOT_MAX_AGE_DAYS="7" # optional; unset means age is advisory
Exploitability Enrichment
vulnq answers "is this package vulnerable, how badly, and is there a fix." KEV and EPSS add the other half: is anyone exploiting it, and how likely is that to change.
- CISA KEV marks CVEs that are known to be exploited in the wild, with the date they were catalogued, whether ransomware campaigns use them, and the required remediation action.
- FIRST EPSS gives the probability of exploitation in the next 30 days, which is what makes a backlog of hundreds of medium-severity CVEs rankable.
Both are static reference files joined on the CVE id, not per-query APIs. Mine them once and point a fleet of workers at the result:
# Mine snapshots (an operational job - schedule this yourself)
vulnq-mine kev --out /srv/snapshots
vulnq-mine epss --out /srv/snapshots
# Query against them
export VULNQ_KEV_SNAPSHOT=/srv/snapshots
export VULNQ_EPSS_SNAPSHOT=/srv/snapshots
vulnq pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━┳━━━━━┳━━━━━━━┳ ...
┃ ID ┃ Severity ┃ CVSS ┃ KEV ┃ EPSS ┃ ...
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━╇━━━━━╇━━━━━━━╇ ...
│ GHSA-jfh8-c2jp-5v3q │ CRITICAL │ 9.0 │ YES │ 1.000 │ ...
cisa-kev: 2026.08.14, 0.2d old
first-epss: 2026-08-16, 0.2d old
vulnq reads snapshots; it does not schedule mining, hold credentials, or
publish anywhere. Those are deployment policy, so installing vulnq never
inherits a publishing dependency. A snapshot location may be a file, a
directory, or a URL.
Unknown is not a negative
A missing, unreachable, or stale snapshot leaves known_exploited and
epss_score as null — never false or 0.0. Zero is a real EPSS score and
false is a real KEV verdict, so a consumer that reads either out of a failed
join would confidently under-rate a live threat. Check enrichment in the JSON
envelope to see which snapshot a result was scored against and how old it was:
"enrichment": {
"cisa-kev": {"available": true, "version": "2026.08.14", "age_seconds": 23.8, "stale": false},
"first-epss": {"available": true, "version": "2026-08-16", "record_count": 360399}
}
Advisories with no CVE alias (GHSA-only) can never be joined and stay null.
Attribution
CISA KEV is a US Government work in the public domain. FIRST requests attribution when EPSS data is used in a product — confirm placement before customer delivery, and confirm FIRST's terms separately if you republish a snapshot rather than consuming it privately.
Integration with SEMCL.ONE
vulnq is designed to work seamlessly with other SEMCL.ONE tools:
# Pipe PURLs from src2purl to vulnq
src2purl /path/to/project | vulnq --format json
# Check vulnerabilities for detected packages
upmex /path/to/package.json | vulnq --min-severity critical
# Generate vulnerability report from SBOM
cat sbom.json | vulnq --input - --format markdown > vulns.md
Output Formats
Table (default)
┌──────────────┬──────────┬──────────┬─────────────────┬──────────────┐
│ CVE │ Severity │ CVSS │ Package │ Fixed In │
├──────────────┼──────────┼──────────┼─────────────────┼──────────────┤
│ CVE-2021-1234│ HIGH │ 7.5 │ express@4.17.1 │ 4.17.2 │
│ CVE-2021-5678│ CRITICAL │ 9.8 │ express@4.17.1 │ 4.18.0 │
└──────────────┴──────────┴──────────┴─────────────────┴──────────────┘
JSON
{
"query": "pkg:npm/express@4.17.1",
"vulnerabilities": [
{
"id": "CVE-2021-1234",
"severity": "HIGH",
"cvss_score": 7.5,
"summary": "Remote Code Execution...",
"fixed_versions": ["4.17.2", "4.18.0"],
"references": [...]
}
],
"metadata": {
"sources": ["osv", "github", "nvd"],
"query_time": "2024-11-04T10:30:00Z"
}
}
Development
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=vulnq tests/
# Run specific test
pytest tests/test_osv_client.py -v
Building
# Build package
python -m build
# Install locally for testing
pip install -e .
Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
License
vulnq is released under the Apache License 2.0. See LICENSE for details.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Security: Report vulnerabilities to security@semcl.one
Part of the SEMCL.ONE Software Composition Analysis toolchain
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vulnq-1.1.0.tar.gz.
File metadata
- Download URL: vulnq-1.1.0.tar.gz
- Upload date:
- Size: 55.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c6a3c759b58f3c42a23090fd64919485678224185ec004ac2fc7f8b3e88c2a9
|
|
| MD5 |
915169ccdfde202a9da319848e9c8b2b
|
|
| BLAKE2b-256 |
f7ec10b548fa52c15b1142ac1eb7ba9311aadf3dcd1dcc4d478b9e0db0b869d3
|
Provenance
The following attestation bundles were made for vulnq-1.1.0.tar.gz:
Publisher:
python-publish.yml on SemClone/vulnq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vulnq-1.1.0.tar.gz -
Subject digest:
3c6a3c759b58f3c42a23090fd64919485678224185ec004ac2fc7f8b3e88c2a9 - Sigstore transparency entry: 2496817952
- Sigstore integration time:
-
Permalink:
SemClone/vulnq@45d271d888960738e2bb2047ec69db9f97606c40 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/SemClone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@45d271d888960738e2bb2047ec69db9f97606c40 -
Trigger Event:
release
-
Statement type:
File details
Details for the file vulnq-1.1.0-py3-none-any.whl.
File metadata
- Download URL: vulnq-1.1.0-py3-none-any.whl
- Upload date:
- Size: 46.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9ec0c61a0095dc9c03ec84b35d46a228dbd038434587e1d102edf97476c342a
|
|
| MD5 |
fbb40496cf252e4199eb46433ba0f8ea
|
|
| BLAKE2b-256 |
9b1dd5e164d1c656bd575acc9593c9766fe1168ce2bbbc9c92e0183b0db99be0
|
Provenance
The following attestation bundles were made for vulnq-1.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on SemClone/vulnq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vulnq-1.1.0-py3-none-any.whl -
Subject digest:
e9ec0c61a0095dc9c03ec84b35d46a228dbd038434587e1d102edf97476c342a - Sigstore transparency entry: 2496817972
- Sigstore integration time:
-
Permalink:
SemClone/vulnq@45d271d888960738e2bb2047ec69db9f97606c40 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/SemClone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@45d271d888960738e2bb2047ec69db9f97606c40 -
Trigger Event:
release
-
Statement type: