Versions in this module Expand all Collapse all v1 v1.0.0 Sep 30, 2026 Changes in this version + const SeverityCritical + const SeverityHigh + const SeverityInfo + const SeverityLow + const SeverityMedium + func DecodeBase64URL(seg string) ([]byte, error) + func EstimateLLMCost(model string, promptTokens, completionTokens int) float64 + func IsValidLuhn(number string) bool + func ParseAndInspectJWT(tokenString, requestID, url, method, location string) (*JWTDetails, []*Finding) + type ACMatch struct + EndIndex int + Signature *SecretSignature + Snippet string + type AhoCorasickMatcher struct + func NewAhoCorasickMatcher(signatures []*SecretSignature) *AhoCorasickMatcher + func (m *AhoCorasickMatcher) ScanBytes(data []byte) []ACMatch + type AhoCorasickNode struct + type AhoCorasickSecretsRule struct + func NewAhoCorasickSecretsRule() *AhoCorasickSecretsRule + func (r *AhoCorasickSecretsRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *AhoCorasickSecretsRule) Name() string + type AnalysisWorkerPool struct + func NewAnalysisWorkerPool(rb *ringbuffer.RingBuffer, engine *SecurityRulesEngine, handler ResultHandler, ...) *AnalysisWorkerPool + func (p *AnalysisWorkerPool) Start() + func (p *AnalysisWorkerPool) Stats() (analyzed uint64, findings uint64, avgScanMicroseconds float64) + func (p *AnalysisWorkerPool) Stop() + type BlocklistEntry struct + CIDR string + Category string + Description string + Severity string + type CORSRule struct + func NewCORSRule() *CORSRule + func (r *CORSRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *CORSRule) Name() string + type CookieSecurityRule struct + func NewCookieSecurityRule() *CookieSecurityRule + func (r *CookieSecurityRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *CookieSecurityRule) Name() string + type CustomRule struct + func NewCustomRule(cfg CustomRuleConfig) (*CustomRule, error) + func (r *CustomRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *CustomRule) Name() string + type CustomRuleConfig struct + Category string + Description string + Location string + Name string + Regex string + Remediation string + Severity string + type CustomRulesDocument struct + Rules []CustomRuleConfig + type Finding struct + Category string + Description string + Evidence string + ID string + Location string + Method string + Remediation string + RequestID string + RuleName string + Severity string + Timestamp time.Time + Title string + URL string + type GraphQLRule struct + func NewGraphQLRule() *GraphQLRule + func (r *GraphQLRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *GraphQLRule) Name() string + type IPBlocklistRule struct + func NewIPBlocklistRule(trie *RadixTrie) *IPBlocklistRule + func (r *IPBlocklistRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *IPBlocklistRule) Name() string + type InsecureAuthRule struct + func NewInsecureAuthRule() *InsecureAuthRule + func (r *InsecureAuthRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *InsecureAuthRule) Name() string + type JWTDetails struct + Algorithm string + ExpiresAt *time.Time + Findings []*Finding + Header map[string]interface{} + IsExpired bool + IssuedAt *time.Time + Issuer string + Payload map[string]interface{} + Raw string + Signature string + Subject string + Type string + type JWTSecurityRule struct + func NewJWTSecurityRule() *JWTSecurityRule + func (r *JWTSecurityRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *JWTSecurityRule) Name() string + type LLMCallTelemetry struct + CompletionTokens int + EstimatedCostUSD float64 + IsLocal bool + IsStreaming bool + Model string + PromptTokens int + Provider LLMProvider + TotalTokens int + type LLMProvider string + const ProviderAnthropic + const ProviderGemini + const ProviderGeneric + const ProviderGroq + const ProviderMistral + const ProviderOllama + const ProviderOpenAI + type LLMRule struct + func NewLLMRule() *LLMRule + func (r *LLMRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *LLMRule) Name() string + type PIIRule struct + func NewPIIRule() *PIIRule + func (r *PIIRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *PIIRule) Name() string + type RadixNode struct + type RadixTrie struct + func DefaultBlocklistTrie() *RadixTrie + func NewRadixTrie() *RadixTrie + func (t *RadixTrie) Insert(cidrStr string, entry *BlocklistEntry) error + func (t *RadixTrie) Lookup(ip net.IP) (*BlocklistEntry, bool) + type ResultHandler interface + HandleResult func(event *ringbuffer.TrafficEvent, findings []*Finding) + type Rule interface + Evaluate func(event *ringbuffer.TrafficEvent) []*Finding + Name func() string + func LoadCustomRulesFromFile(path string) ([]Rule, error) + func LoadCustomRulesFromYAML(data []byte) ([]Rule, error) + type SecretSignature struct + Category string + Description string + ID string + Pattern string + Remediation string + Severity string + func DefaultSecretSignatures() []*SecretSignature + type SecretsRule struct + func NewSecretsRule() *SecretsRule + func (r *SecretsRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *SecretsRule) Name() string + type SecurityHeadersRule struct + func NewSecurityHeadersRule() *SecurityHeadersRule + func (r *SecurityHeadersRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *SecurityHeadersRule) Name() string + type SecurityRulesEngine struct + func NewSecurityRulesEngine() *SecurityRulesEngine + func (e *SecurityRulesEngine) AddRule(rule Rule) + func (e *SecurityRulesEngine) AddRules(rules []Rule) + func (e *SecurityRulesEngine) Analyze(event *ringbuffer.TrafficEvent) []*Finding + type StackTraceRule struct + func NewStackTraceRule() *StackTraceRule + func (r *StackTraceRule) Evaluate(event *ringbuffer.TrafficEvent) []*Finding + func (r *StackTraceRule) Name() string