Documentation
¶
Rendered for darwin/amd64
Overview ¶
Package violation reads App Sandbox violation (deny) records from the macOS unified log (subsystem com.apple.sandbox.reporting, category violation).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLogStore = errors.New("unified log store error")
ErrLogStore is returned when the unified log store cannot be queried.
Functions ¶
This section is empty.
Types ¶
type Violation ¶
type Violation struct {
// Time is when the violation was logged.
Time time.Time
// Process and PID identify the offending process (best-effort).
Process string
PID int
// Operation is the denied sandbox operation, e.g. "network-outbound".
Operation string
// Path is the resource the operation targeted, when the message includes one.
Path string
// Message is the full composed log message, preserved verbatim.
Message string
}
A Violation is one App Sandbox denial recorded in the unified log.
func RecentViolations ¶
RecentViolations returns App Sandbox violations logged within the last since duration, up to maxRows entries (most recent window first). It reads the local unified log store, so it observes violations from any process on the system, not only the current one. A non-positive maxRows uses a default cap.
Click to show internal directories.
Click to hide internal directories.