Skip to content

Regex & Linting

Use these regex patterns to validate identifiers programmatically. All patterns assume the prv org prefix; adapt for other tenants by replacing prv with the appropriate org code.

^(prv|ocs|pqx|pai|psl|pst|bgh)$
^prv-(exec|fin|hr|legal|biz|ops|plt|it|eng|sec|mktg|sal|archive)-dept@[a-z0-9.-]+\.[a-z]{2,}$
^prv-(exec|fin|hr|legal|biz|ops|plt|it|eng|sec|mktg|sal|archive)-team(-[a-z0-9-]{3,24})?@[a-z0-9.-]+\.[a-z]{2,}$
^prv-(exec|fin|hr|legal|biz|ops|plt|it|eng|sec|mktg|sal|archive)-role-[a-z0-9]+(?:-[a-z0-9-]+)*(?:-(?:prd|stg|dev|sbx|qa)|-[a-z][a-z0-9]{2,5})?-(admin|owner|operator|manager|editor|maintainer|developer|read|viewer|publisher)@[a-z0-9.-]+\.[a-z]{2,}$
^prv-org-people-[a-z0-9-]{3,}@[a-z0-9.-]+\.[a-z]{2,}$
^prv-org-ident-[a-z0-9-]{3,}@[a-z0-9.-]+\.[a-z]{2,}$
^prv-(team|collab)-mail-[a-z0-9-]{3,}@[a-z0-9.-]+\.[a-z]{2,}$
^prv-(exec|fin|hr|legal|biz|ops|plt|it|eng|sec|mktg|sal|archive)-intake-[a-z0-9-]{3,}@[a-z0-9.-]+\.[a-z]{2,}$
^prv-(exec|fin|hr|legal|biz|ops|plt|it|eng|sec|mktg|sal|archive|flt|org)-alerts-[a-z0-9-]{3,}@[a-z0-9.-]+\.[a-z]{2,}$
^prv-(exec|fin|hr|legal|biz|ops|plt|it|eng|sec|mktg|sal|archive|flt)-infra-[a-z0-9-]{3,}@[a-z0-9.-]+\.[a-z]{2,}$
^prv-[a-z]+-auto-[a-z0-9]+-[a-z0-9-]+@[a-z0-9.-]+\.[a-z]{2,}$
^prv-plt-admin-[a-z0-9-]+@[a-z0-9.-]+\.[a-z]{2,}$
^prv-[a-z]+-cus-[a-z][a-z0-9]{2,5}-(prosrv|sales|mktg|cpoc|announce|all|archive)@[a-z0-9.-]+\.[a-z]{2,}$
^prv-[a-z]+-prj-[a-z][a-z0-9]{2,5}-[a-z0-9]+(?:-[a-z0-9]+){0,5}-(dri|delivery|client)@[a-z0-9.-]+\.[a-z]{2,}$
^prv-[a-z]+-vendor-[a-z0-9-]{3,12}@[a-z0-9.-]+\.[a-z]{2,}$
^prv-[a-z]+-partner-[a-z0-9-]{3,12}(-[a-z]+)?@[a-z0-9.-]+\.[a-z]{2,}$
^prv-flt-[a-z0-9-]+@[a-z0-9.-]+\.[a-z]{2,}$
^PRV – [A-Za-z0-9 /&-]+(?: – [A-Za-z0-9 /&-]+)*$

Display names must use en dashes (, U+2013), not hyphens (-) or em dashes ():

– ✅ en dash (U+2013)
- ❌ hyphen (U+002D) — only in kebab-case identifiers
— ❌ em dash (U+2014) — never used
  1. Must start with the exact display Name followed by : (colon + space).
  2. Must end with one of:
    • Security group ({purpose})
    • Non-security group ({purpose})
  3. Optionally add: | Locked group ({reason})
  4. CEL trailer (when applicable): | CEL: {expression}
RuleTarget
Every group has >= 2 owners100%
No individuals in Department groups0 violations
Every Team nested in exactly 1 Department100%
No Teams in admin Role groups0 violations
No people-* or mail-* on ACLs0 violations
Archive ON for all mail pipe groups100%
Security label OFF for mail pipe groups100%
Zero humans in Infra groups100%
Zero externals on TEAM/STRICT drives100%
^/(exec-team|w2|contractors|interns|partners|vendors|automation-accounts)(/[a-z0-9-]+)+$

Allowed end-states:

(-active|-admins|-offboarded|-disabled|-probation|-breakglass-users)$
^(INT|EXT)_(PRV|OCS|PQX|PAI|PSL|PST)_[A-Za-z0-9-]+_(COLLAB|TEAM|STRICT|ARCH)_(Active|Archived)_(Public|Private|Confidential|Restricted)$
^[a-z0-9_-]+_\d{4}-\d{2}-\d{2}_(draft|review|final)_v\d{3}(\.[a-z0-9]+)?$