Documentation
¶
Overview ¶
Package secretscan finds credentials in text the platform is about to keep or send somewhere (#2820, and #2800's skill promotion after it).
The audit sanitizer is key-based: it knows a "password" parameter is one. Text an agent writes in its own words has no keys, so this reads the text itself, two ways:
- credential shapes: a PEM private key, a bearer token, a provider token with its well-known prefix, a JSON Web Token, credentials written into a URL, and a password-, secret- or token-style assignment;
- the deployment's own secret values (stored secrets and encrypted connection fields), as written and in the encodings a value is carried in: base64, hex, URL-escaped and JSON-escaped.
A finding names the field and the kind of match, never the value, so a refusal built from it repeats nothing it found.
Index ¶
Constants ¶
const ( KindPrivateKey = "a private key" KindBearer = "a bearer token" KindToken = "an access token" KindJWT = "a signed web token" KindURLCreds = "credentials in a URL" KindAssignment = "a password or secret assignment" KindKnown = "a secret this deployment stores" )
Kinds of finding.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// Known is the deployment's own secret values; nil checks shapes alone.
Known Known
}
Detector finds credentials in fields.