Closed arcsector closed 2 years ago
Looks like the travis-ci build is failing due to issues with dependencies in mysql 5.6...
This pull request introduces 1 alert when merging 67d08c443fcf32b86c79e20332583e238bd64d56 into 2300977908c86ca31ca2e0a822d90137be9d3fa0 - view on LGTM.com
new alerts:
This pull request introduces 2 alerts when merging 2aa3522cae0efc4701112c13d58e4053324faa36 into 2300977908c86ca31ca2e0a822d90137be9d3fa0 - view on LGTM.com
new alerts:
Thank you!
Summary
This PR brings
MISP-Taxii-Server
up-to-date with the most recentPyMISP
. This should fix #80. We can also make deduplication optional so that if the MISP server is substantially large, thesearch
function doesn't hog resources. This should fix #81.Purpose
The purpose of this PR is to keep this repo backwards compatible with the most recent
PyMISP
and bring it up-to-date with the most recent version.Solution Implementation
The way we do this is by checking to make sure that the
response
key exists in thesearch
dictionary returned bypymisp.search()
. In the most recent version, theresponse
key does not exist, and theAttribute
key is moved up one level to the top level of thesearch
dictionary. If neither of these keys exist in the top level, we log the issue and move on to the next attribute.Next we fix the hanging issue by making deduplication optional, while still maintaining backwards compatibility with old
MISP-Taxii-Server
configs. We can do this by adding in a new argument to the config or env variables:misp.dedup
andMISP_DEDUP
respectively. If this config is not found, we continue deduplicating like the original program would. If it is found, and is notTrue
, we skip the deduplication loop and move straight on to uploading the package to MISP.Additional Features
There's also additional features I'd like to add in this PR:
Changes
hooks.py
search
dictionaryconfig/config.default.yaml
misp
hook configdedup
:bool
collections
:list<str>
publish
:bool