Skip to content

Masking

Masking scans the text of each request before it leaves Avant. Set it in the workspace policy under Masking (pii).

Action Effect
log The request goes through unchanged. What was found is recorded in the request log.
redact Each match is replaced with a placeholder before the request goes upstream.
block The request is refused with 403 pii.block.

One action applies to everything the policy selects. The request log records which entity types, patterns and dictionaries matched, but never the matched text.

email, phone, personal_number, credit_card, iban, private_key, jwt, aws_access_key, github_token, google_api_key, slack_token, stripe_live_key.

Org admins add them under PII patterns. A workspace policy then selects the ones it uses.

  • A pattern is a regular expression of at most 200 characters, without backreferences. Each pattern’s label becomes its placeholder.
  • A dictionary is a list of terms, such as project or customer names. It allows up to 5,000 terms of 2–128 characters each, matched on word boundaries, with or without case sensitivity.

Custom patterns share a 20 ms budget per request. A request that runs out is refused with 403 pii.scan_timeout, which names the slow pattern.

Only text is scanned. Conversations longer than the policy’s scan limit (8,000,000 characters by default) are refused with 413 limits.inputSize, because they can’t be scanned completely. When masking is on, a request with an attachment Avant can’t read as text is refused the same way, since it can’t be scanned.