Documentation
¶
Overview ¶
Code generated by github.com/reflective-technology/cybereyes-cef/alert/codegen, DO NOT EDIT.
Code generated by github.com/reflective-technology/cybereyes-cef/alert/codegen, DO NOT EDIT.
Code generated by github.com/reflective-technology/cybereyes-cef/alert/codegen, DO NOT EDIT.
Code generated by github.com/reflective-technology/cybereyes-cef/alert/codegen, DO NOT EDIT.
Code generated by github.com/reflective-technology/cybereyes-cef/alert/codegen, DO NOT EDIT.
Code generated by github.com/reflective-technology/cybereyes-cef/alert/codegen, DO NOT EDIT.
Code generated by github.com/reflective-technology/cybereyes-cef/alert/codegen, DO NOT EDIT.
Index ¶
- Variables
- func DefaultSeverityPoint(severity string) (int, error)
- func MapGeneralFieldsToCefStandardFields(field string) (string, bool)
- func ResolveCEFSeverity(meta AlertMetaField) (string, error)
- func ResolveCef(alertMeta AlertMetaField, vendorConfig VendorConfig, ...) (string, error)
- func SyslogRFC3164WithCef(alert Alert, param ToSyslogRFC3164WithCefParam) (string, error)
- func UserDefinedFieldName(name string, vendorAbbreviation string) (string, error)
- func VendorBasedExtensionsKeySortFunc(vendorConfig VendorConfig) func(keys []string)
- func VendorBasedPriority(field string, vendorAbbreviation string) int
- type Alert
- type AlertMetaField
- type AlertSeverity
- type AuditdLinuxAlert
- type ExtensionsPipeline
- func EnhanceExtensionsFromAuditdLinuxFields(fields types.AuditdLinux, vendorAbbreviation string) ExtensionsPipeline
- func EnhanceExtensionsFromFirewallFields(fields types.Firewall, vendorAbbreviation string) ExtensionsPipeline
- func EnhanceExtensionsFromGeneralFields(generalFields map[string]string, vendorAbbreviation string) ExtensionsPipeline
- func EnhanceExtensionsFromIpsFields(fields types.Ips, vendorAbbreviation string) ExtensionsPipeline
- func EnhanceExtensionsFromWebApplicationFirewallFields(fields types.WebApplicationFirewall, vendorAbbreviation string) ExtensionsPipeline
- func EnhanceExtensionsFromWebFields(fields types.Web, vendorAbbreviation string) ExtensionsPipeline
- func EnhanceExtensionsFromWindowsEventsApplicationFields(fields types.WindowsEventsApplication, vendorAbbreviation string) ExtensionsPipeline
- func EnhanceExtensionsFromWindowsEventsSecurityFields(fields types.WindowsEventsSecurity, vendorAbbreviation string) ExtensionsPipeline
- func EnhanceExtensionsWithAlertMeta(meta AlertMetaField) ExtensionsPipeline
- func EnhanceExtensionsWithHostname(hostname string) ExtensionsPipeline
- type FirewallAlert
- type IpsAlert
- type RawAlert
- type RawAlertParam
- type ToCefParam
- type ToSyslogRFC3164WithCefParam
- type VendorConfig
- type WebAlert
- type WebApplicationFirewallAlert
- type WindowsEventsApplicationAlert
- type WindowsEventsSecurityAlert
Constants ¶
This section is empty.
Variables ¶
var (
ErrExtensionIsNil = errors.New("extension is nil")
)
Functions ¶
func DefaultSeverityPoint ¶
this function take the intersection of cef standard severity point and general fields severity point as the default severity point cef standard severity point: 0-3=Low, 4-6=Medium, 7-8=High, and 9-10=Very-High. general fields severity point: 1=info, 2=low, 3,4,5,6,7=medium, 8,9=high, 10=critical
func ResolveCEFSeverity ¶
func ResolveCEFSeverity(meta AlertMetaField) (string, error)
ResolveSeverity converts the alert severity to CEF severity header field
According to cef-implementation-standard.pdf (https://www.microfocus.com/documentation/arcsight/arcsight-smartconnectors-8.4/pdfdoc/cef-implementation-standard/cef-implementation-standard.pdf_ agentSeverity is a string or integer and it reflects the importance of the event. - The valid string values are: Unknown, Low, Medium, High, and Very-High. - The valid integer values are: 0-3=Low, 4-6=Medium, 7-8=High, and 9-10=Very-High.
func ResolveCef ¶
func ResolveCef(alertMeta AlertMetaField, vendorConfig VendorConfig, pipelines ...ExtensionsPipeline) (string, error)
func SyslogRFC3164WithCef ¶
func SyslogRFC3164WithCef(alert Alert, param ToSyslogRFC3164WithCefParam) (string, error)
func UserDefinedFieldName ¶
Convert the field name to camel case and prefix with vendor abbreviation
func VendorBasedExtensionsKeySortFunc ¶
func VendorBasedExtensionsKeySortFunc(vendorConfig VendorConfig) func(keys []string)
func VendorBasedPriority ¶
Define priority levels for different field types
Types ¶
type Alert ¶
type Alert interface {
ToSyslogRFC3164WithCef(param ToSyslogRFC3164WithCefParam) (string, error)
ToCef(param ToCefParam) (string, error)
}
type AlertMetaField ¶
type AlertSeverity ¶
type AlertSeverity string
const ( AlertSeverityInfo AlertSeverity = "info" AlertSeverityLow AlertSeverity = "low" AlertSeverityMedium AlertSeverity = "medium" AlertSeverityHigh AlertSeverity = "high" AlertSeverityCritical AlertSeverity = "critical" )
type AuditdLinuxAlert ¶
type AuditdLinuxAlert struct {
AlertMetaField
AuditdLinuxFields types.AuditdLinux
}
func (*AuditdLinuxAlert) ToCef ¶
func (alert *AuditdLinuxAlert) ToCef(param ToCefParam) (string, error)
func (*AuditdLinuxAlert) ToSyslogRFC3164WithCef ¶
func (alert *AuditdLinuxAlert) ToSyslogRFC3164WithCef(param ToSyslogRFC3164WithCefParam) (string, error)
type ExtensionsPipeline ¶
func EnhanceExtensionsFromAuditdLinuxFields ¶
func EnhanceExtensionsFromAuditdLinuxFields(fields types.AuditdLinux, vendorAbbreviation string) ExtensionsPipeline
func EnhanceExtensionsFromFirewallFields ¶
func EnhanceExtensionsFromFirewallFields(fields types.Firewall, vendorAbbreviation string) ExtensionsPipeline
func EnhanceExtensionsFromGeneralFields ¶
func EnhanceExtensionsFromGeneralFields(generalFields map[string]string, vendorAbbreviation string) ExtensionsPipeline
func EnhanceExtensionsFromIpsFields ¶
func EnhanceExtensionsFromIpsFields(fields types.Ips, vendorAbbreviation string) ExtensionsPipeline
func EnhanceExtensionsFromWebApplicationFirewallFields ¶
func EnhanceExtensionsFromWebApplicationFirewallFields(fields types.WebApplicationFirewall, vendorAbbreviation string) ExtensionsPipeline
func EnhanceExtensionsFromWebFields ¶
func EnhanceExtensionsFromWebFields(fields types.Web, vendorAbbreviation string) ExtensionsPipeline
func EnhanceExtensionsFromWindowsEventsApplicationFields ¶
func EnhanceExtensionsFromWindowsEventsApplicationFields(fields types.WindowsEventsApplication, vendorAbbreviation string) ExtensionsPipeline
func EnhanceExtensionsFromWindowsEventsSecurityFields ¶
func EnhanceExtensionsFromWindowsEventsSecurityFields(fields types.WindowsEventsSecurity, vendorAbbreviation string) ExtensionsPipeline
func EnhanceExtensionsWithAlertMeta ¶
func EnhanceExtensionsWithAlertMeta(meta AlertMetaField) ExtensionsPipeline
func EnhanceExtensionsWithHostname ¶
func EnhanceExtensionsWithHostname(hostname string) ExtensionsPipeline
type FirewallAlert ¶
type FirewallAlert struct {
AlertMetaField
FirewallFields types.Firewall
}
func (*FirewallAlert) ToCef ¶
func (alert *FirewallAlert) ToCef(param ToCefParam) (string, error)
func (*FirewallAlert) ToSyslogRFC3164WithCef ¶
func (alert *FirewallAlert) ToSyslogRFC3164WithCef(param ToSyslogRFC3164WithCefParam) (string, error)
type IpsAlert ¶
type IpsAlert struct {
AlertMetaField
IpsFields types.Ips
}
func (*IpsAlert) ToSyslogRFC3164WithCef ¶
func (alert *IpsAlert) ToSyslogRFC3164WithCef(param ToSyslogRFC3164WithCefParam) (string, error)
type RawAlert ¶
type RawAlert struct {
Meta AlertMetaField
// contains filtered or unexported fields
}
func NewRawAlert ¶
func NewRawAlert(param RawAlertParam) *RawAlert
func (*RawAlert) ToCef ¶
func (alert *RawAlert) ToCef(param ToCefParam) (string, error)
ToCEF converts the alert to CEF format there are three segments in the CEF format 1. cef standard fields 2. custom labels and values 3. user defined fields
func (*RawAlert) ToSyslogRFC3164WithCef ¶
func (alert *RawAlert) ToSyslogRFC3164WithCef(param ToSyslogRFC3164WithCefParam) (string, error)
type RawAlertParam ¶
type RawAlertParam struct {
Meta AlertMetaField
GeneralFields map[string]string
}
type ToCefParam ¶
type ToCefParam struct {
VendorConfig VendorConfig
Hostname string
}
type ToSyslogRFC3164WithCefParam ¶
type ToSyslogRFC3164WithCefParam struct {
VendorConfig VendorConfig
Hostname string
Timestamp time.Time
Priority uint8
}
type VendorConfig ¶
type VendorConfig struct {
VendorName string
ProductName string
ProductVersion string
Abbreviation string
}
var (
VendorReflective VendorConfig = VendorConfig{
VendorName: "Reflective",
ProductName: "CyberEyes",
ProductVersion: "3",
Abbreviation: "CE",
}
)
type WebAlert ¶
type WebAlert struct {
AlertMetaField
WebFields types.Web
}
func (*WebAlert) ToSyslogRFC3164WithCef ¶
func (alert *WebAlert) ToSyslogRFC3164WithCef(param ToSyslogRFC3164WithCefParam) (string, error)
type WebApplicationFirewallAlert ¶
type WebApplicationFirewallAlert struct {
AlertMetaField
WebApplicationFirewallFields types.WebApplicationFirewall
}
func (*WebApplicationFirewallAlert) ToCef ¶
func (alert *WebApplicationFirewallAlert) ToCef(param ToCefParam) (string, error)
func (*WebApplicationFirewallAlert) ToSyslogRFC3164WithCef ¶
func (alert *WebApplicationFirewallAlert) ToSyslogRFC3164WithCef(param ToSyslogRFC3164WithCefParam) (string, error)
type WindowsEventsApplicationAlert ¶
type WindowsEventsApplicationAlert struct {
AlertMetaField
WindowsEventsApplicationFields types.WindowsEventsApplication
}
func (*WindowsEventsApplicationAlert) ToCef ¶
func (alert *WindowsEventsApplicationAlert) ToCef(param ToCefParam) (string, error)
func (*WindowsEventsApplicationAlert) ToSyslogRFC3164WithCef ¶
func (alert *WindowsEventsApplicationAlert) ToSyslogRFC3164WithCef(param ToSyslogRFC3164WithCefParam) (string, error)
type WindowsEventsSecurityAlert ¶
type WindowsEventsSecurityAlert struct {
AlertMetaField
WindowsEventsSecurityFields types.WindowsEventsSecurity
}
func (*WindowsEventsSecurityAlert) ToCef ¶
func (alert *WindowsEventsSecurityAlert) ToCef(param ToCefParam) (string, error)
func (*WindowsEventsSecurityAlert) ToSyslogRFC3164WithCef ¶
func (alert *WindowsEventsSecurityAlert) ToSyslogRFC3164WithCef(param ToSyslogRFC3164WithCefParam) (string, error)