> For the complete documentation index, see [llms.txt](https://help.nightfall.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.nightfall.ai/detection_platform/faq/exclusion_rules.md).

# How do I use Exclusion Rules?

Exclude certain tokens from detection to suit your business logic

Exclusion Rules, also known as an allowlist, help you reduce false positives in your sensitive findings by ignoring content from detection, or “allowing” it to pass through without being flagged.

For example, let’s say you are using the Email Address detector and you don’t want any corporate domains of “@example.com” to be detected by Nightfall. You can add “\*@example.com” as a regex Exclusion Rule.

You can add in a list of known safe tokens as a dictionary or craft a regular expression. A dictionary is a list of literal values, for example, a list of dummy credit card numbers or API keys. Regular expressions are known patterns to match against, for example if you want to allow all emails of a given domain as in the example above. Regular expressions follow RE2 syntax listed [here](https://github.com/google/re2/wiki/Syntax). You can test your regular expression [here](https://regex101.com/).

Exclusion Rules can be added on to any detector (either pre-made by Nightfall or off your own custom regular expression or “regex”) to omit certain “tokens” or items from resulting in detection events.

Here’s how you can build your own Exclusion Rule and attach it to a detector:

1. Select the type of Exclusion Rule you would like to use. It can be either a dictionary of words (which may be entered manually or uploaded from a list) or a regex pattern.
2. Select the match type from the dropdown menu on the right, either Partial or Full match.
3. Append your Exclusion Rule to your custom detector by clicking the "Save" button in the lower right.

[![](https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FG2fg4C6LSLWd2VQI1C1t%2FExlcusion%20UI%20Refresh%20-%20Dictionary.png?alt=media\&token=9c2c1332-f36f-453b-a70e-20a3bb2dee29)](https://nightfall.intercom-attachments-7.com/i/o/277336861/2c87f8da998d5373f4fbed45/urgtYtKlK3UzkH0nn93nBaHiNdttE27Z4U2c6kIivsKA9FSNdF25h0d_D5eoOxpawPOx6KLwry9gP-lYvuQwsvCNaTjW0yyMsRKkz0j30byz2Tj4xh7DPJDa_CwyHrc88Itrp42R)[![](https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FUkeCJfn8tM3jcHLcRs2A%2FExclusion%20UI%20Refresh-%20RegEx.png?alt=media\&token=8387824b-3bef-4ca6-9d05-ee551999d8f3)](https://nightfall.intercom-attachments-7.com/i/o/277336868/34341250f1b6eb9df8732cc8/3yq7nmBDZfjqw2LDBceILavdGY2dg_-4yfR76TJzS-iwr3pDnINYK5wNfpMxvpSCirGEU-450UFzUxMGhaWYGLusL4wfYqEOalF7fUVT_jor5VA988gQkHyIdJk9gb7vH-HrtAED)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.nightfall.ai/detection_platform/faq/exclusion_rules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
