Let's say that by no means should an attribute of type `passport-number` leave your MISP instance. Aside from the analyst following best practices when encoding the data, MISP does not have a built-in mechanism to prevent these leaks to happen, but now you can achieve this by using a third-party tool called [misp-guard](https://github.com/MISP/misp-guard/).
[misp-guard](https://github.com/MISP/misp-guard/) is a [mitmproxy](https://mitmproxy.org/) addon that inspects and blocks outgoing events to external MISP instances via sync mechanisms (PULL/PUSH) based on a set of customizable block rules.
For the example above, the block rules would look like this:
```json
{
"block_rules": [
{
"id": "no-passports",
"description": "Block passport numbers",
"blocked_attribute_types": [
"passport-number"
]
}
]
}
```
## How it works
### External PULL
From the point of view an External MISP that tries to pull from your instance, MISP Guard acts as a reverse proxy that inspects the external requests and allows only the ones strictly required for server syncronization, it then forwards the requests to your MISP instance and inspects the content of the outgoing events. If any of the block rules matches, the event is droped and never leaves your premises.
External MISP servers will create the connections to MISP Guard host, not your Internal MISP instance.
### Internal PUSH
From the point of view of your Internal MISP instance, you must configure MISP to use MISP Guard as a proxy (`Proxy.host` and `Proxy.port` settings).
When the Internal MISP instance tries to push an event, MISP Guard inspects the content and if any of the block rules matches, the event is droped.
> NOTE: By default this addon will block all outgoing HTTP requests that are not required during a MISP server sync. All rejected/blocked requests are logged.