added epss-percentile field under classification (#3911)

* added epss-percentile field under classification

* lint fix
dev
Sandeep Singh 2023-07-09 01:19:56 +05:30 committed by GitHub
parent 28f6c37974
commit 9a44deb9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -76,8 +76,6 @@ func init() {
}
}
var idRegex = regexp.MustCompile("id: ([C|c][V|v][E|e]-[0-9]+-[0-9]+)")
type options struct {
input string
errorLogFile string

View File

@ -207,6 +207,7 @@ func tryCollectConditionsMatchinfo(template *templates.Template) map[string]inte
parameters["cwe_id"] = template.Info.Classification.CWEID.ToSlice()
parameters["cpe"] = template.Info.Classification.CPE
parameters["epss_score"] = template.Info.Classification.EPSSScore
parameters["epss_percentile"] = template.Info.Classification.EPSSPercentile
}
if template.Type() == types.HTTPProtocol {

View File

@ -101,6 +101,11 @@ type Classification struct {
// - value: "\"0.42509\""
EPSSScore float64 `json:"epss-score,omitempty" yaml:"epss-score,omitempty" jsonschema:"title=epss score for the template,description=EPSS Score for the template,example=0.42509"`
// description: |
// EPSS Percentile for the template.
// examples:
// - value: "\"0.42509\""
EPSSPercentile float64 `json:"epss-percentile,omitempty" yaml:"epss-percentile,omitempty" jsonschema:"title=epss percentile for the template,description=EPSS Percentile for the template,example=0.42509"`
// description: |
// CPE for the template.
// examples:
// - value: "\"cpe:/a:vendor:product:version\""