Documentation
¶
Overview ¶
Package scanner detects secrets in blob bytes without traversing repositories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Config overrides the default corpus. Do not modify it after New.
Config *config.Config
// Validation enables outbound credential checks only when Enabled is true.
Validation detect.ValidationOptions
RuleTimings *detect.RuleTimingCollector
}
Options configures a scanner. The zero value uses the embedded corpus locally.
type Result ¶
Result contains findings and whether text passed the prefilter. Binary blobs have Scanned false but can still produce path-only findings.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner shares its compiled rules and prefilter across concurrent Scan calls. Close it after use to release its resources.
func New ¶
New constructs a scanner once for any number of blobs. Canceling ctx cancels detection and validation in all Scan calls.
func (*Scanner) Close ¶
Close cancels active scans and releases scanner resources. It is idempotent.
Click to show internal directories.
Click to hide internal directories.