diff --git a/v2/pkg/model/model.go b/v2/pkg/model/model.go index 838cc085..85df3724 100644 --- a/v2/pkg/model/model.go +++ b/v2/pkg/model/model.go @@ -65,4 +65,41 @@ type Info struct { // - value: > // map[string]string{"customField1":"customValue1"} AdditionalFields map[string]string `json:"additional-fields,omitempty" yaml:"additional-fields,omitempty" jsonschema:"title=additional metadata for the template,description=Additional metadata fields for the template"` + + // description: | + // Classification contains classification information about the template. + Classification *Classification `json:"classification,omitempty" yaml:"classification,omitempty" jsonschema:"title=classification info for the template,description=Classification information for the template"` + + // description: | + // Remediation steps for the template. + // + // You can go in-depth here on how to mitigate the problem found by this template. + // + // examples: + // - value: "\"Change the default administrative username and password of Apache ActiveMQ by editing the file jetty-realm.properties\"" + Remediation string `json:"remediation,omitempty" yaml:"remediation,omitempty" jsonschema:"title=remediation steps for the template,description=In-depth explanation on how to fix the issues found by the template,example=Change the default administrative username and password of Apache ActiveMQ by editing the file jetty-realm.properties"` +} + +// Classification contains the vulnerability classification data for a template. +type Classification struct { + // description: | + // CVE ID for the template + // examples: + // - value: "\"CVE-2020-14420\"" + CVEID stringslice.StringSlice `json:"cve-id,omitempty" yaml:"cve-id,omitempty" jsonschema:"title=cve ids for the template,description=CVE IDs for the template,example=CVE-2020-14420"` + // description: | + // CWE ID for the template. + // examples: + // - value: "\"CWE-22\"" + CWEID stringslice.StringSlice `json:"cwe-id,omitempty" yaml:"cwe-id,omitempty" jsonschema:"title=cwe ids for the template,description=CWE IDs for the template,example=CWE-22"` + // description: | + // CVSS Metrics for the template. + // examples: + // - value: "\"3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\"" + CVSSMetrics string `json:"cvss-metrics,omitempty" yaml:"cvss-metrics,omitempty" jsonschema:"title=cvss metrics for the template,description=CVSS Metrics for the template,example=3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"` + // description: | + // CVSS Score for the template. + // examples: + // - value: "\"9.8\"" + CVSSScore float64 `json:"cvss-score,omitempty" yaml:"cvss-score,omitempty" jsonschema:"title=cvss score for the template,description=CVSS Score for the template,example=9.8"` }