Skip to main content

Module token

Module token 

Source
Expand description

Well-known token formats with a vendor prefix, and the services they belong to.

The same shapes as openmoat_audit::redact::TOKEN_SHAPES, which masks them with regular expressions before anything is stored; core has no regex engine, so each shape is matched here by hand with the same rules (a test in openmoat-audit keeps the two in step). Only prefixed formats: no entropy guessing, so a commit SHA, a UUID or a base64 blob is never one.

Structs§

Shape
One token format: \b<prefix><body>{min,max}\b in regex terms.

Constants§

SHAPES
Every shape, in the order of TOKEN_SHAPES.

Functions§

find
The first shape, in SHAPES order, that occurs in text.
shapes_in
Every shape that occurs in text.