Skip to content

Commit be493bd

Browse files
Security Advisories: fix file format spec formatting
1 parent 4da5ac3 commit be493bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

proposals/accepted/037-advisory-db.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ The people involved in executing this proposal, if accepted, are:
8484

8585
The file format for advisories is based on that of RustSec, with changes made for compatibility with Haskell tooling and concepts. An advisory consists of a Markdown file, the first element of which must be a fenced code block written in the `toml` language. This block contains the advisory's structured metadata.
8686

87-
The TOML frontmatter must contain a table called `advisory` and a table called `versions`, and it may contain a table called `affected`. The `advisory` table contains the following fields, all of which are mandatory unless otherwise indicated:
87+
The TOML frontmatter must contain a table called `advisory` and a table called `versions`, and it may contain a table called `affected`.
88+
89+
The `advisory` table contains the following fields, all of which are mandatory unless otherwise indicated:
8890
* `id`, a string, which is a unique identifier. This string should have the form `HSEC-YYYY-NNNN`, where `YYYY` is the year and `NNNN` is a sequential numbering beginning at `0001`.
8991
* `package`, a string, the name of the affected Hackage package
9092
* `date`, a TOML local date, which is the disclosure date.
@@ -94,10 +96,12 @@ The TOML frontmatter must contain a table called `advisory` and a table called `
9496
* `keywords`, an optional array of strings, which may be any string that the submitter finds relevant. By convention, they are written in lowercase.
9597
* `aliases`, an optional array of strings, each of which is another identifier such as a CVE
9698
* `related`, an optional array of strings, each of which is an identifier for a related advisory (such as for a wrapped C library)
99+
97100
The `affected` table, if present, contains the following fields, all of which are optional:
98101
* `arch`, an array of strings, each of which is the value of `System.Info.arch` on the affected systems. The advisory only applies to the specified architectures. If this key is absent, then the advisory applies to all architectures.
99102
* `os`, an array of strings, each of which is the value of `System.Info.os` on the affected systems. The advisory only applies to the specified operating systems. If this key is absent, then the advisory applies to all operating systems.
100103
* `declarations`, a table that maps fully-qualified names from the package to Cabal v2.0 version ranges. These ranges must all be contained in the affected versions (specified later), and they specify that the given name is the source of the advisory in that sub-range. This allows one advisory to mention a function or datatype that is renamed at some point during development.
104+
101105
The `versions` table contains a single mandatory key, `affected`, whose value is a string that contains a Cabal v2.0 version range.
102106

103107
Cabal v2.0 version ranges are specified using the following grammar:

0 commit comments

Comments
 (0)