secrets

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package secrets scans text (spec bodies, API responses) for leaked credentials using the merged TruffleHog/SwaggerSpy regex corpus.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has

func Has(text string) bool

Has reports whether any secret is present (cheap path).

Types

type Finding

type Finding struct {
	Type  string `json:"type"`
	Match string `json:"match"`
}

Finding is a single secret match.

func Scan

func Scan(text string) []Finding

Scan returns all secret findings in the given text. Matches are de-duplicated per (type, value) and truncated to avoid dumping huge blobs.

Jump to

Keyboard shortcuts

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