events

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventTypes = []string{
	"execution",
	"fork",
	"exit",
	"close",
	"rename",
	"unlink",
	"link",
	"exchangedata",
	"disk",
	"bundle",
	"allowlist",
	"file_access",
	"codesigning_invalidated",
	"login_window_session",
	"login_logout",
	"screen_sharing",
	"open_ssh",
	"authentication",
	"clone",
	"copyfile",
	"gatekeeper_override",
	"launch_item",
	"tcc_modification",
	"xprotect",
}

EventTypes lists all Santa event types NOTE: This must be kept in sync with the protobuf message types

Functions

func ActorIsPlatformBinary

func ActorIsPlatformBinary(msg *santapb.SantaMessage) bool

ActorIsPlatformBinary indicates whether the instigator is a platform binary.

func ActorPath

func ActorPath(msg *santapb.SantaMessage) string

ActorPath extracts the instigator path.

func ActorSigningID

func ActorSigningID(msg *santapb.SantaMessage) string

ActorSigningID extracts the instigator signing identifier. NOTE: Only works for FileAccess events - Execution instigators use ProcessInfoLight which lacks code signature.

func ActorTeam

func ActorTeam(msg *santapb.SantaMessage) string

ActorTeam extracts the instigator team identifier when available. NOTE: Only works for FileAccess events - Execution instigators use ProcessInfoLight which lacks code signature.

func BuildActivation

func BuildActivation(msg *santapb.SantaMessage, eventMap map[string]any)

BuildActivation enriches the eventMap in-place with metadata fields needed for CEL evaluation. This modifies the input map to avoid unnecessary allocations. The eventMap must already contain the protobuf data from ToMap().

func Decision

func Decision(msg *santapb.SantaMessage) string

Decision returns a string representation of the allow/deny outcome for the event.

func DecodedArgs added in v0.1.1

func DecodedArgs(msg *santapb.SantaMessage) []string

DecodedArgs returns decoded args for execution events, empty list otherwise. Args from Santa are already decoded as [][]byte, so we just convert to []string.

func EventTime

func EventTime(msg *santapb.SantaMessage) time.Time

EventTime returns the event timestamp, or zero if missing.

func ExtractField

func ExtractField(event map[string]any, field string) string

ExtractField walks a dotted path within the event map and returns the value as string.

func Kind

func Kind(msg *santapb.SantaMessage) string

Kind returns the lower-case event type name for a Santa message.

func KindFromMap

func KindFromMap(evt map[string]any) string

KindFromMap returns the lower-case event type name for an event map produced by ToMap. It checks for known top-level keys.

func Mode

func Mode(msg *santapb.SantaMessage) string

Mode returns the Santa mode (monitor/lockdown) when available.

func Reason

func Reason(msg *santapb.SantaMessage) string

Reason returns the Santa reason for execution events.

func TargetPath

func TargetPath(msg *santapb.SantaMessage) string

TargetPath extracts a human-readable target path.

func TargetSHA256

func TargetSHA256(msg *santapb.SantaMessage) string

TargetSHA256 returns the hash identifier for the event target when available.

func TargetSigningID

func TargetSigningID(msg *santapb.SantaMessage) string

TargetSigningID extracts the target signing identifier.

func TargetTeam

func TargetTeam(msg *santapb.SantaMessage) string

TargetTeam extracts the target team identifier.

func ToMap

func ToMap(msg *santapb.SantaMessage) (map[string]any, error)

ToMap converts a SantaMessage to a map suitable for CEL evaluation.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL