Versions in this module Expand all Collapse all v0 v0.1.0 Aug 21, 2026 Changes in this version + type Config struct + DatabaseSafety *DatabaseSafetyConfig + ExcludeComponents []string + ExcludePatterns []string + ExcludeTypes []string + IncludeComponents []string + IncludePatterns []string + IncludeTypes []string + Mode Mode + PromptInjection *PromptInjectionConfig + SecretScan *SecretScanConfig + TokenBudget *TokenBudgetConfig + Version int + type DatabaseSafetyConfig struct + AllowedPatterns []string + BlockedPatterns []string + Disabled bool + ToolPatterns []string + type Detector interface + Inspect func(req *Request) *Verdict + Name func() string + Priority func() int + Stages func() []enforce.Stage + type Engine struct + func New(cfg Config) (*Engine, error) + func NewEngine(mode Mode, sc scope, detectors []Detector) *Engine + func (e *Engine) Detectors() []string + func (e *Engine) Evaluate(req Request) Verdict + func (e *Engine) Mode() Mode + type Mode string + const ModeAudit + const ModeEnforce + const ModeOff + const ModeWarn + type PromptInjectionConfig struct + BlockThreshold Severity + Disabled bool + ExtraPatterns []string + type Request struct + ComponentName string + ComponentType string + Content string + SessionID string + Stage enforce.Stage + Tokens int + type SecretScanConfig struct + Disabled bool + ExtraPatterns []string + type Severity string + const SeverityCritical + const SeverityHigh + const SeverityLow + const SeverityMedium + func (s Severity) AtLeast(min Severity) bool + type TokenBudgetConfig struct + Disabled bool + MaxTokens int + type Verdict struct + Action enforce.Action + Detector string + Matched string + Message string + Reason string + Severity Severity