Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #173
Browse files Browse the repository at this point in the history
Fix check for `--low-priority` flag
  • Loading branch information
dominiklohmann authored Nov 22, 2021
2 parents c188ce1 + 4b9d6ec commit f171cfa
Show file tree
Hide file tree
Showing 17 changed files with 63 additions and 26 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Every entry has a category for which we use the following visual abbreviations:
- 🧬 Experimental Features
- 🐞 Bug Fixes

## [2021.11.22]

- 🐞 `vast-threatbus` no longer fails to check for the availability of low
priority queries.
[#173](https://github.com/tenzir/threatbus/pull/173)

## [2021.11.18]

- ⚠️ `vast-threatbus` now issues low priority queries if those are supported by
Expand Down Expand Up @@ -265,3 +271,5 @@ Every entry has a category for which we use the following visual abbreviations:
[2021.07.29]: https://github.com/tenzir/threatbus/releases/tag/2021.07.29
[2021.08.26]: https://github.com/tenzir/threatbus/releases/tag/2021.08.26
[2021.09.30]: https://github.com/tenzir/threatbus/releases/tag/2021.09.30
[2021.11.18]: https://github.com/tenzir/threatbus/releases/tag/2021.11.18
[2021.11.22]: https://github.com/tenzir/threatbus/releases/tag/2021.11.22
5 changes: 5 additions & 0 deletions apps/stix-shifter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Every entry has a category for which we use the following visual abbreviations:
- ⚡️ Breaking Changes
- 🐞 Bug Fixes

## [2021.11.22]

No user-facing changes.

## [2021.11.18]

No user-facing changes.
Expand Down Expand Up @@ -85,3 +89,4 @@ No user-facing changes.
[2021.08.26]: https://github.com/tenzir/threatbus/releases/tag/2021.08.26
[2021.09.30]: https://github.com/tenzir/threatbus/releases/tag/2021.09.30
[2021.11.18]: https://github.com/tenzir/threatbus/releases/tag/2021.11.18
[2021.11.22]: https://github.com/tenzir/threatbus/releases/tag/2021.11.22
4 changes: 2 additions & 2 deletions apps/stix-shifter/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"stix2 >= 3.0",
"stix-shifter >= 3.4.2",
"stix-shifter-utils >= 3.4.2",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
],
keywords=[
"open source",
Expand All @@ -54,5 +54,5 @@
python_requires=">=3.7",
setup_requires=["setuptools", "wheel"],
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
5 changes: 5 additions & 0 deletions apps/suricata/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Every entry has a category for which we use the following visual abbreviations:
- ⚡️ Breaking Changes
- 🐞 Bug Fixes

## [2021.11.22]

No user-facing changes.

## [2021.11.18]

No user-facing changes.
Expand Down Expand Up @@ -68,3 +72,4 @@ No user-facing changes.
[2021.08.26]: https://github.com/tenzir/threatbus/releases/tag/2021.08.26
[2021.09.30]: https://github.com/tenzir/threatbus/releases/tag/2021.09.30
[2021.11.18]: https://github.com/tenzir/threatbus/releases/tag/2021.11.18
[2021.11.22]: https://github.com/tenzir/threatbus/releases/tag/2021.11.22
4 changes: 2 additions & 2 deletions apps/suricata/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"pyzmq >= 19",
"parsuricata",
"stix2 >= 3.0",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
],
keywords=[
"open source",
Expand All @@ -53,5 +53,5 @@
python_requires=">=3.7",
setup_requires=["setuptools", "wheel"],
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
14 changes: 14 additions & 0 deletions apps/vast/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ Every entry has a category for which we use the following visual abbreviations:
- ⚡️ Breaking Changes
- 🐞 Bug Fixes

## [2021.11.22]

- 🐞 `vast-threatbus` no longer fails to check for the availability of low
priority queries.
[#173](https://github.com/tenzir/threatbus/pull/173)

## [2021.11.18]

- ⚠️ `vast-threatbus` now issues low priority queries if those are supported by
the version of VAST.
[#171](https://github.com/tenzir/threatbus/pull/171)

## [2021.09.30]

No user-facing changes.
Expand Down Expand Up @@ -214,3 +226,5 @@ No user-facing changes.
[2021.07.29]: https://github.com/tenzir/threatbus/releases/tag/2021.07.29
[2021.08.26]: https://github.com/tenzir/threatbus/releases/tag/2021.08.26
[2021.09.30]: https://github.com/tenzir/threatbus/releases/tag/2021.09.30
[2021.11.18]: https://github.com/tenzir/threatbus/releases/tag/2021.11.18
[2021.11.22]: https://github.com/tenzir/threatbus/releases/tag/2021.11.22
4 changes: 2 additions & 2 deletions apps/vast/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"pyzmq >= 19",
"pyvast >= 2021.6.24",
"stix2 >= 3.0",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
],
keywords=[
"open source",
Expand All @@ -52,5 +52,5 @@
python_requires=">=3.7",
setup_requires=["setuptools", "wheel"],
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
11 changes: 8 additions & 3 deletions apps/vast/vast_threatbus/vast_threatbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,13 @@ async def check_low_priority_support(vast: VAST):
"""
Checks whether the export command supports the `--low-priority` option.
"""
helpmsg = await vast.export(help=True).exec()
return "--low-priority" in helpmsg
proc = await vast.export(help=True).exec()
await proc.wait()
if proc.returncode != 0:
return False
stdout, _ = await proc.communicate()
print(str(stdout), file=sys.stderr)
return "--low-priority" in str(stdout)


async def start(
Expand Down Expand Up @@ -359,7 +364,7 @@ async def retro_match_vast(
vast = VAST(binary=vast_binary, endpoint=vast_endpoint, logger=logger)
kwargs = {}
if low_priority_support:
kwargs["low-priority"] = True
kwargs["low_priority"] = True
if retro_match_max_events > 0:
kwargs["max_events"] = retro_match_max_events
proc = await vast.export(**kwargs).json(query).exec()
Expand Down
4 changes: 2 additions & 2 deletions apps/zmq-app-template/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"dynaconf >= 3.1.4",
"pyzmq >= 19",
"stix2 >= 3.0",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
],
keywords=[
"open source",
Expand All @@ -49,5 +49,5 @@
python_requires=">=3.7",
setup_requires=["setuptools", "wheel"],
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
4 changes: 2 additions & 2 deletions plugins/apps/threatbus_cif3/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
entry_points={"threatbus.app": ["cif3 = threatbus_cif3.plugin"]},
install_requires=[
"stix2 >= 3.0",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
"cifsdk > 3.0.0rc4, < 4.0",
],
keywords=[
Expand All @@ -49,5 +49,5 @@
packages=["threatbus_cif3"],
python_requires=">=3.6",
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
4 changes: 2 additions & 2 deletions plugins/apps/threatbus_misp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
install_requires=[
"pymisp >= 2.4.120",
"stix2 >= 3.0",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
],
extras_require={"kafka": ["confluent-kafka>=1.3.0"], "zmq": ["pyzmq>=18.1.1"]},
keywords=[
Expand All @@ -49,5 +49,5 @@
packages=["threatbus_misp"],
python_requires=">=3.7",
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
4 changes: 2 additions & 2 deletions plugins/apps/threatbus_zeek/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
entry_points={"threatbus.app": ["zeek = threatbus_zeek.plugin"]},
install_requires=[
"stix2 >= 3.0",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
],
keywords=[
"Zeek",
Expand All @@ -50,5 +50,5 @@
python_requires=">=3.7",
setup_requires=["setuptools", "wheel"],
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
4 changes: 2 additions & 2 deletions plugins/apps/threatbus_zmq/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"pyzmq>=19",
"python-dateutil>=2.8.1",
"stix2>=3.0",
"threatbus>=2021.11.18",
"threatbus>=2021.11.22",
],
keywords=[
"zeromq",
Expand All @@ -47,5 +47,5 @@
packages=["threatbus_zmq"],
python_requires=">=3.7",
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
4 changes: 2 additions & 2 deletions plugins/backbones/file_benchmark/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
entry_points={"threatbus.backbone": ["file_benchmark = file_benchmark.plugin"]},
install_requires=[
"stix2 >= 3.0",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
],
keywords=["threatbus", "plugin"],
license="BSD 3-clause",
Expand All @@ -34,5 +34,5 @@
packages=["file_benchmark"],
python_requires=">=3.7",
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
4 changes: 2 additions & 2 deletions plugins/backbones/threatbus_inmem/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
entry_points={"threatbus.backbone": ["inmem = threatbus_inmem.plugin"]},
install_requires=[
"stix2 >= 3.0",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
],
keywords=[
"message broker",
Expand All @@ -41,5 +41,5 @@
packages=["threatbus_inmem"],
python_requires=">=3.7",
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
4 changes: 2 additions & 2 deletions plugins/backbones/threatbus_rabbitmq/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"pika >= 1.1.0",
"retry",
"stix2 >= 3.0",
"threatbus >= 2021.11.18",
"threatbus >= 2021.11.22",
],
keywords=[
"message broker",
Expand All @@ -46,5 +46,5 @@
packages=["threatbus_rabbitmq"],
python_requires=">=3.7",
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
python_requires=">=3.7",
setup_requires=["setuptools", "wheel"],
url="https://github.com/tenzir/threatbus",
version="2021.11.18",
version="2021.11.22",
)

0 comments on commit f171cfa

Please sign in to comment.