Skip to content

PiiPatterns

Namespace AgentPrism · Assembly AgentPrism.Core.dll

The built-in pattern families for PatternContentGuard.

[Flags]
public enum PiiPatterns

CreditCard = 4

A credit card number. It uses Luhn validation.

A plain \d{16} match would mask every order number and make the guard impractical to use.

Email = 1

An email address.

Iban = 2

An IBAN: two-letter country code, two check digits, and 11 to 30 alphanumeric characters.

None = 0

No pattern is enabled. This is the default.

ProviderApiKey = 16

A provider API key pattern: sk-…, ghp_…, or AKIA….

A user can accidentally put a key in a prompt. That prompt goes to the provider and can enter the provider log.

TurkishNationalId = 8

A Turkish national identification number. It validates check digits.

A random 11-digit value is not masked. Only a number that satisfies the tenth and eleventh digit rules is masked.

Each family is enabled independently. Enabling them all together compounds false-positive risk and can make the guard impractical to use.