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
Click to show internal directories.
Click to hide internal directories.