---
title: "Guard steps"
description: "On this page you will learn what each guard step in a pipeline protects against, how it works, and how to configure it."
canonical: "https://docs.cm.com/conversational-router/guides/pipeline-guards"
---

# Guard steps

> On this page you will learn what each guard step in a pipeline protects against, how it works, and how to configure it.

Source: https://docs.cm.com/conversational-router/guides/pipeline-guards

## Overview

Guard steps protect your destinations, such as agents and bots, from unwanted content. They run first in a [pipeline](https://docs.cm.com/conversational-router/guides/pipelines) and act in one of two ways:

- **Filter**: the offending content is masked, neutralised or removed, and the message continues to its destination.
- **Quarantine**: the pipeline stops and the message is not delivered. Quarantined messages remain visible in the [Explorer](https://docs.cm.com/conversational-router/guides/explorer), together with the step that stopped them.

Which action a guard takes is fixed for some guards and a setting for others:

| Step | Filter | Quarantine |
| - | - | - |
| [Spam detection](#spam-detection) | No | Always |
| [Virus scan](#virus-scan) | Setting | Setting |
| [URL reputation](#url-reputation) | Suspected links always; known-malicious links unless set to quarantine | Setting (known-malicious links only) |
| [Profanity](#profanity) | Always | No |
| [Data loss prevention](#data-loss-prevention) | Always | No |

Guards decide on the Router's own confidence in what they find. The thresholds are set by the platform so that ordinary conversations are not interrupted, which is why most guards have few settings.

## Spam detection

**What it does.** Quarantines messages that look like spam, so agents never have to see them.

**How it works.** The guard looks at how a sender behaves and what they send, judged across the whole conversation rather than one message at a time. For conversations it watches for:

- a sender who sends messages unusually fast,
- the same content being sent repeatedly, across senders and conversations,
- one sender reaching many different conversations in a short time,
- a sustained stream of gibberish.

For emails it adds checks that apply to mail only:

- whether the message really comes from the domain it claims to come from, using cryptographic validation of the sender,
- whether the reply address, display name, or sender domain imitates a different organisation, including your own,
- whether links show one address but lead somewhere else,
- whether the email hides text from the reader,
- an analysis of the content itself.

No single weak sign quarantines a message. The signals are combined into one confidence, and the message is only quarantined when that confidence is high. A legitimate customer writing from a shared mailbox or forwarding a shipping notice should not be caught.

**Settings.** None. Which signals count and how strongly is managed by the platform.

**What you will see.** A quarantined message is not delivered. The Explorer marks the destination and the Spam guard step as **Blocked** and lists the signals that contributed. When nothing was quarantined it shows what was observed instead, or _None_.

**Good to know.**

- Only messages sent by your customers are judged, not replies from your agents or bots.
- Because the judgement covers the conversation, a sender who has been sending junk is more likely to be quarantined than a first-time sender with a single odd message.

## Virus scan

**What it does.** Scans attachments for malware before they reach an agent or application.

**How it works.** Every attachment on the message, for example an image, document or archive, is scanned with an antivirus engine. The engine looks inside archives as well. Files that have been scanned before are recognised, so the same file is not scanned again.

**Settings.** Under _When an attachment is infected_, choose what happens to an infected attachment:

| Action | Result |
| - | - |
| **Filter the attachment** | The infected attachment is removed and the message continues. For a media message that carries only the attachment, the message is removed. For an email, only that attachment is removed and the body is still delivered. |
| **Quarantine** | The message is not delivered. |

**What you will see.** The Explorer shows _Clean_, _Infected_ with the name of the threat, or _Skipped (no attachment)_. A quarantined message is marked **Blocked**.

**Good to know.**

- Attachments over 100 MB cannot be scanned. They are always removed, whichever action you selected, but the rest of the message is still delivered.
- A file that cannot be retrieved for scanning is never delivered.
- Virus scan is billed per attachment scanned rather than per message. It runs after Spam detection, so a message that spam detection quarantines is never scanned or billed.

## URL reputation

**What it does.** Protects agents and customers from phishing and malware links in message text.

**How it works.**

1. The guard finds every link in the message, including links written in an obscured form such as `hxxp://` or with `[.]` instead of dots.
2. It follows each link through any redirects to find where it really leads.
3. It checks that destination against lists of known phishing and malware addresses and against signs of a suspicious link, such as characteristics of the address itself and how recently the domain was registered.
4. Each link gets one of two verdicts:

| Verdict | Meaning | What happens |
| - | - | - |
| **Suspected** | The link shows signs of being malicious. | The link is always neutralised. It can never quarantine the message. |
| **Known malicious** | The destination appears on a list of known malicious addresses. | The link is neutralised, or the message is quarantined, depending on your setting. |

Neutralising a link, also called defanging, keeps it readable but stops it being clickable. `https://example.com/login` becomes `hxxps://example[.]com/login`. The reader can still see what was in the message.

**Settings.** Under _When a risky link is found_, choose what happens to a known-malicious link:

| Action | Result |
| - | - |
| **Filter suspected links** | All risky links, suspected and known-malicious, are neutralised and the message continues. |
| **Quarantine known, filter suspicious** | A message containing a known-malicious link is not delivered. Suspected links are neutralised and the message continues. |

**What you will see.** The delivered text shows the neutralised links. The Explorer shows _No URLs found_, or whether the links were checked or flagged. A quarantined message is marked **Blocked**.

**Good to know.**

- A link is judged by where it really leads, so a shortened or redirected link is checked on its final destination.

## Profanity

**What it does.** Masks abusive and harmful language, so agents and downstream applications do not receive it.

**How it works.** The message is analysed by a multilingual language model that finds harmful passages and the category they belong to. Passages in the categories you selected are replaced with asterisks and the rest of the message is delivered as is.

**Settings.** Select the categories to look for. At least one must be selected before the step can be saved.

| Category | Covers |
| - | - |
| **Profanity** | Swearing and vulgar language. |
| **Sexual content** | Sexually explicit language. |
| **Hate speech** | Language that attacks people for who they are. |
| **Violence** | Threats and descriptions of violence. |
| **Self-harm** | Language about harming oneself. |

**What you will see.** The delivered message contains asterisks in place of the masked passages. The Explorer shows how many passages were masked, or _None_.

**Good to know.**

- The guard only masks. Quarantining is not available for this step.
- It works across languages, not only English.

## Data loss prevention

**What it does.** Masks secrets and credentials that someone pastes into a conversation, so they are not passed on to agents, bots or other applications.

**How it works.** The message text is scanned for patterns that look like secrets and the matching values are replaced with a label naming what was found, for example `[REDACTED:Tokens]`. For an assignment such as a password or a connection string only the value is masked, so the message stays readable. Examples and placeholder values, such as `password=changeme`, are recognised and left alone so that ordinary text is not masked.

The guard detects:

- JWT tokens,
- common API keys,
- encryption keys, such as private keys,
- cloud credentials,
- connection strings,
- passwords (best effort).

This is different from [PII redaction](https://docs.cm.com/conversational-router/guides/pipeline-transformation-steps#pii-redaction), which masks personal details such as names and phone numbers. The two can be used together.

**Settings.** None. The guard always scans for all of the secret types above. Password detection is best effort, because a password has no fixed shape.

**What you will see.** The delivered message contains the labelled mask. The Explorer shows what kinds of secrets were masked, for example `1 token`, but never the secrets themselves.

**Good to know.**

- The guard only masks. It does not quarantine messages.
- It runs before the analysis steps, so Named entity extraction, Sentiment analysis and Translation never see the secret.
