Commit Graph

595 Commits (6613b55a433d4278c46f51327569fce0f125724c)

Author SHA1 Message Date
Chris Lenk 6613b55a43 Update MemoryStore documentation
...now that MemorySource normalizes its data to python-stix2 objects.
2018-10-23 14:29:56 -04:00
Michael Chisholm cbe8d22d0a Added support to multi-version memory stores for markings. Also
added some more unit tests which test storing/retrieving markings
from the stores.
2018-10-17 20:54:53 -04:00
Michael Chisholm 2d89cfb0cf Remove outdated TODO's from the memory datastore module-level
docstring.
2018-10-17 15:49:58 -04:00
Michael Chisholm 864ba05b71 Fix import order to satisfy isort-check 2018-10-15 19:23:28 -04:00
Michael Chisholm d9f6a213c1 Fixed Memory source/sink/store so that it supports multiple versions
of objects.  Fixed several bugs too.
2018-10-15 18:02:49 -04:00
Michael Chisholm 5a0e102959 Modify docstring for apply_common_filters() to change what it
says are the required types for its parameters.  It gave
specific types (list and set), when really it worked with more
than just that (iterables).  And I certainly didn't only call
it with just lists and sets.
2018-10-15 18:02:48 -04:00
Maciej Urbanski e80fb4f59a
python 3.7 support 2018-10-03 18:00:38 +02:00
mbastian1135 5648d2bc45 added to pattern guide; reverting pattern str conversion (as was already proper) 2018-08-30 11:57:20 -04:00
mbastian1135 cd81d97beb added 'to_pattern()' utility for pattern expressions; more information on patterning guide 2018-08-27 16:24:23 -04:00
mbastian1135 10149b9345 added 'to_pattern()' utility for pattern expressions; more information on patterning guide 2018-08-27 16:21:14 -04:00
mbastian1135 a9de13107f pattern guide 2018-08-24 10:40:37 -04:00
Greg Back 68aac583c9
Merge pull request #204 from oasis-open/refactor-properties
Refactor Properties
2018-07-05 17:16:25 -05:00
Greg Back 49c1931b4b
Merge pull request #203 from oasis-open/200-filter-contains
Add "contains" filter
2018-07-05 15:47:09 -05:00
Greg Back 7c8113a4d9
Merge pull request #201 from oasis-open/188-uuidv4
Ensure all UUIDs are V4
2018-07-05 11:46:44 -05:00
Greg Back 12a22c0939 Remove unnecessary code related to defining properties. 2018-07-05 11:39:44 -05:00
Greg Back 25409b2099 GH-188: Update error message for invalid IDs. 2018-07-05 11:25:48 -05:00
Chris Lenk f47809eaaf Add "contains" filter
This allows filtering on, for example, observed-data objects that
contain a specific cyber observable.
2018-07-02 18:28:27 -04:00
Greg Back a2e2407025 GH-188: Fixes for old Python syntax. 2018-06-27 12:49:00 -05:00
Greg Back d2f703b9d0 Reuse reference regex to match IDs as well.
Note that this means that UUIDs will no longer be converted, even when
there's an unambiguous mapping.
2018-06-27 12:27:44 -05:00
Greg Back e749218f9b GH-188: Test that references are always valid UUID v4. 2018-06-27 12:02:13 -05:00
Greg Back e5903f1832 Sort constants. 2018-06-27 11:36:17 -05:00
Greg Back 845625c174 GH-188: WIP: Converting all IDs to be valid UUID v4. 2018-06-27 11:35:55 -05:00
Emmanuelle Vargas-Gonzalez bee537137b
Update base.py
Fix STIXJSONIncludeOptionalDefaultsEncoder call to super()
2018-06-26 11:10:36 -04:00
Greg Back b2c6acfbf6 GH-188: Restrict valid UUID values. 2018-06-22 14:40:30 -05:00
Greg Back fdf5937a71 GH-194: Remove unnecessary allow_custom kwarg. 2018-06-21 12:15:28 -05:00
Greg Back 7baeb153fa Correct "image_weight" to "image_width".
Fix #194.
2018-06-20 15:24:27 -05:00
Michael Chisholm f09960d7ff Revamp code related to "pretty" JSON serialization, fix lurking
crash bugs.
2018-06-14 21:29:50 -04:00
Greg Back 858a9752df
Merge pull request #185 from LiamSennitt/master
fix custom STIX objects with nested dictionary error #184
2018-06-12 14:40:55 -05:00
Emmanuelle Vargas-Gonzalez c12336b55a Revert changes to iterables. 2018-06-12 15:03:25 -04:00
Emmanuelle Vargas-Gonzalez 78a480aa08 Change str.isdecimal to isdigit. On lists keep iterating if unless index is found 2018-06-12 14:45:15 -04:00
Emmanuelle Vargas-Gonzalez fcffb165ad Add tests for `find_property_index` and `iterate_over_values` 2018-06-12 14:38:35 -04:00
Emmanuelle Vargas-Gonzalez 94d6610ca1 Merge branch 'master' of github.com:LiamSennitt/cti-python-stix2 2018-06-12 12:58:01 -04:00
Emmanuelle Vargas-Gonzalez 9be819ea6a Minor tweaks to return immediately after recursive call. Ensure dicts are matched alphabetically 2018-06-12 12:57:25 -04:00
Liam Sennitt bdec14937d fix flake8 errors in new test 2018-06-12 17:45:48 +01:00
Liam Sennitt 02894b5be6 add test for nested dictionary case 2018-06-12 17:32:46 +01:00
Emmanuelle Vargas-Gonzalez 91cae0b5b7 Split `find_property_index` and support multiple levels of nesting. 2018-06-08 15:43:21 -04:00
Emmanuelle Vargas-Gonzalez 60da259805 Add an example on how to call the serialize() method. 2018-06-08 15:42:59 -04:00
Michael Chisholm 5a9f627669 Pickle-proof stix objects 2018-06-06 15:30:45 -04:00
Liam Sennitt dbe9c3f087 fix custom STIX objects with nested dictionary error #184 2018-06-01 13:49:32 +01:00
Greg Back d67f2da0ea
Merge pull request #181 from oasis-open/http_error
Http error
2018-05-22 12:53:29 -05:00
= 3fb1840289 safer error class 2018-05-22 10:03:06 -04:00
Chris Lenk 636630a5aa Bump version: 1.0.1 → 1.0.2 2018-05-18 13:06:32 -04:00
= e484b7c25f formatting 2018-05-18 11:45:40 -04:00
= 6004ec597c solution to get 404 mocking problem 2018-05-18 11:19:05 -04:00
Chris Lenk ddc09f70c7 Set allow_custom if using a custom_properties dict
Fixes #179.
2018-05-17 09:04:44 -04:00
Chris Lenk cf972479ed Pass allow_custom to object dicts in a Bundle 2018-05-16 15:37:30 -04:00
= 8fc421e7d4 think the mock client was erroneous for get_object(), couldnt get object by id, just returned random object 2018-05-16 15:17:34 -04:00
= a3313bc08f creating native DataSourceError exception class to wrap taxii client and server errors 2018-05-16 13:23:50 -04:00
Chris Lenk 69c31ca3fc Pass allow_custom to ExtensionsProperty
Also fix bug caused by _properties being a class variable rather than an
instance variable. If you created an object with allow_custom,
allow_custom would be set for all future instances.
2018-05-16 12:14:33 -04:00
= 2b4c5bf264 handling and modifying exception messages in a manner acceptable by all python versions 2018-05-15 17:42:19 -04:00