Rules apply to new incoming data only. They are not retroactive (data ingested before a rule was saved is unchanged), and they never
alter anything in the source platform (Slack, GitHub, etc.). Scrubbing only affects the copy Modem stores and processes.
How a rule works
Each rule has a matcher (what to find) and a method (how to redact it), and can optionally be scoped to specific channels.Matchers
A matcher is either a custom regular expression or a curated built-in pattern.- Custom regex:
{ "kind": "regex", "pattern": "...", "flags": "i" }. Theflagsfield is optional and only accepts"i"(case-insensitive). - Built-in pattern:
{ "kind": "builtin", "name": "email" }. Available names:email,phone,ipv4,ipv6,credit_card,ssn,iban.
Supported regex dialect
Custom patterns use a deliberately restricted dialect so a single rule can never hang the ingest pipeline:- No backreferences (
\1–\9). - No lookahead or lookbehind (
(?=,(?!,(?<=,(?<!). - 256 characters maximum.
- Only the
iflag is configurable (the engine always matches globally).
Methods
Every match found by a rule’s matcher is redacted using one of three methods:- Replace: swap each match for fixed text (default
[Filtered]; customizable per rule). - Mask: replace each character of a match with an asterisk (
*), preserving the match’s length. - Hash: swap each match for a short stable token. The same value always hashes to the same token within your organization, so you can still correlate repeated values (e.g. the same account number appearing in two conversations) without storing the raw value. Tokens never reveal the original and differ across organizations.
Channel scoping
A rule can apply everywhere or only within specific channels:- Omit
channelIds(or select “All channels”) and the rule applies org-wide to every message. - Provide
channelIdsand the rule applies only to content from those channels; content with no channel is unaffected.
Limits and propagation
- You can configure up to 20 rules per organization.
- After you save, updated rules usually take effect for incoming data within about a minute. The settings page shows “Propagating…” until the change is live, then “Active”.
- If the page can’t confirm the change within about 90 seconds, it shows “Couldn’t confirm propagation”. Your rules are saved either way.
Testing and import/export
The settings page includes a live test box: paste sample text and see exactly how your current (even unsaved) rules would redact it, optionally against a selected channel to exercise scoping. You can also export your rules as a JSON file and import a JSON file to load rules into the editor before saving. Both use a JSON array of rules in the shape shown above, including each rule’sid and enabled fields.