Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions sysdig/internal/client/v2/vulnerability_rule_bundle_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,24 @@ type VulnerabilityRulePredicate struct {
}

type VulnerabilityRulePredicateExtra struct {
Level *Level `json:"level,omitempty"`
Age *int `json:"age,omitempty"`
VulnIDS []string `json:"vulnIds,omitempty"`
Value *string `json:"value,omitempty"`
Packages []Package `json:"packages,omitempty"`
Key *string `json:"key,omitempty"`
User *string `json:"user,omitempty"`
PkgType *string `json:"pkgType,omitempty"`
// Common fields for different predicate types
Level *Level `json:"level,omitempty"`
Age *int `json:"age,omitempty"`
Days *int `json:"days,omitempty"`
PkgType *string `json:"pkgType,omitempty"`
VulnIDS []string `json:"vulnIds,omitempty"`
Packages []Package `json:"packages,omitempty"`
Key *string `json:"key,omitempty"`
User *string `json:"user,omitempty"`
Value interface{} `json:"value,omitempty"` // For image labels or CVSS score

// Disclosure Date Range
StartDate *string `json:"startDate,omitempty"`
EndDate *string `json:"endDate,omitempty"`

// EPSS
Score *int `json:"score,omitempty"`
Percentile *int `json:"percentile,omitempty"`
}

type Package struct {
Expand Down Expand Up @@ -57,3 +67,8 @@ const (
VulnerabilityRuleTypeVulnDenyList VulnerabilityRuleType = "vulnDenyList"
VulnerabilityRuleTypeVulnSeverityAndThreats VulnerabilityRuleType = "vulnSeverityAndThreats"
)

type DateRange struct {
From string `json:"from"`
To string `json:"to"`
}
Loading
Loading