Skip to content

Commit

Permalink
Merge pull request #369 from carbonblack/release-1.4.3
Browse files Browse the repository at this point in the history
CBAPI-4745: Release 1.4.3 (merge to master)
  • Loading branch information
abowersox-cb authored Jun 26, 2023
2 parents a65c283 + 04364fc commit c4baafb
Show file tree
Hide file tree
Showing 57 changed files with 3,900 additions and 285 deletions.
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.8"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
builder: dirhtml
# fail_on_warning: true

# If using Sphinx, optionally build your docs in additional formats, such as PDF
formats:
- pdf
- epub

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
- method: setuptools
path: .
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# VMware Carbon Black Cloud Python SDK

**Latest Version:** 1.4.2
**Latest Version:** 1.4.3
<br>
**Release Date:** March 22, 2023
**Release Date:** June 26, 2023

[![Coverage Status](https://coveralls.io/repos/github/carbonblack/carbon-black-cloud-sdk-python/badge.svg?t=Id6Baf)](https://coveralls.io/github/carbonblack/carbon-black-cloud-sdk-python)
[![Codeship Status for carbonblack/carbon-black-cloud-sdk-python](https://app.codeship.com/projects/9e55a370-a772-0138-aae4-129773225755/status?branch=develop)](https://app.codeship.com/projects/402767)
Expand Down Expand Up @@ -58,7 +58,7 @@ At least one Carbon Black Cloud product is required to use this SDK:
If developing the SDK, you also need:

- pytest==5.4.2
- pymox==0.7.8
- pymox==1.0.0
- coverage==5.1
- coveralls==2.0.0
- flake8==3.8.1
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.2
1.4.3
4 changes: 4 additions & 0 deletions codeship-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ testingpython310:
build:
dockerfile: ./docker/python3.10/Dockerfile

testingpython311:
build:
dockerfile: ./docker/python3.11/Dockerfile

testingrhel:
build:
dockerfile: ./docker/rhel/Dockerfile
Expand Down
3 changes: 3 additions & 0 deletions codeship-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
- name: testing python 3.10
service: testingpython310
command: pytest
- name: testing python 3.11
service: testingpython311
command: pytest
- name: testing red hat
service: testingrhel
command: pytest
Expand Down
7 changes: 7 additions & 0 deletions docker/python3.11/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from python:3.11
MAINTAINER [email protected]

COPY . /app
WORKDIR /app

RUN pip3 install -r requirements.txt
4 changes: 2 additions & 2 deletions docs/cbc_sdk.audit_remediation.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Audit and Remediation
=====================
Audit and Remediation Package
===================================

Submodules
----------
Expand Down
2 changes: 1 addition & 1 deletion docs/cbc_sdk.cache.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cbc\_sdk.cache package
Cache Package
======================

Submodules
Expand Down
12 changes: 10 additions & 2 deletions docs/cbc_sdk.credential_providers.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
Credential Providers
====================
Credential Providers Package
======================================

Submodules
----------

cbc\_sdk.credential\_providers.aws\_sm\_credential\_provider module
-------------------------------------------------------------------

.. automodule:: cbc_sdk.credential_providers.aws_sm_credential_provider
:members:
:undoc-members:
:show-inheritance:

cbc\_sdk.credential\_providers.default module
---------------------------------------------

Expand Down
14 changes: 2 additions & 12 deletions docs/cbc_sdk.endpoint_standard.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
Endpoint Standard
=================

Decommissioned Functionality
----------------------------

The Endpoint Standard events (``cbc_sdk.endpoint_standard.Event``) have been decommissioned and should no longer be
used. Any attempt to use them will raise a ``FunctionalityDecommissioned`` exception. Please use
``cbc_sdk.endpoint_standard.EnrichedEvent`` instead. Refer to
`this migration guide
<https://community.carbonblack.com/t5/Developer-Relations/Migration-Guide-Carbon-Black-Cloud-Events-API/m-p/95915/thread-id/2519>`_
on the Carbon Black Developer Network Community for more information.
Endpoint Standard Package
===================================

Submodules
----------
Expand Down
4 changes: 2 additions & 2 deletions docs/cbc_sdk.enterprise_edr.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Enterprise EDR
==============
Enterprise EDR Package
================================

Submodules
----------
Expand Down
14 changes: 7 additions & 7 deletions docs/cbc_sdk.platform.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Platform
========
Platform Package
=========================

Submodules
----------
Expand Down Expand Up @@ -52,8 +52,8 @@ cbc\_sdk.platform.jobs module
:undoc-members:
:show-inheritance:

cbc\_sdk.platform.network_threat_metadata module
------------------------------------------------
cbc\_sdk.platform.network\_threat\_metadata module
--------------------------------------------------

.. automodule:: cbc_sdk.platform.network_threat_metadata
:members:
Expand All @@ -69,15 +69,15 @@ cbc\_sdk.platform.observations module
:show-inheritance:

cbc\_sdk.platform.policies module
----------------------------------
---------------------------------

.. automodule:: cbc_sdk.platform.policies
:members:
:undoc-members:
:show-inheritance:

cbc\_sdk.platform.policy_ruleconfigs module
-------------------------------------------
cbc\_sdk.platform.policy\_ruleconfigs module
--------------------------------------------

.. automodule:: cbc_sdk.platform.policy_ruleconfigs
:members:
Expand Down
4 changes: 2 additions & 2 deletions docs/cbc_sdk.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CBC SDK
=======
CBC SDK Package
================

Subpackages
-----------
Expand Down
4 changes: 2 additions & 2 deletions docs/cbc_sdk.workload.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Workload
Workload Package
=========================

Submodules
----------

cbc\_sdk.workload.nsx\_remediation module
------------------------------------------
-----------------------------------------

.. automodule:: cbc_sdk.workload.nsx_remediation
:members:
Expand Down
31 changes: 31 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
Changelog
================================
CBC SDK 1.4.3 - Released June 26, 2023
--------------------------------------

New Features:

* Policy Rule Configurations - support for additional rule configuration types:

* Host-Based Firewall - addresses the protection of assets based on rules governing network and application behavior.
* Data Collection - control over what data is uploaded to the Carbon Black Cloud. Specifically, can enable or
disable auth events collection.

Updates:

* Added an example script for manipulating core prevention rule configuration and data collection status on a policy.
* Changed ``pymox`` dependency to the latest version, which eliminates warning messages on unit test and provides
compatibility with Python 3.11 and later.
* Added specific testing support for Python 3.11.
* Added additional UAT tests for authentication events.
* Many exception classes now carry a ``uri`` field which holds the URI of the API being accessed that caused the
exception to be raised.

Bug Fixes:

* Fixed link validation for reports and IOCs to accept IPv4 addresses, domain names, or URIs.

Documentation:

* Documentation has been reorganized for ease of reference; guides have been added to the main menu, the menu has been
reordered, and various modules have been renamed.
* Fixed typo in workload guide.

CBC SDK 1.4.2 - Released March 22, 2023
---------------------------------------

Expand Down
123 changes: 61 additions & 62 deletions docs/concepts.rst
Original file line number Diff line number Diff line change
@@ -1,68 +1,6 @@
Concepts
================================

Live Response with Platform Devices
---------------------------------------------
As of version 1.3.0 Live Response has been changed to support CUSTOM type API Keys which enables
the platform Device model and Live Response session to be used with a single API key. Ensure your
API key has the ``Device READ`` permission along with the desired :doc:`live-response` permissions

::

# Device information is accessible with Platform Devices
>>> from cbc_sdk import CBCloudAPI
>>> from cbc_sdk.platform import Device
>>> api = CBCloudAPI(profile='platform')
>>> platform_devices = api.select(Device).set_os(["WINDOWS", "LINUX"])
>>> for device in platform_devices:
... print(
f'''
Device ID: {device.id}
Device Name: {device.name}

''')
Device ID: 1234
Device Name: Win10x64

Device ID: 5678
Device Name: UbuntuDev


# Live Response is accessible with Platform Devices
>>> from cbc_sdk import CBCloudAPI
>>> from cbc_sdk.platform import Device
>>> api = CBCloudAPI(profile='platform')
>>> platform_device = api.select(Device, 1234)
>>> platform_device.lr_session()
url: /appservices/v6/orgs/{org_key}/liveresponse/sessions/428:1234 -> status: PENDING
[...]

For more examples on Live Response, check :doc:`live-response`

USB Devices
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Note that ``USBDevice`` is distinct from either the Platform API ``Device`` or the Endpoint Standard ``Device``. Access
to USB devices is through the Endpoint Standard package ``from cbc_sdk.endpoint_standard import USBDevice``.

::

# USB device information is accessible with Endpoint Standard
>>> from cbc_sdk import CBCloudAPI
>>> from cbc_sdk.endpoint_standard import USBDevice
>>> api = CBCloudAPI(profile='endpoint_standard')
>>> usb_devices = api.select(USBDevice).set_statuses(['APPROVED'])
>>> for usb in usb_devices:
... print(f'''
... USB Device ID: {usb.id}
... USB Device: {usb.vendor_name} {usb.product_name}
... ''')
USB Device ID: 774
USB Device: SanDisk Ultra

USB Device ID: 778
USB Device: SanDisk Cruzer Mini

Queries
----------------------------------------

Expand Down Expand Up @@ -514,6 +452,67 @@ Get details for all events per alert
Type: NETWORK
Alert Id: ['BE084638']

Live Response with Platform Devices
---------------------------------------------
As of version 1.3.0 Live Response has been changed to support CUSTOM type API Keys which enables
the platform Device model and Live Response session to be used with a single API key. Ensure your
API key has the ``Device READ`` permission along with the desired :doc:`live-response` permissions

::

# Device information is accessible with Platform Devices
>>> from cbc_sdk import CBCloudAPI
>>> from cbc_sdk.platform import Device
>>> api = CBCloudAPI(profile='platform')
>>> platform_devices = api.select(Device).set_os(["WINDOWS", "LINUX"])
>>> for device in platform_devices:
... print(
f'''
Device ID: {device.id}
Device Name: {device.name}

''')
Device ID: 1234
Device Name: Win10x64

Device ID: 5678
Device Name: UbuntuDev


# Live Response is accessible with Platform Devices
>>> from cbc_sdk import CBCloudAPI
>>> from cbc_sdk.platform import Device
>>> api = CBCloudAPI(profile='platform')
>>> platform_device = api.select(Device, 1234)
>>> platform_device.lr_session()
url: /appservices/v6/orgs/{org_key}/liveresponse/sessions/428:1234 -> status: PENDING
[...]

For more examples on Live Response, check :doc:`live-response`

USB Devices
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Note that ``USBDevice`` is distinct from either the Platform API ``Device`` or the Endpoint Standard ``Device``. Access
to USB devices is through the Endpoint Standard package ``from cbc_sdk.endpoint_standard import USBDevice``.

::

# USB device information is accessible with Endpoint Standard
>>> from cbc_sdk import CBCloudAPI
>>> from cbc_sdk.endpoint_standard import USBDevice
>>> api = CBCloudAPI(profile='endpoint_standard')
>>> usb_devices = api.select(USBDevice).set_statuses(['APPROVED'])
>>> for usb in usb_devices:
... print(f'''
... USB Device ID: {usb.id}
... USB Device: {usb.vendor_name} {usb.product_name}
... ''')
USB Device ID: 774
USB Device: SanDisk Ultra

USB Device ID: 778
USB Device: SanDisk Cruzer Mini

Static Methods
--------------
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = 'Developer Relations'

# The full version, including alpha/beta/rc tags
release = '1.4.2'
release = '1.4.3'


# -- General configuration ---------------------------------------------------
Expand Down
Loading

0 comments on commit c4baafb

Please sign in to comment.