# Configure Scope

The Scope section allows you to select the historic period that needs to be audited. You can also select the GitHub org and repositories to be audited. Once you select the org and repositories, Nightfall provides you a greater level of granularity with filters. You can apply filters within the selected repositories to exclude files with specific extensions and files which belong to a specific directory.&#x20;

To configure the Scope section:&#x20;

1. Select the historic time period to be audited.
2. Click **+ Add Org** and select the GitHub org to be audited.

{% hint style="success" %}
**Note**: If you have installed a single GitHub org in Nightfall, the org is selected by default.
{% endhint %}

3. In the Select Repositories field, select one of the following options.

* **All Repos**: This option selects all the repositories for audit.
* **Specific Repos**: This option allows you to select specific repositories to be audited. You can select the repositories by creating a regular expressions pattern. You can refer to [this site](https://github.com/google/re2/wiki/Syntax) to learn more about regular expression syntax in GitHub. The options available to create regular expressions are as follows.
  * **Starts With**: This option allows you to create a pattern that matches repositories starting with specific letters, numbers, or characters.
  * **Ends With**: This option allows you to create a pattern that matches repositories ending with specific letters, numbers, or characters.
  * **Contains**: This option allows you to create a pattern that matches repositories containing specific letters.

{% hint style="success" %}
N**ote**: You can refer to [this site](https://regex-generator.olafneumann.org/?sampleText=2020-03-12T13%3A34%3A56.123Z%20INFO%20%20%5Borg.example.Class%5D%3A%20This%20is%20a%20%23simple%20%23logline%20containing%20a%20%27value%27.\&flags=i) for assistance in creating regular expression patterns.
{% endhint %}

* **All Repos, But Exclude**: This option allows you to exclude repositories from audit. You can select the repositories by creating a regular expression pattern. The options to create a regular expression pattern remain the same as in case of the previous option (**Starts with**, **Ends With**, and **Contains**).

4. In the Select Branches field, select one of the following options.
   * **All Branches**: This option selects all the branches of the selected  repositories for auditing.&#x20;
   * **Default Branches**: This option selects all the default branches of the selected repositories for auditing.&#x20;
   * **Specific branches**: This option allows you to select specific branches (from the selected repositories) to be audited. You can select the repositories by creating a regular expressions pattern. The options to create a regular expression pattern remain the same, as described in the previous step.
   * **All branches, but exclude**: This option allows you to exclude branches from audit. You can select the branches by creating a regular expression pattern. The options to create a regular expression pattern remain the same as, as described in the above step (**Starts with**, **Ends With**, and **Contains**).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdXZu4niNTPHmdhK4u9ZZ39vBzgmkme7h5LYT3HR8RUIfrdUKlmzzO566aow_cU12Dd4Zm-C7F4nYIPQwNtuyR63Y7r38BulTb0UXs9DO4baEmU_oLAmih4H5iM5Z4ZocoZn_UfBg?key=0c8fvpTA9ca7_8R9xnhsaYri" alt=""><figcaption></figcaption></figure>

## Examples of Regular Expressions

This section provides examples to create regular expressions. You can test your regular expression from this [portal](https://regex101.com/).

* To match the word `development`, use the following pattern  with the **Contains** option.

```regex
^[D,d]evelopment$
```

* To match a word that starts with `a`, use the following pattern with the **Starts With** option.

```regex
^[A,a].*$
```

* To match a word that ends with `s`, use the following pattern with the **Ends With** option.

```regex
^.*[S,s]$
```

* To match a word that contains the word `sandbox`, use the following pattern with the **Contains** option.

```regex
^.*[S,s]andbox.*$
```

## Configuring Filters

The Filters section provides higher levels of granularity in performing the audit. Once you select the GitHub org, repository, and branches to be audited, you can apply filters to exclude files with specific extensions and files that belong to a specific directory, from being audited. <br>

* **File Extension Exclusion**: Select the file extension(s). All the files with the selected extension are excluded from the audit scope.
* **Directory Exclusion**: Enter a regular expression pattern to match a directory and file path. All file directories and file paths that match the pattern are excluded from the audit scope.&#x20;

{% hint style="success" %}
**Note**: To learn more about how to use regular expressions to exclude GitHub directories, see[ Use Regular Expressions to Exclude GitHub Directories](https://help.nightfall.ai/github/policies/scope/github_regexp).
{% endhint %}
