Skip to main content

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:

  1. Create a PR with version update: Update the version number in pyproject.toml and create a pull request with the changes.

  2. 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.yml workflow 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_ocsf_models-0.9.0.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_ocsf_models-0.9.0-py3-none-any.whl (64.4 kB view details)

Uploaded Python 3

File details

Details for the file py_ocsf_models-0.9.0.tar.gz.

File metadata

  • Download URL: py_ocsf_models-0.9.0.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py_ocsf_models-0.9.0.tar.gz
Algorithm Hash digest
SHA256 9c41bc2f809a5e5554095931063cbb1bd04b3e3d35edb01d2c5f5bb8462aa3e2
MD5 72ac82208690a95ced932eada663f8ef
BLAKE2b-256 4220bf1dfe8981475527259dd69a4956600234c31895e90f4d17d1788b7c12fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_ocsf_models-0.9.0.tar.gz:

Publisher: pypi-release.yml on prowler-cloud/py-ocsf-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_ocsf_models-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: py_ocsf_models-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 64.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py_ocsf_models-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4496c1fcc7cd8fabea53cfb81d000e9a4d2808769236f8432290b3a215cb7ee6
MD5 2f6bc885c20a30efd73d8ac7183d451c
BLAKE2b-256 8dba8701e35854e1d809a632139ac0f0790d1012b947a8e27d428859a8e6a83c

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_ocsf_models-0.9.0-py3-none-any.whl:

Publisher: pypi-release.yml on prowler-cloud/py-ocsf-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page