vulnlog modify add
vulnlog modify add adds a vulnerability entry to one or more Vulnlog files.
If a file already has an entry with the same ID, the command updates that entry.
Without a file, it prints the new entry to stdout.
Arguments and options
| Name | Value | Default | Description |
|---|---|---|---|
|
Zero or more Vulnlog files |
none |
Files to add the entry to.
Without a file, the entry goes to stdout, indented to paste under |
|
A vulnerability ID |
required |
ID of the entry, for example |
|
Text |
none |
Common name, for example |
|
A vulnerability ID |
none |
Another ID of the same vulnerability. Repeatable. |
|
A release ID |
last release in the file |
Release the vulnerability affects. Repeatable.
The file must define it.
Without it, a new entry gets the last release listed under |
|
A package URL (PURL) |
none |
Affected package, for example |
|
A tag ID |
none |
Tag of the entry. Repeatable. The file must define it. |
|
A reporter |
none |
Reporter that found the vulnerability. Repeatable. Each value adds a report dated today. For the reporters, see Supported scanners. |
|
Text |
none |
Short description. |
|
Text |
none |
Reasoning behind the verdict. |
|
A date, |
none |
Date of the analysis. |
|
|
none |
Verdict. Without a verdict, the entry is in the state |
|
|
none |
Severity of an |
|
|
none |
What you plan to do about an |
|
|
none |
Why a |
|
Text |
none |
Free-text comment. |
Values with spaces need quotes, for example --verdict "not affected".
For the meaning of each field, see Vulnerabilities and Verdicts and justifications.
For global options and standard input and output, see Global options and Standard input and output.
Behaviour
A new entry goes to the top of the vulnerabilities list.
An entry that exists keeps its place and gains what you pass:
-
--alias,--release,--package, and--tagadd values. Nothing is removed. -
--reporteradds a report for a new reporter, and sets the date of an existing report from that reporter to today. -
The other options replace the value when you pass them, and leave it as it is when you don’t.
-
The
resolutiondoesn’t change.
The command has no option for a report’s date, source, vuln_ids, or suppress block, or for the resolution.
Set these in the YAML.
A report that --reporter other adds has no source, so the file fails validation until you add one.
The command checks every file before it writes any. If one file doesn’t define a release or tag you pass, no file changes.
The command writes each file in the canonical style of vulnlog fmt and removes YAML comments, with a warning.
The command doesn’t check that the verdict, severity, disposition, and justification fit together.
vulnlog validate checks them.
Exit codes
| Code | When |
|---|---|
|
The entry was added or updated, or printed to stdout. |
|
A general error, |
|
A file doesn’t pass validation before the change. |
Examples
Print a minimal entry to stdout:
$ vulnlog modify add --vuln-id CVE-2023-32681
- id: CVE-2023-32681
releases: []
packages: []
reports: []
Record the requests finding from GitHub Dependabot in acme-shop.vl.yaml, in a version of the file that doesn’t have the entry yet:
$ vulnlog modify add acme-shop.vl.yaml --vuln-id CVE-2023-32681 \
--description "Proxy-Authorization header leak in requests" \
--release 4.3.0 --package pkg:pypi/requests@2.28.2 \
--reporter github-dependabot --tag worker --tag container
Added: CVE-2023-32681 to acme-shop.vl.yaml
The new entry is at the top of vulnerabilities, with today’s date on the report:
- id: CVE-2023-32681
description: Proxy-Authorization header leak in requests
releases: [4.3.0]
packages: ["pkg:pypi/requests@2.28.2"]
reports:
- reporter: github-dependabot
at: 2026-11-07
tags:
- worker
- container
Run the command again with the same ID to update the entry:
$ vulnlog modify add acme-shop.vl.yaml --vuln-id CVE-2023-32681 --analyzed-at 2026-07-15
Updated: CVE-2023-32681 in acme-shop.vl.yaml
A release the file doesn’t define stops the command, and the file doesn’t change:
$ vulnlog modify add acme-shop.vl.yaml --vuln-id CVE-2023-32681 --release 4.5.0
error: acme-shop.vl.yaml: releases not defined in the file: 4.5.0
hint: declare them under 'releases' in the file first