vulnlog init
vulnlog init creates a Vulnlog file with the required sections only: the schema header, schemaVersion, project, an empty releases list, and an empty vulnerabilities list.
It writes to stdout unless you name an output file.
Options
| Name | Value | Default | Description |
|---|---|---|---|
|
Text |
required |
Organisation that owns the project. Written to |
|
Text |
required |
Project name. Written to |
|
Text |
required |
Author of the Vulnlog file, for example a team. Written to |
|
A file path, or |
stdout |
File to write. |
|
none |
off |
Replace the output file if it exists.
Without it, |
For the fields of the project block, see Project and releases.
For global options and standard input and output, see Global options and Standard input and output.
Exit codes
| Code | When |
|---|---|
|
The file was written, or the content went to stdout. |
|
A general error, the output file exists and |
Examples
Print a new file to stdout:
$ vulnlog init --organization "Acme Corp" --name "Acme Shop" --author "Acme Product Security Team"
# $schema: https://vulnlog.dev/schema/vulnlog-v1.json
---
schemaVersion: "1"
project:
organization: Acme Corp
name: Acme Shop
author: Acme Product Security Team
releases: []
vulnerabilities: []
Write it to vulnlog.yaml:
$ vulnlog init --organization "Acme Corp" --name "Acme Shop" --author "Acme Product Security Team" -o vulnlog.yaml
Created: vulnlog.yaml
Run the same command again, and init refuses to replace the file:
$ vulnlog init --organization "Acme Corp" --name "Acme Shop" --author "Acme Product Security Team" -o vulnlog.yaml
error: the file vulnlog.yaml already exists
hint: pass --force to replace it
The file init creates passes vulnlog validate and vulnlog fmt --check as it is.