Commit Graph

330 Commits (cbfbf5114741aa76661b5bde8ad8b6b6715adc93)

Author SHA1 Message Date
Raphaël Vinot 286712d0e1 fix: first-seen and last-seen on attributes and objects were not checked for sanity 2021-05-11 07:28:54 -07:00
Raphaël Vinot 18049212a5 new: Support for correlation exclusion list
Fix #732
2021-04-22 10:47:58 +02:00
Raphaël Vinot 31608b1480 chg: strip NULL string from value
https://github.com/MISP/PyMISP/issues/678
2021-03-15 14:09:50 +01:00
Raphaël Vinot aee6945e95 fix: enable taxonomy failed if global pythonify is on 2021-03-09 16:35:00 +01:00
Raphaël Vinot a0bda8736a chg: Add test case, fix mypy 2021-03-05 12:11:00 +01:00
Raphaël Vinot 59946a6a6d chg: take simple_value as value in MISPObject.add_attribute 2021-03-05 11:58:58 +01:00
Raphaël Vinot 4a2367ec96 fix: Make mypy happy in python 3.6 and 3.7 2021-03-02 12:37:35 +01:00
Raphaël Vinot 9f7282e8f4 fix: cosmetic changes, fix mypy 2021-03-02 12:21:59 +01:00
Raphaël Vinot 8137389452 chg: Bump tests for galaxy cluster 2021-03-02 11:49:31 +01:00
Raphaël Vinot 2e05a1b24f new: soft delete object in MISPEvent
Fix #706
2021-02-27 14:53:15 +01:00
Tom King 5445479960 chg: Don't parse the meta key into cluster elements on a MISPEvent, but allow users to manually perform this action 2021-02-08 11:52:08 +00:00
Tom King a94b81ae72 Merge remote-tracking branch 'upstream/main' into feature/misp-galaxy-2 2021-02-08 11:50:38 +00:00
Tom King 3b5102f0dc chg: Add in delete function for a MISP Object 2021-01-31 21:37:25 +00:00
Tom King 7d4cfc40b7 chg: Add in nosetests for MISP Galaxy functions, check default key as a dict attribute not MISPAbstract attribute 2021-01-30 15:34:29 +00:00
Tom King 96636639c4 chg: Add in more Galaxy 2.0 functions and code cleanup 2021-01-30 13:56:40 +00:00
Tom King eb28f01f01 Merge remote-tracking branch 'upstream/main' into feature/misp-galaxy-2 2021-01-29 10:56:27 +00:00
Raphaël Vinot 8c09a5bbc9 chg: Use lief 0.11.0, generate authenticode entries 2021-01-28 14:45:36 +01:00
Tom King 164791e980 new: MISP Galaxy 2.0 capability 2021-01-16 15:56:30 +00:00
Tom King e6cb4ff9ee fix: Call the AbstractMISP.from_dict at the end of the function to ensure the edited flag remains false 2021-01-14 18:58:35 +00:00
Tom King 12c29e6a06 new: Add in ability to create/update/delete MISP Event Reports 2021-01-14 16:45:25 +00:00
Raphaël Vinot 649e068fd8 chg: clarify misp_objects_template_custom 2020-12-01 14:32:03 +01:00
Raphaël Vinot 3375c9d519 chg: Add docstring for misp_objects_template_custom 2020-12-01 14:14:21 +01:00
Raphaël Vinot 0d86a4339f new: Allow to pass an object template to MISPObject.__init__
MISPObject part of #6670
2020-12-01 14:01:32 +01:00
Raphaël Vinot babb04cbc2 chg: Improve documentation of MISPAttribute.malware_binary 2020-11-30 09:53:49 +01:00
Raphaël Vinot c8cb3bb589
chg: remove trailing space 2020-11-28 11:28:22 +01:00
Raphaël Vinot 201eeeb729
Update mispevent.py 2020-11-28 02:06:48 +01:00
Raphaël Vinot fe91e10ced chg: on-demand decryption of malware-binary, speeds up pythonify. 2020-11-26 13:31:10 +01:00
Raphaël Vinot 4c2ee4fd2f fix: Properly match IO in load event 2020-11-25 13:34:13 +01:00
Raphaël Vinot f254e15bd4 fix: Typing on recent mypy 2020-11-25 13:19:19 +01:00
Raphaël Vinot 3b130bd973 fix: object_uuid could be None
Fix #640
2020-11-10 12:04:45 +01:00
Raphaël Vinot 0d8467920f fix: Missing f-string marker 2020-11-06 11:01:08 +01:00
Lott, Christopher (cl778h) aa206d0009 chg: format docstrings in mispevent.py
Add ":param " prefix to parameters to improve ReadTheDocs output.
Fix some minor typos in docstrings.
2020-10-27 11:14:06 -04:00
Raphaël Vinot c39328f30a fix: Do not modify default_attributes_parameters in MISPObject 2020-09-15 17:01:56 +02:00
Lott, Christopher (cl778h) f1de0fb794 chg: add docstrings and extend conf.py for RTD
Add minimal docstrings to public methods so ReadTheDocs will display them.
Add autodoc mock import for lief so RTD can generate HTML for tools.

This fixes issue #626
2020-09-15 10:40:21 -04:00
Raphaël Vinot 50e5f156bd chg: Improve error message, add comments, rename whitelist->allowedlist 2020-09-15 12:31:22 +02:00
Raphaël Vinot 918f841087 chg: Rename blacklist -> blocklist 2020-09-01 19:29:12 +02:00
Raphaël Vinot be8c94e6e7 chg: Cleanup blocklist methods 2020-08-04 12:20:21 +02:00
Raphaël Vinot 2bbf888ca7 new: Blacklist methods 2020-08-03 15:59:54 +02:00
Paal Braathen ff62f1c19c Linting/Add missing whitespace 2020-07-28 20:05:42 +02:00
louis 67d2e47b3b chg: Make MISPObject standalone by default
standalone defaults to True in MISPObject.__init__, and is set to False
when the object is added to an event.
2020-06-30 12:36:19 +02:00
louis 86f758e5b4 new: Add MISPObject.standalone property
Setting MISPObject.standalone updates MISPObject._standalone and
add/removes "ObjectReference" from AbstractMISP.__not_jsonable using
update_not_jsonable/_remove_from_not_jsonable.
2020-06-29 18:55:07 +02:00
louis aa1c95f344 chg: Add MISPObject._standalone type 2020-06-29 18:38:27 +02:00
Raphaël Vinot 578801e50d fix: Keep deleted key in MISPObject and MISPObjectAttribute 2020-06-19 14:12:03 +02:00
Raphaël Vinot 1e9eed198e fix: Do not fail if the attribute value is not a string 2020-05-29 01:23:34 +02:00
Raphaël Vinot 74a5d04bda fix: Properly strip value in MISPObject.add_attribute, take 2
Fix #546
2020-05-29 01:02:02 +02:00
Raphaël Vinot 524aa13641 fix: Properly strip value in MISPObject.add_attribute
Fix #546
2020-05-29 00:56:32 +02:00
Raphaël Vinot 526321c8b4 new: Add deleted in field export
Fix #586
2020-05-26 10:56:46 +02:00
Raphaël Vinot 7178d3a8a0 fix: settings is not required in MISPFeed 2020-05-15 11:44:13 +02:00
Raphaël Vinot 18c1460376 chg: Simplify delete_attribute 2020-05-14 12:43:10 +02:00
Raphaël Vinot 14d278fff2 fix: Properly load feeds, fix undefined variable 2020-05-12 11:24:47 +02:00
Raphaël Vinot 4a060b3c07 new: Self registration, object level search (initial) 2020-05-07 12:17:31 +02:00
Raphaël Vinot 029aa8df79 chg: Bump objects, deps 2020-04-30 10:20:21 +02:00
Raphaël Vinot 2a9c79a1e9 fix: Incorrect expectation of attribute value to be a str - take 2
Related #553
2020-03-13 12:02:11 +01:00
Raphaël Vinot 8cf3887d54 fix: Incorrect expectation of attribute value to be a str
Fix #553
2020-03-13 11:02:51 +01:00
Raphaël Vinot 8d6e69ce65 fix: mypy, more typing 2020-02-24 17:09:42 +01:00
Raphaël Vinot 94c2a644af fix: do not skip data in add_attribute methods 2020-02-24 14:13:10 +01:00
Raphaël Vinot 35377399e8 new: Add uuid by default in MISPEvent, add F/L seen in feed output. 2020-02-21 14:12:36 +01:00
Raphaël Vinot 732908a1d3 fix: Remove debugging 2020-02-05 17:29:40 +01:00
Raphaël Vinot a1e96731b2 Merge branch 'master' of github.com:MISP/PyMISP 2020-02-05 13:11:56 +01:00
Raphaël Vinot fe80924d60 chg: str to int, properly load SharingGroup
Fix #535
2020-02-05 13:08:17 +01:00
mokaddem 52774769ac fix: [*-seen] Consider that `-` can also be in the date component while
parsing
2020-01-31 12:26:50 +01:00
Raphaël Vinot 98e1feefa1 fix: Syntax and typos 2020-01-28 14:12:39 +01:00
Raphaël Vinot f43266fcf2 chg: Normalize to_datetime conversion 2020-01-27 20:14:14 +01:00
Raphaël Vinot 32445973bd new: Support for first_seen/last_seen
Cleaner import of datetime
2020-01-27 19:07:52 +01:00
Raphaël Vinot 2ab47e191a fix: Bugs introduced by last commit 2020-01-23 11:03:23 +01:00
Raphaël Vinot b0e95fd5af chg: Refactorize typing, validate 2020-01-23 10:27:40 +01:00
Raphaël Vinot aa17663b58 chg: Add more typing information 2020-01-03 15:42:15 +01:00
Raphaël Vinot 2e064563c3 chg: Add typing markup 2020-01-02 15:55:00 +01:00
Raphaël Vinot 24a8f90ea8 new: Remove python < 3.6 support. 2019-12-18 14:45:14 +01:00
Raphaël Vinot 24594a5aea fix: Test case on reference 2019-12-11 23:38:41 +01:00
Raphaël Vinot c9b5d24073 fix: Add missing fields to event & attribute for the feed output 2019-12-11 23:12:14 +01:00
Raphaël Vinot 056cab15a0 chg: Move scrippsco2 feed generator to a sub directory 2019-12-10 16:39:24 +01:00
Raphaël Vinot 0d354b2032 fix: Update tests. 2019-11-29 16:33:17 +01:00
Raphaël Vinot 446649992f fix: Raise PyMISPError instead of Exception 2019-11-27 17:08:15 +01:00
Raphaël Vinot 78c9f4f605 chg: Few more improvements on the feed export 2019-11-25 16:35:56 +01:00
Raphaël Vinot 6098cd869f chg: Make the feed generator more generic 2019-11-22 17:36:24 +01:00
Raphaël Vinot 61867a8257 fix: improve stability of feed output 2019-11-20 12:49:42 +01:00
Raphaël Vinot 8d92a77c92 fix: Do not unitialize the uuid in MISPEvent 2019-11-20 10:52:27 +01:00
Raphaël Vinot b1818b1751 new: Add to_feed export to MISPEvent 2019-11-19 15:53:58 +01:00
Raphaël Vinot 2da35829b1 chg: Allow to sort and indent the json output for objects 2019-11-18 18:04:02 +01:00
Raphaël Vinot 880fb300ea chg: Use default category from template
Fix #477
2019-10-18 14:44:57 +02:00
Raphaël Vinot fef328d395 fix: Python <3.4 should work again....
Fix #482
2019-10-18 11:56:09 +02:00
Raphaël Vinot c509b22beb new: Add support for UserSettings 2019-10-16 17:22:19 +02:00
Raphaël Vinot cc204475ff chg: Test if json exists in cached method 2019-10-10 18:33:55 +02:00
Raphaël Vinot 6cc7730d24 chg: Decode datetime without dateutils if possible 2019-10-10 18:27:47 +02:00
Raphaël Vinot 7c42a5f748 fix: Python2 SyntaxError... 2019-10-10 08:58:06 +02:00
Raphaël Vinot 02659a5782 chg: Add support for rapidjson, refactoring and code cleanup. 2019-10-09 16:07:40 +02:00
Raphaël Vinot 898bc96ea6 chg: Cleanups 2019-10-08 16:06:28 +02:00
Raphaël Vinot 3bb220c94b chg: Cleanups and improvements 2019-10-08 08:15:56 +02:00
Raphaël Vinot f9118f8c85 Merge branch 'mback2k-template-cache' into perf 2019-10-07 03:53:50 -06:00
Raphaël Vinot 6303c6c6a9 Merge branch 'template-cache' of https://github.com/mback2k/PyMISP into mback2k-template-cache 2019-10-06 13:08:39 -06:00
Raphaël Vinot bae942d2ec fix: Cache object templates at AbstractMISP level
Related #468 and  #471
2019-10-03 13:54:43 -07:00
Raphaël Vinot 6c1f988b13 fix: Cache describeTypes at AbstractMISP level. 2019-10-03 13:23:00 -07:00
Marc Hoersken e05c7d9b4f Cache JSON definitions in memory LFU cache provided by cachetools
- Path and modified time of JSON file are used as the cache key
- Global state is hidden away inside a root-class for re-use
- Maximum size is 150 considering the number of JSON definitions

During my tests the memory usage of the test suites was halved.
2019-10-03 19:30:57 +02:00
Raphaël Vinot 7912df8f37 fix: Python 2.7 support
I want a cookie.
2019-09-04 14:35:02 +02:00
Raphaël Vinot 9df636cd37 chg: Update upload malware/attachment example script
Fix #447

Make data at attibute level more generic with getter/setter methods
2019-09-04 13:59:25 +02:00
Raphaël Vinot 7402e1b3b6 new: Initial support for communities 2019-08-29 18:08:53 +02:00
Raphaël Vinot cebdc2ef3f fix: Automatically skip empty string in add_attribute at object level
Fix #439

Re-enable test cases.
2019-08-28 14:46:02 +02:00
Raphaël Vinot 0b7314c474 new: Delegate Event
And more test cases
2019-08-26 16:24:48 +02:00
Raphaël Vinot e95948bcf6 chg: Better handling of sightings. 2019-08-20 15:34:21 +02:00