Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.3.34 #125

Merged
merged 3 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
fail_ci_if_error: false
verbose: true
2 changes: 1 addition & 1 deletion firepit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """IBM Security"""
__email__ = 'pcoccoli@us.ibm.com'
__version__ = '2.3.33'
__version__ = '2.3.34'


import re
Expand Down
2 changes: 1 addition & 1 deletion firepit/stix20.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def obs_conj(self, lhs, rhs):
return self.conj(lhs, rhs)

def comp_grp(self, exp):
return f'({exp})'
return f'({exp})' if exp else None

def simple_comp_exp(self, lhs, op, rhs):
return self._make_comp(lhs, op, rhs)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.3.33
current_version = 2.3.34
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/opencybersecurityalliance/firepit',
version='2.3.33',
version='2.3.34',
zip_safe=False,
)
14 changes: 14 additions & 0 deletions tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,3 +792,17 @@ def test_value_counts(fake_bundle_file, tmpdir):
assert henry['count'] == 2
isabel = [i for i in data if i['account_login'] == 'isabel'][0]
assert isabel['count'] == 12


def test_extract_outside_pattern(fake_bundle_file, tmpdir):
"""
Conjunction using properties "outside" the returned entity type inside parens caused issues
https://github.com/opencybersecurityalliance/firepit/issues/124
"""
with open(fake_bundle_file, 'r') as fp:
bundle = ujson.loads(fp.read())

store = tmp_storage(tmpdir)
store.cache('q1', bundle)

store.extract('nt', 'network-traffic', 'q1', "[(url:value LIKE '%page/1%' AND x-oca-asset:hostName LIKE 'pc%')]")
Loading