Documentation
¶
Index ¶
- Constants
- Variables
- func ParseCres(data []byte) (map[string]ParseCreT, error)
- type EventT
- type FieldT
- type MatcherT
- type NegateOptsT
- type NodeMetadataT
- type NodeT
- type NodeTypeT
- type ParseApplicationT
- type ParseCreT
- type ParseEventT
- type ParseNegateOptsT
- type ParseRuleDataT
- type ParseRuleMetadataT
- type ParseRuleT
- type ParseSequenceT
- type ParseSetT
- type ParseTermT
- type RulesT
- type TermsT
- type TreeT
Constants ¶
View Source
const ( SeverityCritical = 0 SeverityHigh = 1 SeverityMedium = 2 SeverityLow = 3 SeverityInfo = 4 )
Variables ¶
View Source
var ( ErrNotSupported = errors.New("not supported") ErrTermNotFound = errors.New("term not found") ErrMissingOrder = errors.New("sequence missing order") ErrMissingMatch = errors.New("set missing match") ErrInvalidSet = errors.New("invalid set") ErrInvalidSeq = errors.New("invalid sequence") )
Functions ¶
Types ¶
type NegateOptsT ¶
type NodeMetadataT ¶
type NodeT ¶
type NodeT struct {
Metadata NodeMetadataT `json:"metadata"`
NegIdx int `json:"neg_idx"`
Children []any `json:"children"`
}
type ParseApplicationT ¶
type ParseApplicationT struct {
Name string `yaml:"name,omitempty" json:"name,omitempty"`
ProcessName string `yaml:"processName,omitempty" json:"process_name,omitempty"`
ProcessPath string `yaml:"processPath,omitempty" json:"process_path,omitempty"`
ContainerName string `yaml:"containerName,omitempty" json:"container_name,omitempty"`
ImageUrl string `yaml:"imageUrl,omitempty" json:"image_url,omitempty"`
RepoUrl string `yaml:"repoUrl,omitempty" json:"repo_url,omitempty"`
Version string `yaml:"version,omitempty" json:"version,omitempty"`
}
type ParseCreT ¶
type ParseCreT struct {
Id string `yaml:"id,omitempty" json:"id,omitempty"`
Severity uint `yaml:"severity,omitempty" json:"severity,omitempty"`
Title string `yaml:"title,omitempty" json:"title,omitempty"`
Category string `yaml:"category,omitempty" json:"category,omitempty"`
Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"`
Author string `yaml:"author,omitempty" json:"author,omitempty"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Impact string `yaml:"impact,omitempty" json:"impact,omitempty"`
Cause string `yaml:"cause,omitempty" json:"cause,omitempty"`
Mitigation string `yaml:"mitigation,omitempty" json:"mitigation,omitempty"`
References []string `yaml:"references,omitempty" json:"references,omitempty"`
Reports uint `yaml:"reports,omitempty" json:"reports,omitempty"`
Applications []ParseApplicationT `yaml:"applications,omitempty" json:"applications,omitempty"`
}
type ParseEventT ¶
type ParseNegateOptsT ¶
type ParseRuleDataT ¶
type ParseRuleDataT struct {
Sequence *ParseSequenceT `yaml:"sequence,omitempty"`
Set *ParseSetT `yaml:"set,omitempty"`
}
type ParseRuleMetadataT ¶
type ParseRuleMetadataT struct {
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Id string `yaml:"id,omitempty" json:"id,omitempty"`
Hash string `yaml:"hash,omitempty" json:"hash,omitempty"`
Gen uint `yaml:"generation,omitempty" json:"generation,omitempty"`
Kind string `yaml:"kind,omitempty" json:"kind,omitempty"`
Version string `yaml:"version,omitempty" json:"version,omitempty"`
}
type ParseRuleT ¶
type ParseRuleT struct {
Metadata ParseRuleMetadataT `yaml:"metadata,omitempty" json:"metadata,omitempty"`
Cre ParseCreT `yaml:"cre,omitempty" json:"cre,omitempty"`
Rule ParseRuleDataT `yaml:"rule,omitempty" json:"rule,omitempty"`
}
type ParseSequenceT ¶
type ParseSequenceT struct {
Window string `yaml:"window"`
Correlations []string `yaml:"correlations,omitempty"`
Event *ParseEventT `yaml:"event,omitempty"`
Origin bool `yaml:"origin,omitempty"`
Order []ParseTermT `yaml:"order,omitempty"`
Negate []ParseTermT `yaml:"negate,omitempty"`
}
type ParseSetT ¶
type ParseSetT struct {
Window string `yaml:"window,omitempty"`
Correlations []string `yaml:"correlations,omitempty"`
Event *ParseEventT `yaml:"event,omitempty"`
Match []ParseTermT `yaml:"match,omitempty"`
Negate []ParseTermT `yaml:"negate,omitempty"`
}
type ParseTermT ¶
type ParseTermT struct {
Field string `yaml:"field,omitempty"`
StrValue string `yaml:"value,omitempty"`
JqValue string `yaml:"jq,omitempty"`
RegexValue string `yaml:"regex,omitempty"`
Count int `yaml:"count,omitempty"`
Set *ParseSetT `yaml:"set,omitempty"`
Sequence *ParseSequenceT `yaml:"sequence,omitempty"`
NegateOpts *ParseNegateOptsT `yaml:",inline,omitempty"`
}
func (*ParseTermT) UnmarshalYAML ¶
func (o *ParseTermT) UnmarshalYAML(unmarshal func(any) error) error
type RulesT ¶
type RulesT struct {
Rules []ParseRuleT `yaml:"rules"`
Terms map[string]ParseTermT `yaml:"terms"`
}
Click to show internal directories.
Click to hide internal directories.