Skip to content

Commit

Permalink
Merge pull request #516 from opencybersecurityalliance/develop_v1
Browse files Browse the repository at this point in the history
v1.8.6
  • Loading branch information
subbyte authored May 2, 2024
2 parents 0469066 + 82ed6ff commit de0a340
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 27 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@ The format is based on `Keep a Changelog`_.
Unreleased
==========

1.8.6 (2024-05-02)
==================

Added
-----

- Rely stix-shifter connector init error message to Kestrel

1.8.5 (2024-05-01)
==================

Added
-----

- cli/diag: add start/stop/last options
- subquery generation support in stix-shifter interface based on specified time window
- configuration doc on `subquery_time_window`
- Subquery generation support in stix-shifter interface based on specified time window
- Configuration doc on `subquery_time_window`

Changed
-------
Expand Down
2 changes: 1 addition & 1 deletion packages/kestrel_datasource_stixshifter/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "kestrel_datasource_stixshifter"
version = "1.8.3"
version = "1.8.4"
description = "Kestrel STIX-shifter Datasource Interface"
readme = "README.rst"
requires-python = ">=3.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,38 +97,51 @@ def run(self):
self.configuration_dict,
)

# hack stix-shifter v7 to support "disable certificate verification"
if not self.verify_cert:
disable_cert_verification_on_transmission(self.transmission)

search_meta_result = self.transmission.query(self.query)

if search_meta_result["success"]:
self.search_id = search_meta_result["search_id"]
if self.wait_datasource_search():
# no error so far
self.retrieve_data()

# some connector needs to delete the query in the datasource,
# e.g., chronicle, discard the return (successful or not)
self.transmission.delete(self.search_id)
else:
err_msg = (
search_meta_result["error"]
if "error" in search_meta_result
else "details not avaliable"
)
if not hasattr(self.transmission, "entry_point"):
packet = TransmissionResult(
self.worker_name,
False,
None,
None,
WorkerLog(
logging.ERROR,
f"STIX-shifter transmission.query() failed: {err_msg}",
f"stix-shifter connector init: {self.transmission.init_error}",
),
)
self.queue.put(packet)
else:
# hack stix-shifter v7 to support "disable certificate verification"
if not self.verify_cert:
disable_cert_verification_on_transmission(self.transmission)

search_meta_result = self.transmission.query(self.query)

if search_meta_result["success"]:
self.search_id = search_meta_result["search_id"]
if self.wait_datasource_search():
# no error so far
self.retrieve_data()

# some connector needs to delete the query in the datasource,
# e.g., chronicle, discard the return (successful or not)
self.transmission.delete(self.search_id)
else:
err_msg = (
search_meta_result["error"]
if "error" in search_meta_result
else "details not avaliable"
)
packet = TransmissionResult(
self.worker_name,
False,
None,
None,
WorkerLog(
logging.ERROR,
f"STIX-shifter transmission.query() failed: {err_msg}",
),
)
self.queue.put(packet)

def wait_datasource_search(self):
# kestrel init status: "KINIT"
Expand Down
4 changes: 2 additions & 2 deletions packages/kestrel_jupyter/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "kestrel_jupyter"
version = "1.8.5"
version = "1.8.6"
description = "Kestrel Jupyter Kernel"
readme = "README.rst"
requires-python = ">=3.8"
Expand All @@ -28,7 +28,7 @@ classifiers = [
dependencies = [
"kestrel_core==1.8.2",
"kestrel_datasource_stixbundle==1.8.0",
"kestrel_datasource_stixshifter==1.8.3",
"kestrel_datasource_stixshifter==1.8.4",
"kestrel_analytics_python==1.8.0",
"kestrel_analytics_docker==1.8.1",
"jupyterlab-server",
Expand Down

0 comments on commit de0a340

Please sign in to comment.