Skip to content
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"

lint:
golangci-lint run --timeout 1h ./...
golangci-lint run --build-tags "$(TEST_SUITE)" --timeout 1h ./...

errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"
Expand Down
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