// Package importer provides adapters that parse output from external secret // scanners (TruffleHog, Gitleaks, ...) and normalize them into KeyHunter's // engine.Finding model so they can be inserted into the unified storage layer. package importer import ( "io" "github.com/salvacybersec/keyhunter/pkg/engine" ) // Importer parses output from an external secret scanner and returns // normalized engine.Finding records. Implementations must be stateless // and safe for reuse across calls. type Importer interface { // Name returns the short identifier of the source format // (e.g. "trufflehog", "gitleaks"). Used by the CLI --format flag. Name() string // Import reads scanner output from r and returns the normalized findings. // Implementations should return a wrapped error on malformed input and an // empty slice with nil error on empty input. Import(r io.Reader) ([]engine.Finding, error) }