> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-commands-guide/hash-exceptions-commands.md).

# Hash Exceptions Commands

* [addFileToAllowlist](#addfiletoallowlist)
* [removeFileFromAllowlist](#removefilefromallowlist)
* [addFileToBlocklist](#addfiletoblocklist)
* [removeFileFromBlocklist](#removefilefromblocklist)

#### addFileToAllowlist

***

Adds files to the allowlist by their SHA256 hash, preventing them from being blocked or quarantined.

<details>

<summary>Arguments</summary>

| Argument Name      | Description                                                                                                                                                                                                                                                          | Required |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| hash\_list         | A comma-separated list of SHA256 hashes to add to the allowlist.                                                                                                                                                                                                     | Required |
| comment            | A comment to associate with the allowlist entry.                                                                                                                                                                                                                     | Optional |
| case\_id           | The case/incident ID to associate with the allowlist entry.                                                                                                                                                                                                          | Optional |
| detailed\_response | Whether to split the response into Added (hashes now on the allowlist) and Excluded (hashes rejected because they are already on the blocklist). Default: false (every input hash reported as Added on success). Possible values are: true, false. Default is false. | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.Allowlist.FileHash** *string*

The SHA256 file hash.

**Core.Allowlist.Status** *string*

The status of the hash operation: Added, Excluded, or Removed.

</details>

#### removeFileFromAllowlist

***

Removes files from the allowlist by their SHA256 hash, so they are no longer trusted by default and can again be blocked or quarantined.

<details>

<summary>Arguments</summary>

| Argument Name | Description                                                           | Required |
| ------------- | --------------------------------------------------------------------- | -------- |
| hash\_list    | A comma-separated list of SHA256 hashes to remove from the allowlist. | Required |
| comment       | A comment to associate with the removal.                              | Optional |
| case\_id      | The case/incident ID to associate with the removal.                   | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.Allowlist.FileHash** *string*

The SHA256 file hash.

**Core.Allowlist.Status** *string*

The status of the hash operation: Added, Excluded, or Removed.

</details>

#### addFileToBlocklist

***

Blocks requested files that are not already on the block list or the allow list.

<details>

<summary>Arguments</summary>

| Argument Name      | Description                                                                                                                                                                                                                                                          | Required |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| case\_id           | The case/incident ID to associate with the blocklist entry.                                                                                                                                                                                                          | Optional |
| hash\_list         | A comma-separated list of SHA256 hashes to add to the blocklist                                                                                                                                                                                                      | Required |
| comment            | A comment to associate with blocklist entry.                                                                                                                                                                                                                         | Optional |
| detailed\_response | Whether to split the response into Added (hashes now on the blocklist) and Excluded (hashes rejected because they are already on the allowlist). Default: false (every input hash reported as Added on success). Possible values are: true, false. Default is false. | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.Blocklist.FileHash** *string*

The SHA256 file hash.

**Core.Blocklist.Status** *string*

The status of the hash operation: Added, Excluded, or Removed.

</details>

#### removeFileFromBlocklist

***

Removes file hashes from the blocklist, allowing files with those hashes to run again.

<details>

<summary>Arguments</summary>

| Argument Name | Description                                                           | Required |
| ------------- | --------------------------------------------------------------------- | -------- |
| hash\_list    | A comma-separated list of SHA256 hashes to remove from the blocklist. | Required |
| comment       | A comment to associate with the removal.                              | Optional |
| case\_id      | The case/incident ID to associate with the removal.                   | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.Blocklist.FileHash** *string*

The SHA256 file hash.

**Core.Blocklist.Status** *string*

The status of the hash operation: Added, Excluded, or Removed.

</details>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-commands-guide/hash-exceptions-commands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
