Accept CVSS strings in finding creation
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
#import "cvss.typ" as cvssAddon
|
||||
|
||||
#let findingsList = state("findingsList", ())
|
||||
|
||||
#let create(
|
||||
name: str,
|
||||
cvss: str,
|
||||
description: content,
|
||||
finding: content,
|
||||
evaluation: content,
|
||||
recommendation: content
|
||||
) = {
|
||||
findingsList.update(f => {
|
||||
f.push(
|
||||
[
|
||||
== #name
|
||||
|
||||
#cvssAddon.createTableFromString(input: cvss)
|
||||
|
||||
=== Description
|
||||
|
||||
#description
|
||||
|
||||
=== Finding
|
||||
|
||||
#finding
|
||||
|
||||
=== Evaluation
|
||||
|
||||
#evaluation
|
||||
|
||||
=== Recommendation
|
||||
|
||||
#recommendation
|
||||
|
||||
#pagebreak(weak: true)
|
||||
]
|
||||
)
|
||||
f
|
||||
})
|
||||
}
|
||||
|
||||
#let print(sort: str) = {
|
||||
context(
|
||||
for f in findingsList.final() {
|
||||
f
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user