detector

package
v0.0.0-...-68f985e Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShannonEntropy

func ShannonEntropy(s string) float64

ShannonEntropy calculates the Shannon entropy of a string A random string like a token has high entropy (close to 4-5 for base64) A normal string like a word has low entropy

Types

type Finding

type Finding struct {
	Line    int
	Content string
	Reason  string
}

Finding represents a detected secret

func ScanContent

func ScanContent(content string) []Finding

ScanContent analyzes file content and returns any findings

Jump to

Keyboard shortcuts

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