# Violations

A Violation is a privacy risk identified within the code that could potentially cause a data leak. They are also detected based on certain custom rules declared during the scan. To know more about the rules, [click here](https://docs.privado.ai/understanding-rules).

A violation result consists of the following structure:

```json
"violations": [
    {
        "policyId" : "string",
          "policyDetails" : {
            "name" : "string",
            "policyType" : "string",
            "description" : "string",
            "fix" : "string",
            "tags" : {
                "key": "value"
            }
        }
    }
]
```

The parameters are explained below:

<table data-header-hidden><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Field</strong></td><td><strong>Description</strong></td></tr><tr><td><code>policyId</code></td><td>ID of the policy which is violated</td></tr><tr><td><code>policyDetails</code></td><td>Object containing details about the violation</td></tr><tr><td><code>name</code></td><td>name of the violation which is detected</td></tr><tr><td><pre><code>policyType
</code></pre></td><td>Type of the policy which can be either threat or compliance</td></tr><tr><td><code>description</code></td><td>A brief description about the violation</td></tr><tr><td><code>fix</code></td><td>A detailed description of how to resolve the violation</td></tr><tr><td><code>tags</code></td><td>Key-value pairs to add more context to the violation</td></tr></tbody></table>
