> For the complete documentation index, see [llms.txt](https://docs.t-rex.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.t-rex.network/resources/security.md).

# Security

How to report a vulnerability, what has been audited, and where these docs describe the trust model of the protocol.

### Report a vulnerability

Write to `security@trex.network`. Do not open a public issue or a public pull request for a security finding.

| Include                                                               | Why                                                       |
| --------------------------------------------------------------------- | --------------------------------------------------------- |
| The contract, the function and the commit or version concerned        | To reproduce on the same code                             |
| The steps or a test that shows the issue                              | A Foundry test against the repository is the fastest path |
| The impact you see: what can be moved, blocked or forged, and by whom | To set the priority                                       |
| Whether the issue is known to anyone else                             | To coordinate disclosure                                  |

The scope is the code of the two repositories, [T-REX-Network/T-REX](https://github.com/T-REX-Network/T-REX) and [T-REX-Network/ONCHAINID](https://github.com/T-REX-Network/ONCHAINID). Applications built on the protocol, such as those of the AppStore, are reported to their own providers.

### Audits

| Component | Version | Auditor           | Report                                                                                                         |
| --------- | ------- | ----------------- | -------------------------------------------------------------------------------------------------------------- |
| ONCHAINID | 3.0.0   | OpenZeppelin      | [ONCHAINID Audit](https://www.openzeppelin.com/news/onchainid-audit)                                           |
| T-REX     | 5.0.0   | Audit in progress | Listed in [Audits and verification](/security-and-trust-model/audits-and-verification.md) when it is published |

The scope of each audit, the tests, the formal specifications and the mutation testing are described in [Audits and verification](/security-and-trust-model/audits-and-verification.md).

### Where the trust model is described

| Question                                    | Page                                                                           |
| ------------------------------------------- | ------------------------------------------------------------------------------ |
| Who is trusted for what                     | [Trust assumptions](/security-and-trust-model/trust-assumptions.md)            |
| What the contracts guarantee in every state | [Invariants](/security-and-trust-model/invariants.md)                          |
| What happens when something goes wrong      | [Emergency behavior](/security-and-trust-model/emergency-behavior.md)          |
| Who can call what                           | [Access manager and roles](/reference/token-suite/access-manager-and-roles.md) |

### For teams that operate an asset

* **Roles are keys.** Each role of a suite is as strong as the account that holds it. The roles that grant other roles, `ADMIN_ROLE`, `AGENT_ADMIN` and `SUITE_ADMIN`, deserve the strictest custody.
* **Watch the events that signal an incident.** `Paused` on a token that no agent paused, `ReplayedSettlement`, `LateReconciliation` and `ValidationIssuancePaused` on its compliance. See [36 Handle a late reconciliation or a halt](/guides/cross-chain/36.-handle-a-late-reconciliation-or-a-halt.md).
* **Know what a shared contract can change.** A shared suite follows the versions the network publishes, and a shared module follows its own upgrades. An isolated suite and a module of your own remove that dependency.
* **Check addresses on-chain.** The reads in [Deployments](/resources/deployments.md) tie each contract to the ones it depends on.


---

# 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://docs.t-rex.network/resources/security.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.
