Auto Generate Syntax Docs + JSONSchema [Sun Apr 2 07:54:23 UTC 2023] 🤖

This commit is contained in:
GitHub Action 2023-04-02 07:54:23 +00:00
parent abfaa84825
commit c5086527df
3 changed files with 74 additions and 1 deletions

View File

@ -795,6 +795,52 @@ cvss-score: "9.8"
<hr /> <hr />
<div class="dd">
<code>epss-score</code> <i>float64</i>
</div>
<div class="dt">
EPSS Score for the template.
Examples:
```yaml
epss-score: "0.42509"
```
</div>
<hr />
<div class="dd">
<code>cpe</code> <i>string</i>
</div>
<div class="dt">
CPE for the template.
Examples:
```yaml
cpe: cpe:/a:vendor:product:version
```
</div>
<hr />

View File

@ -26,6 +26,19 @@
"type": "number", "type": "number",
"title": "cvss score for the template", "title": "cvss score for the template",
"description": "CVSS Score for the template" "description": "CVSS Score for the template"
},
"epss-score": {
"type": "number",
"title": "epss score for the template",
"description": "EPSS Score for the template"
},
"cpe": {
"type": "string",
"title": "cpe for the template",
"description": "CPE for the template",
"examples": [
"cpe:/a:vendor:product:version"
]
} }
}, },
"additionalProperties": false, "additionalProperties": false,

View File

@ -293,7 +293,7 @@ func init() {
FieldName: "classification", FieldName: "classification",
}, },
} }
MODELClassificationDoc.Fields = make([]encoder.Doc, 4) MODELClassificationDoc.Fields = make([]encoder.Doc, 6)
MODELClassificationDoc.Fields[0].Name = "cve-id" MODELClassificationDoc.Fields[0].Name = "cve-id"
MODELClassificationDoc.Fields[0].Type = "stringslice.StringSlice" MODELClassificationDoc.Fields[0].Type = "stringslice.StringSlice"
MODELClassificationDoc.Fields[0].Note = "" MODELClassificationDoc.Fields[0].Note = ""
@ -322,6 +322,20 @@ func init() {
MODELClassificationDoc.Fields[3].Comments[encoder.LineComment] = "CVSS Score for the template." MODELClassificationDoc.Fields[3].Comments[encoder.LineComment] = "CVSS Score for the template."
MODELClassificationDoc.Fields[3].AddExample("", "9.8") MODELClassificationDoc.Fields[3].AddExample("", "9.8")
MODELClassificationDoc.Fields[4].Name = "epss-score"
MODELClassificationDoc.Fields[4].Type = "float64"
MODELClassificationDoc.Fields[4].Note = ""
MODELClassificationDoc.Fields[4].Description = "EPSS Score for the template."
MODELClassificationDoc.Fields[4].Comments[encoder.LineComment] = "EPSS Score for the template."
MODELClassificationDoc.Fields[4].AddExample("", "0.42509")
MODELClassificationDoc.Fields[5].Name = "cpe"
MODELClassificationDoc.Fields[5].Type = "string"
MODELClassificationDoc.Fields[5].Note = ""
MODELClassificationDoc.Fields[5].Description = "CPE for the template."
MODELClassificationDoc.Fields[5].Comments[encoder.LineComment] = "CPE for the template."
MODELClassificationDoc.Fields[5].AddExample("", "cpe:/a:vendor:product:version")
HTTPRequestDoc.Type = "http.Request" HTTPRequestDoc.Type = "http.Request"
HTTPRequestDoc.Comments[encoder.LineComment] = " Request contains a http request to be made from a template" HTTPRequestDoc.Comments[encoder.LineComment] = " Request contains a http request to be made from a template"