@@ -20,14 +20,24 @@ type VulnerabilityRulePredicate struct {
2020}
2121
2222type VulnerabilityRulePredicateExtra struct {
23- Level * Level `json:"level,omitempty"`
24- Age * int `json:"age,omitempty"`
25- VulnIDS []string `json:"vulnIds,omitempty"`
26- Value * string `json:"value,omitempty"`
27- Packages []Package `json:"packages,omitempty"`
28- Key * string `json:"key,omitempty"`
29- User * string `json:"user,omitempty"`
30- PkgType * string `json:"pkgType,omitempty"`
23+ // Common fields for different predicate types
24+ Level * Level `json:"level,omitempty"`
25+ Age * int `json:"age,omitempty"`
26+ Days * int `json:"days,omitempty"`
27+ PkgType * string `json:"pkgType,omitempty"`
28+ VulnIDS []string `json:"vulnIds,omitempty"`
29+ Packages []Package `json:"packages,omitempty"`
30+ Key * string `json:"key,omitempty"`
31+ User * string `json:"user,omitempty"`
32+ Value interface {} `json:"value,omitempty"` // For image labels or CVSS score
33+
34+ // Disclosure Date Range
35+ StartDate * string `json:"startDate,omitempty"`
36+ EndDate * string `json:"endDate,omitempty"`
37+
38+ // EPSS
39+ Score * int `json:"score,omitempty"`
40+ Percentile * int `json:"percentile,omitempty"`
3141}
3242
3343type Package struct {
@@ -57,3 +67,8 @@ const (
5767 VulnerabilityRuleTypeVulnDenyList VulnerabilityRuleType = "vulnDenyList"
5868 VulnerabilityRuleTypeVulnSeverityAndThreats VulnerabilityRuleType = "vulnSeverityAndThreats"
5969)
70+
71+ type DateRange struct {
72+ From string `json:"from"`
73+ To string `json:"to"`
74+ }
0 commit comments