Vulnerability Editor#
Vulnerability-Lookup creates and modifies vulnerability records with Vulniverse, a modular and extensible vulnerability record editor. Its functionality can be customized through optional panels, actions, and features.
The editor is an optional module, off by default. Turn it on in config/website.py:
WEB_MODULES = {
# ...
"vulnerability_editor": True,
}
The editor pages are:
/vuln/create, for a new record;/vuln/<id>/edit, for an existing record.
The former /user/submit and /user/edit/<id> redirect there (301). The create page is
under Advisories → New vulnerability advisory in the main menu.
When it is off:
The editor pages, and the former URLs, answer 404.
The “New vulnerability advisory” menu entry and the Edit button of records are not shown.
The API of the editor (
/api/vulniverse_templates,/api/vulniverse_record_quality,/api/patch2vuln) is not registered.The CNA API (
/api/cna) still works, so API clients can create and update records.
Configure Vulniverse#
Vulniverse can be embedded into Vulnerability-Lookup and uses the host application’s existing services for loading and saving vulnerability records.
Fig. 8 Vulniverse Editor.#
Vulniverse-specific settings are defined in config/vulniverse.json, located in the Vulnerability-Lookup config/ directory. This configuration controls which optional panels, actions, and features are available in the embedded editor.
The actions key lists the buttons of the editor’s header, all on by default:
view-vulnerability: open the record’s page.download: download the record as JSON, HTML or PDF.tutorial: a short tour of the editor.
Set an action to false to hide its button.
Depending on the enabled functionality and the services provided by Vulnerability-Lookup, Vulniverse can offer capabilities such as record quality assessments, CPE recommendations, and AI-assisted vulnerability record generation.
Configure Patch2Vuln#
Patch2Vuln is an optional service that uses large language models (LLMs) to generate vulnerability record drafts from software patches.
How the pieces fit together, from a patch to a published record: AI-Assisted Vulnerability Records.
Vulnerability-Lookup does not run Patch2Vuln: it forwards the jobs to an external Patch2Vuln HTTP service and relays the results. To show the Patch2Vuln panel in Vulniverse:
Run a Patch2Vuln service that Vulnerability-Lookup can reach.
Configure it in
config/patch2vuln.json:{ "patch2vuln_enabled": true, "patch2vuln_url": "http://<host>:<port>", "patch2vuln_timeout": 300, "api_key": "" }
patch2vuln_enabled: registers/api/patch2vuln. The panel is only shown when it istrue.patch2vuln_url: the address of the service.patch2vuln_timeout: in seconds, how long to wait for the result of a job.api_key: the token the service expects, if any. ThePATCH2VULN_API_TOKENenvironment variable takes precedence, to keep the secret out of the file.
Enable the panel in
config/vulniverse.json:"patch2vuln": trueunderpanels.Restart the website: the panel and the endpoint are set up at start-up.
The panel needs patch2vuln 1.3.0 or later, the first version with the web service. It accepts the “Additional instructions” field (prompt).
The panel needs both patch2vuln_enabled and panels.patch2vuln. With patch2vuln_enabled on and the service unreachable, jobs fail with “Could not reach the Patch2Vuln service”.
Once configured, users can submit patches for analysis directly in Vulniverse. The generated vulnerability information can be reviewed before being selectively applied to the current record.
Update Vulniverse#
Vulniverse is installed from npm as @nmd03/vulniverse, pinned to an exact version in package.json. To move to a new version:
npm install --save-exact @nmd03/vulniverse@1.0.x # the new version
python3 tools/copy_frontend_assets.py # npm install <package> skips postinstall
poetry run pytest -q tests/test_static_assets.py && npm test
Then reload the editor page (/vuln/create), check that it loads, saves and reserves a GCVE ID, and commit package.json and package-lock.json. Installations pick the new version up with the usual update (npm ci --omit=dev, or poetry run update).