# OCSF Schema Files Cache

This package includes a local cache of Open Cybersecurity Schema Framework (OCSF) schema files. By default, it 
utilises these bundled copies for convenience.

The `OcsfJsonSchema` class is designed to be flexible, allowing you to use your own schema files if preferred, as
it remains agnostic about the file source.

---

## JSON Schema Files

The bundled JSON schema files are sourced from [schema.ocsf.io](https://schema.ocsf.io/).
They were downloaded with the commands below:

```bash
curl -o 1.0.0.json https://schema.ocsf.io/1.0.0/export/schema
curl -o 1.0.0-rc.2.json https://schema.ocsf.io/1.0.0-rc.2/export/schema
curl -o 1.0.0-rc.3.json https://schema.ocsf.io/1.0.0-rc.3/export/schema
curl -o 1.1.0.json https://schema.ocsf.io/1.1.0/export/schema
curl -o 1.2.0.json https://schema.ocsf.io/1.2.0/export/schema
curl -o 1.3.0.json https://schema.ocsf.io/1.3.0/export/schema
curl -o 1.4.0.json https://schema.ocsf.io/1.4.0/export/schema
curl -o 1.5.0.json https://schema.ocsf.io/1.5.0/export/schema
```

## Pickle Files
For a slight performance boost, this package will prioritise Pickle versions of the schema files if they exist in
this directory. However, Pickle files are not pre-bundled due to security concerns—untrusted Pickle files can pose 
risks if not generated by you.

### Generating Pickle Files
You can generate Pickle files from the JSON schemas using the following command:
```bash
python pickle_it.py
```

# Open Cybersecurity Schema Framework Licence
OCSF is licensed under the Apache License, version 2 ("ALv2"). - see the [LICENSE](LICENSE) file for details.

The official OCSF schema repository can be found here: https://github.com/ocsf/ocsf-schema
