secrets

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretFinding

type SecretFinding struct {
	Type     SecretType `json:"type"`
	Match    string     `json:"match"`
	Line     int        `json:"line"`
	Severity int        `json:"severity"`
}

type SecretType

type SecretType string
const (
	SecretAPIKey     SecretType = "api_key"
	SecretToken      SecretType = "token"
	SecretPassword   SecretType = "password"
	SecretPrivateKey SecretType = "private_key"
	SecretJWT        SecretType = "jwt"
	SecretAWS        SecretType = "aws_key"
	SecretGitHub     SecretType = "github_token"
	SecretSlack      SecretType = "slack_token"
)

type SecretsDetector

type SecretsDetector struct {
	// contains filtered or unexported fields
}

func NewSecretsDetector

func NewSecretsDetector() *SecretsDetector

func (*SecretsDetector) Detect

func (d *SecretsDetector) Detect(input string) []SecretFinding

func (*SecretsDetector) HasSecrets

func (d *SecretsDetector) HasSecrets(input string) bool

func (*SecretsDetector) Redact

func (d *SecretsDetector) Redact(input string) string

Jump to

Keyboard shortcuts

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