generic

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package generic provides general-purpose secret detectors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyDetector

type APIKeyDetector struct{}

APIKeyDetector detects generic API key assignments.

func (*APIKeyDetector) Description

func (d *APIKeyDetector) Description() string

func (*APIKeyDetector) EntropyBased added in v1.7.0

func (d *APIKeyDetector) EntropyBased() bool

EntropyBased marks this as a heuristic detector: it matches arbitrary high-entropy strings rather than a fixed credential format, so it opts into the engine's Shannon-entropy floor (config entropy.threshold) in addition to its own baseline filter. Structural detectors do not implement this and are never entropy-gated.

func (*APIKeyDetector) ID

func (d *APIKeyDetector) ID() string

func (*APIKeyDetector) Keywords

func (d *APIKeyDetector) Keywords() []string

func (*APIKeyDetector) Scan

func (d *APIKeyDetector) Scan(_ context.Context, data []byte) []detector.RawFinding

Scan searches the data for generic API key assignment patterns. Applies Shannon entropy filtering after regex matching; matches with entropy below minEntropy, or whose letter composition looks like natural-language text rather than random secret material, are skipped as unlikely to be real secrets.

func (*APIKeyDetector) Severity

func (d *APIKeyDetector) Severity() finding.Severity

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL