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.

Synopsis

vulnlog modify add [<destinations>...] --vuln-id <id> [<options>]

Arguments and options

Name Value Default Description

<destinations>

Zero or more Vulnlog files

none

Files to add the entry to. Without a file, the entry goes to stdout, indented to paste under vulnerabilities.

--vuln-id

A vulnerability ID

required

ID of the entry, for example CVE-2023-32681. For the supported ID types, see Vulnerabilities.

--name

Text

none

Common name, for example Log4Shell.

--alias

A vulnerability ID

none

Another ID of the same vulnerability. Repeatable.

--release

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 releases, published or not.

--package

A package URL (PURL)

none

Affected package, for example pkg:pypi/requests@2.28.2. Repeatable.

--tag

A tag ID

none

Tag of the entry. Repeatable. The file must define it.

--reporter

A reporter

none

Reporter that found the vulnerability. Repeatable. Each value adds a report dated today. For the reporters, see Supported scanners.

--description

Text

none

Short description.

--analysis

Text

none

Reasoning behind the verdict.

--analyzed-at

A date, YYYY-MM-DD

none

Date of the analysis.

--verdict

affected or not affected

none

Verdict. Without a verdict, the entry is in the state under investigation.

--severity

low, medium, high, or critical

none

Severity of an affected verdict.

--disposition

will fix or wont fix

none

What you plan to do about an affected verdict.

--justification

component not present, inline mitigations already exist, vulnerable code cannot be controlled by adversary, vulnerable code not in execute path, or vulnerable code not present

none

Why a not affected verdict holds.

--comment

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 --tag add values. Nothing is removed.

  • --reporter adds 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 resolution doesn’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

0

The entry was added or updated, or printed to stdout.

1

A general error, --vuln-id isn’t supported, an option value isn’t allowed, or a file doesn’t define a release or tag you pass. For the general errors, see Exit codes.

2

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