Versions in this module Expand all Collapse all v1 v1.5.0 Apr 2, 2026 v0 v0.28.0 Apr 16, 2026 Changes in this version + const SeverityCritical + const SeverityHigh + const SeverityLow + const SeverityMedium + func HasHiddenUnicode(s string) bool + func IsPrintableASCII(s string) bool + func IsSuspiciousContent(content string) bool + func RedactWithMask(content string, mask rune) string + func SanitizeForLogging(content string) string + func ValidateUTF8(content string) bool type Finding + Position int + func ValidateContent(content string) (bool, []Finding) + type ScanRule struct + Description string + Name string + Pattern *regexp.Regexp + Severity string type Scanner + func (s *Scanner) HasCriticalFindings(content string) bool + func (s *Scanner) ScanWithRedaction(content string) (string, []Finding) + type Validator struct + func NewValidator() *Validator + func (v *Validator) ValidateBudget(budget int) error + func (v *Validator) ValidateMode(mode string) error + func (v *Validator) ValidatePath(path string) error + func (v *Validator) ValidatePreset(preset string) error v0.1.0 Apr 6, 2026 Changes in this version + func RedactPII(content string) string + type ContentGuardrails struct + func NewContentGuardrails() *ContentGuardrails + func (cg *ContentGuardrails) Check(content string) []SecurityAlert + type DecisionExplainability struct + func NewDecisionExplainability() *DecisionExplainability + func NewDecisionExplainabilityWithLimit(maxSize int) *DecisionExplainability + func (de *DecisionExplainability) GetDecisions() []DecisionRecord + func (de *DecisionExplainability) Record(action, reason string, evidence []string, confidence float64) + type DecisionRecord struct + Action string + Confidence float64 + Evidence []string + Reason string + Timestamp time.Time + type EBPFMonitor struct + func NewEBPFMonitor() *EBPFMonitor + func (m *EBPFMonitor) CheckSyscall(syscall string, args string) *SecurityAlert + func (m *EBPFMonitor) Enable() error + type Finding struct + Line int + Match string + Message string + Rule string + Severity string + func DetectPromptInjection(content string) []Finding + func DetectSecrets(content string) []Finding + type FirewallRule struct + Action string + DestDomain string + DestIP string + Port int + Protocol string + type GuardrailRule struct + Action string + Name string + Pattern string + type InjectionDetector struct + func NewInjectionDetector() *InjectionDetector + func (d *InjectionDetector) AddPattern(injectionType InjectionType, pattern string) error + func (d *InjectionDetector) Detect(content string) []InjectionPattern + func (d *InjectionDetector) Disable(injectionType InjectionType) + func (d *InjectionDetector) Enable(injectionType InjectionType) + func (d *InjectionDetector) IsSafe(content string) bool + func (d *InjectionDetector) Sanitize(content string) string + func (d *InjectionDetector) Scan(content string) ScanResult + func (d *InjectionDetector) SetScoreThreshold(injectionType InjectionType, score float64) + type InjectionPattern struct + Confidence float64 + MatchedText string + Position int + Severity string + Type InjectionType + type InjectionType string + const InjectionContextShift + const InjectionDataExtraction + const InjectionIndirect + const InjectionJailbreak + const InjectionRolePlay + const InjectionSystemPrompt + type NetworkFirewall struct + func NewNetworkFirewall() *NetworkFirewall + func (nf *NetworkFirewall) AddRule(rule FirewallRule) + func (nf *NetworkFirewall) CheckConnection(destIP string, port int, protocol string) bool + type PIIDetector struct + func NewPIIDetector() *PIIDetector + func (d *PIIDetector) AddPattern(name, pattern string) error + func (d *PIIDetector) Detect(content string) []PIIPattern + func (d *PIIDetector) Disable(patternType string) + func (d *PIIDetector) Enable(patternType string) + func (d *PIIDetector) GetPatternNames() []string + func (d *PIIDetector) HasPII(content string) bool + func (d *PIIDetector) IsEnabled(patternType string) bool + func (d *PIIDetector) Redact(content string) string + func (d *PIIDetector) RedactWithOptions(content string, opts RedactOptions) string + func (d *PIIDetector) RemovePattern(name string) + func (d *PIIDetector) Scan(content string) PIIScanResult + type PIIPattern struct + Length int + Pattern string + Position int + Type string + Value string + type PIIScanResult struct + Findings []PIIPattern + HasPII bool + Redacted string + type RedactOptions struct + Mask bool + Replacement string + Types []string + type Rule struct + Description string + Name string + Pattern *regexp.Regexp + Severity string + type SIEMIntegration struct + func NewSIEMIntegration(endpoint string) (*SIEMIntegration, error) + func (si *SIEMIntegration) FormatOCSF(alert SecurityAlert) string + type ScanResult struct + Detections []InjectionPattern + Safe bool + Score float64 + Severity string + type Scanner struct + func NewScanner() *Scanner + func (s *Scanner) Scan(content string) []Finding + type SecurityAlert struct + Details string + Message string + Severity string + Timestamp time.Time + Type string