This is a Python implementation of the OCSF models. The models are used to represent the data of the OCSF Schema defined in https://schema.ocsf.io/.
Project description
py-ocsf-models
The py-ocsf-models package offers a Python implementation of the Open Cybersecurity Schema Framework (OCSF) models, facilitating the manipulation and understanding of cybersecurity data within Python applications. This package provides a rich set of models covering various aspects of cybersecurity events, findings, objects, and profiles as defined by the OCSF Schema, enabling developers to work with structured cybersecurity data efficiently.
In Prowler, we leverage the py-ocsf-models package to generate JSON formatted OCSF outputs, specifically focusing on Detection Findings. This integration facilitates the standardization and sharing of cybersecurity findings in a structured and widely-accepted format, enhancing the interoperability between different security tools and platforms.
Features
- Comprehensive OCSF Schema Implementation: Includes models for events, findings, objects, and profiles, covering the entire OCSF Schema.
- Easy Data Manipulation: Easily create, modify, and interact with cybersecurity data structures.
- Serialization and Deserialization Support: Convert OCSF model instances to and from JSON for easy storage and transmission.
- Extensible Design: Extend and customize models to fit specific requirements while staying compliant with the OCSF schema.
OCSF Coverage
- Detection Finding
- Compliance Finding
- Application Security Posture Finding
Installation
Install py-ocsf-models using pip:
pip install py-ocsf-models
Import the package in your Python application:
import py_ocsf_models
Usage Examples
You can find ready-to-run examples demonstrating how to generate events using the OCSF schema in the examples folder.
How to Release
To release a new version of py-ocsf-models:
-
Create a PR with version update: Update the version number in
pyproject.tomland create a pull request with the changes. -
Create a GitHub release: Once the PR is merged into the master branch, create a new release in GitHub from the master branch. This will automatically trigger the
pypi-release.ymlworkflow to publish the package to PyPI.
Contributing
Contributions are welcome! Whether you're fixing a bug, adding new features, or improving the documentation, please feel free to make a pull request or open an issue.
License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
Acknowledgments
This package is built to support and encourage the adoption of the Open Cybersecurity Schema Framework (OCSF) and facilitate the handling of cybersecurity data in Python applications.
Support
For support, questions, or feedback, please open an issue on the GitHub repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_ocsf_models-0.8.1.tar.gz.
File metadata
- Download URL: py_ocsf_models-0.8.1.tar.gz
- Upload date:
- Size: 36.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9045237857f951e073c9f9d1f57954c90d86875b469260725292d47f7a7d73c
|
|
| MD5 |
7f743f298819e5dbe53bfe3fea419744
|
|
| BLAKE2b-256 |
f57061e2f9ce3d7e83aa5339ed6ae17e473c15c7a36f161c6dbea0e939e3af0c
|
File details
Details for the file py_ocsf_models-0.8.1-py3-none-any.whl.
File metadata
- Download URL: py_ocsf_models-0.8.1-py3-none-any.whl
- Upload date:
- Size: 64.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
061eb446c4171534c09a8b37f5a9d2a2fe9f87c5db32edbd1182446bc5fd097e
|
|
| MD5 |
5bbcdf9462d5e2437bd232bf7d0dc6e6
|
|
| BLAKE2b-256 |
f91863790884bf33f820e2c60f8d5038b5d6de967a03343ddf237c054e1d6d08
|