secretscan

package
v0.2.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package secretscan recognizes common secret shapes in free text.

It is deliberately conservative -- keyword and shape based -- so it does not mangle ordinary tool output or refuse ordinary prose. Nothing here proves text is safe: a scanner that found nothing has found nothing, not established that a string holds no credential. Both callers treat it that way. The run trace redacts what it recognizes and still bounds and scopes what it writes; project memory refuses a write it recognizes and still tells the agent that not persisting credentials is its own contract.

Grow the pattern set here rather than in either caller, so what the two recognize cannot drift apart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Findings

func Findings(s string) []string

Findings names the secret shapes recognized in s, in the order the patterns are declared and without repeats. It returns the names rather than the matches so a caller can say what it refused without quoting the credential back into a log, an error, or a model's context.

func Redact

func Redact(s string) string

Redact returns s with recognized secret values replaced by a marker. Empty input is returned unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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