Skip to main content

Cybereason

Async Cybereason API client

PyPI - Python Version

Installation

pip install cybereason

Install cybereason using:

  • pip install cybereason[zip] to enable on-the-fly extraction of files downloaded from sensors,
  • pip install cybereason[socks] to enable SOCKS proxy support, or
  • pip install cybereason[zip,socks] to enable both features.

Examples

Save metadata and config for every policy

from cybereason import Cybereason
import asyncio
import json

async def dump_policies_config():
    '''Save metadata and config for every policy.
    '''
    async with Cybereason(<tenant>, <username>, <password>) as client:
        async for policy in client.get_policies(show_config=True):
            filename = f'{policy["metadata"]["name"]}.json'
            with open(filename, 'w') as f:
                json.dump(policy, f, indent=4)

asyncio.run(dump_policies_config())

Download and parse into JSON all user audit logs (action log)

from cybereason import Cybereason
import asyncio
import json

async def user_audit():
    async with Cybereason(<tenant>, <username>, <password>) as client:
        # rotated=False to get only the latest logs
        logs = [log async for log in client.get_user_audit_logs(rotated=True)]
        with open('user_audit.json', 'w') as f:
            json.dump(logs, f, indent=4)

asyncio.run(user_audit())

Copyright © 2021-2024 Forensic & Security

Metadata

Release files for cybereason 0.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cybereason 0.6.3
File Size Uploaded
cybereason-0.6.3.tar.gz 26.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cybereason 0.6.3
File Interpreter ABI Platform
cybereason-0.6.3-py3-none-any.whl Python 3 none any Details

Total release size: 56.4 kB

Release files / cybereason-0.6.3.tar.gz

Download URL cybereason-0.6.3.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c0f66e25b9e6e425732938556285fa0a9701c23af588823e32de9106f207e8c6
BLAKE2b-256 checksum
How to use checksums
b5dcfe060f87dd9947f55ddb163739fa2ba2ef425de09ea8aa1f423f01303a6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.12

Release files / cybereason-0.6.3-py3-none-any.whl

Download URL cybereason-0.6.3-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
264cf0ae8c3d0ce0a77fae75379ab953530ed9b544070a7c76c4be3acaa73b4e
BLAKE2b-256 checksum
How to use checksums
31c17115f977835eef6553c4828f633c2bcf5539641ee3d86bf543788c95906b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.6.3 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page