Documentation
¶
Overview ¶
Package testutil provides shared helpers for detector tests. It exercises the real matcher -> Scan path so tests can prove that a detector's keywords (or lack thereof) actually let the matcher gate select the detector at runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScanViaMatcher ¶
func ScanViaMatcher(det detector.Detector, data []byte) []detector.RawFinding
ScanViaMatcher runs det through the real Aho-Corasick matcher gate before calling Scan, mirroring the engine pipeline. It returns the findings only if the matcher actually selected det for the given data; if the matcher gates the detector out, an empty slice is returned even when the regex would have matched. This makes keyword/regex misalignment visible in tests.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.