Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRulesTree ¶
BuildRulesTree builds a tree for rules
Types ¶
type ActionItem ¶ added in v1.0.4
type ActionItem struct {
TicketCreatedAt *time.Time `yaml:"TicketCreatedAt,omitempty"`
TicketLink *string `yaml:"TicketLink,omitempty"`
TicketProvider *VerifyActionItemTicketProvider `yaml:"TicketProvider,omitempty"`
AssigneeEmail *string `yaml:"assigneeEmail,omitempty"`
Category *string `yaml:"category,omitempty"`
Cluster *string `yaml:"cluster,omitempty"`
DeletedAt *time.Time `yaml:"deletedAt,omitempty"`
Description *string `yaml:"description,omitempty"`
EventType *string `yaml:"eventType,omitempty"`
FirstSeen *time.Time `yaml:"firstSeen,omitempty"`
Fixed *bool `yaml:"fixed,omitempty"`
IsCustom *bool `yaml:"isCustom,omitempty"`
LastReportedAt *time.Time `yaml:"lastReportedAt,omitempty"`
Notes *string `yaml:"notes,omitempty"`
Organization *string `yaml:"organization,omitempty"`
Remediation *string `yaml:"remediation,omitempty"`
ReportType *string `yaml:"reportType,omitempty"`
Resolution *string `yaml:"resolution,omitempty"`
ResourceContainer *string `yaml:"resourceContainer,omitempty"`
ResourceKind *string `yaml:"resourceKind,omitempty"`
ResourceLabels map[string]string `yaml:"resourceLabels,omitempty"`
ResourceName *string `yaml:"resourceName,omitempty"`
ResourceNamespace *string `yaml:"resourceNamespace,omitempty"`
Severity *float32 `yaml:"severity,omitempty"`
Tags []string `yaml:"tags"`
Title string `yaml:"title"`
}
func RunVerifyRule ¶ added in v1.0.4
func RunVerifyRule(org, token, hostName string, rule VerifyRule) (*ActionItem, error)
RunVerifyRule verifies rule against one action item
type CompareResults ¶
CompareResults holds the rules for inserting, updating, and deleting
type Rule ¶
type Rule struct {
ID int
Cluster string
Name string
Description string
Context string
ReportType string `json:"reportType" yaml:"reportType"`
Repository string
Action string
}
Rule is the struct to hold the information for a rule
type RuleExecutionContext ¶ added in v1.0.4
type RuleExecutionContext string
RuleExecutionContext defines model for RuleExecutionContext.
const ( RuleExecutionContextAdmissionController RuleExecutionContext = "AdmissionController" RuleExecutionContextAgent RuleExecutionContext = "Agent" RuleExecutionContextCICD RuleExecutionContext = "CI/CD" )
Defines values for RuleExecutionContext.
type VerifyActionItemTicketProvider ¶ added in v1.0.4
type VerifyActionItemTicketProvider string
const ( VerifyActionItemTicketProviderAzure VerifyActionItemTicketProvider = "Azure" VerifyActionItemTicketProviderGitHub VerifyActionItemTicketProvider = "GitHub" VerifyActionItemTicketProviderJira VerifyActionItemTicketProvider = "Jira" )
Defines values for VerifyActionItemTicketProvider.
type VerifyRule ¶ added in v1.0.4
type VerifyRule struct {
ActionItem ActionItem `yaml:"actionItem"`
Context RuleExecutionContext `yaml:"context"`
ReportType string `yaml:"reportType"`
Script string `yaml:"script"`
}
Click to show internal directories.
Click to hide internal directories.