securityaudit

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Emit

func Emit(evt Event)

Emit sends a security event to the configured sink. Emission is best-effort and never panics.

func SetSink

func SetSink(s Sink)

SetSink installs a sink for security events. Passing nil restores the no-op sink.

Types

type Event

type Event struct {
	At          time.Time         `json:"at"`
	Type        EventType         `json:"type"`
	Component   string            `json:"component,omitempty"`
	Name        string            `json:"name,omitempty"`
	Description string            `json:"description,omitempty"`
	Attrs       map[string]string `json:"attrs,omitempty"`
}

Event is a structured security audit event.

type EventType

type EventType string

EventType identifies a security-relevant event category.

const (
	EventUnpinnedExecution EventType = "unpinned_execution"
	EventInsecureBypass    EventType = "insecure_bypass"
	EventVerificationFail  EventType = "verification_failure"
	EventSSRFBlockedURL    EventType = "ssrf_blocked_url"
	EventResultBackfilled  EventType = "result_backfilled"
)

type Sink

type Sink interface {
	HandleSecurityEvent(Event)
}

Sink receives emitted audit events.

Jump to

Keyboard shortcuts

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