Documentation
¶
Overview ¶
Package security provides semantic convention constants and helpers for AI security observability (tiers, validators, actions, shadow mode).
Index ¶
Constants ¶
View Source
const ( Tier = "ai.security.tier" Validator = "ai.security.validator" Action = "ai.security.action" ShadowMode = "ai.security.shadow_mode" Score = "ai.security.score" Reason = "ai.security.reason" )
Security semantic convention attribute keys for traces and events.
View Source
const ( ActionPass = "pass" ActionBlock = "block" ActionRedact = "redact" )
Standard values for Action.
Variables ¶
View Source
var ( TierKey = attribute.Key(Tier) ValidatorKey = attribute.Key(Validator) ActionKey = attribute.Key(Action) ShadowModeKey = attribute.Key(ShadowMode) ScoreKey = attribute.Key(Score) ReasonKey = attribute.Key(Reason) )
Attribute keys as attribute.Key for type-safe span/event recording.
Functions ¶
func RecordSecurityEvent ¶
RecordSecurityEvent adds a "Security Intervention" event to the span from ctx with action, validator, reason and shadow-mode attributes. Use for compliance and audit logging. If ctx has no span, the call is a no-op.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.