# Schema

Adhering to our aim for AVID resources to be expandable and adaptable to practitioner needs, we have adapted the [MISP Taxonomy System](https://www.circl.lu/doc/misp-taxonomies/) to standardize and share the two views of our taxonomy. MISP taxonomies are used to tags cybersecurity events, indicators, and threats using three components:

* `namespace` is an unique identifier of the taxonomy being used
* `predicate` is a high-level category
* `value` is a low-level subcategory under a predicate.

Each MISP taxonomy is specified using a single JSON file that contains the namespace, a list of predicates, lists of values under each predicate, and auxiliary metadata. Below is a sample schema:

{% code overflow="wrap" fullWidth="false" %}

```json
{
    "namespace": ...,
    "description": ...,
    "version": ...,
    "predicates": [
        {
            "value": ...,
            "expanded": ...,
            "description": ...
        },
        ...
    ],
    "values": [
        {
            "predicate": ...,
            "entry": [
                {
                    "value": ...,
                    "expanded": ...,
                    "description": ...
                },
                ...
            ]
        },
        ...
    ]
}
```

{% endcode %}

This specification can be used to tag any relevant threat information as `namespace:predicate:value`. As long as a taxonomy is specified using the above structure, tags can be generated in the above structure, providing the user with the flexibility of using multiple taxonomies, some of which may be specific to their own application context.

### Example

The MISP specifications of the AVID taxonomies are available for the [Effect/SEP View](https://github.com/avidml/avid-db/blob/main/schema/taxonomy_misp/avid-effect.json) and the [Lifecycle View](https://github.com/avidml/avid-db/blob/main/schema/taxonomy_misp/avid-lifecycle.json).

As an implementation example, consider the vulnerability [AVID-2022-V013](https://avidml.org/database/avid-2022-v013/), which is about the Microsoft Tay Poisoning incident. We have assigned the following taxonomy categories to it:

<table><thead><tr><th width="211.33333333333331">View</th><th width="229">Category</th><th>ID</th></tr></thead><tbody><tr><td>Effect</td><td>Security</td><td>S0601: Ingest Poisoning</td></tr><tr><td>Effect</td><td>Ethics</td><td>E0101: Group Fairness</td></tr><tr><td>Effect</td><td>Ethics</td><td>E0301: Toxicity</td></tr><tr><td>Lifecycle</td><td>Lifecycle</td><td>L06: Deployment</td></tr></tbody></table>

The MISP tags for this vulnerability will be the following:

```
avid-effect:security:S0601
avid-effect:ethics:E0101
avid-effect:ethics:E0301
avid-lifecycle:lifecycle:L06
```
