Documentation
¶
Overview ¶
Package secrets implements a self-contained transcript secret scanner. It is intentionally small: detection runs in-process with no external scanner binary.
Index ¶
Constants ¶
const MaxFileBytes int64 = 16 * 1024 * 1024
MaxFileBytes caps how much of any single file we load. Transcripts can grow large; we cap at 16 MiB per file to keep scanning bounded.
Variables ¶
This section is empty.
Functions ¶
func ScanTranscript ¶
ScanTranscript scans path for likely secrets and returns redacted findings. The returned bool reports whether ctx was cancelled (timeout).
We read the whole bounded buffer once so multi-line patterns (PEM blocks) match correctly. Line numbers are recovered by counting newlines up to each match offset.
Types ¶
This section is empty.