> 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)
* [checkAllowBlockLists](#checkallowblocklists)

#### 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>

#### checkAllowBlockLists

***

<details>

<summary>Arguments</summary>

| Argument Name | Description                                                          | Required |
| ------------- | -------------------------------------------------------------------- | -------- |
| sha256        | The SHA256 hash to check. Must be a 64-character hexadecimal string. | Required |

</details>

<details>

<summary>Outputs</summary>

**Core.AllowBlockListResult.sha256** *string*

The SHA256 hash that was checked.

**Core.AllowBlockListResult.in\_block\_list** *boolean*

Whether the hash was found in the block list.

**Core.AllowBlockListResult.in\_allow\_list** *boolean*

Whether the hash was found in the allow list.

**Core.AllowBlockListResult.block\_list\_entry** *unknown*

The matching block list entry, if found.

**Core.AllowBlockListResult.allow\_list\_entry** *unknown*

The matching allow list entry, if found.

</details>

Checks whether a SHA256 hash is present in the blocklist or allowlist.


---

# 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://cortex-docs.paloaltonetworks.com/cortex-commands-guide/hash-exceptions-commands.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.
