Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/security / / containsPii

Function: containsPii()

ts
function containsPii(text, patterns?): boolean;

Defined in: packages/security/src/guardrails/builtins/pii-detection.ts:102

SDF-8 / FIDES-lattice: does text contain any catalogued PII (email, SSN, phone, Luhn-valid card, …)? A pure, allocation-light predicate that returns on the first valid match and honours per-pattern validate (e.g. Luhn). Used to feed user/PII content into the dataflow taint ledger's sensitiveSeen leg so PII exfiltration trips the lethal-trifecta gate even without a 'secret' tag.

Parameters

ParameterTypeDefault value
textstringundefined
patternsreadonly PiiPattern[]DEFAULT_PII_PATTERNS

Returns

boolean

Stable