Documentation
¶
Overview ¶
Package secrets provides secret-detection utilities shared across the codebase.
Used by:
- brain/ingestor: scrub code before sending to the local LLM
- federation/tracker_brain: filter secrets from cross-project code analysis
Keeping detection logic in one place ensures consistent coverage and prevents pattern drift between consumers (value 2: user data never leaks).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterLines ¶
FilterLines removes lines that look like they contain secrets from content. Also strips entire PEM blocks (BEGIN to END markers inclusive).
func LooksLikeSecret ¶
LooksLikeSecret returns true if the line likely contains a secret value. Two-phase approach: cheap substring scan (fast-path), then regex for nuanced detection across all assignment styles (code, YAML, JSON, connection strings).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.