Michael Chisholm
e2f5d60b51
Fix an indexing error which caused FileSystemSource.get() to return
...
the oldest object instead of the newest.
2018-11-01 20:25:00 -04:00
Michael Chisholm
e2d9325356
Adjust import order to satisfy tox import check
2018-11-01 20:25:00 -04:00
Michael Chisholm
ee57596d6a
Implemented clenk's suggested changes in multi-version filesystem
...
store:
- Use utils.get_type_from_id() instead of my own (I didn't know it
was already there)
- Use dict-style instead of attribute-style access to get stix
object properties
- Convert timezone-aware timestamps to UTC in _timestamp2filename()
to ensure that different times always result in different
filenames.
Also added a couple new tests for _timestamp2filename(), which
exercises the timezone conversion code.
2018-11-01 20:25:00 -04:00
Michael Chisholm
51668a9a04
Removed the old FileSystemSource.query method. I'd renamed it
...
"query2" and forgot about it and left it there...
2018-11-01 20:25:00 -04:00
Michael Chisholm
9486b46f77
Add multi-version support to the filesystem datastore.
...
Factored out the _is_marking() function from the memory datastore
module to utils so it can be reused, and changed both filesystem
and memory datastore modules to import and use it.
2018-11-01 20:25:00 -04:00
Emmanuelle Vargas-Gonzalez
f85f4e566b
Bump version: 1.0.2 → 1.0.3
2018-10-31 13:46:47 -04:00
Chris Lenk
3542604b02
Merge pull request #209 from chisholm/taxii_api_updates
...
Fixed a test fixture to call the cti-taxii-client Collection constructor correctly
2018-10-31 12:04:34 -04:00
Chris Lenk
db300d1f21
Fix `created` millisecond precision in TLPs
...
A marking definition's `created` property doesn't require millisecond
preprecision, but for TLP markings the TLP instances provided in the
spec must be used and they all use millisecond precision.
2018-10-25 13:58:21 -04:00
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
Michael Chisholm
541c682bf6
Fixed a test fixture to call the cti-taxii-client Collection
...
constructor correctly. It had been recently changed to address
issue #39 in that library.
2018-09-07 17:47:24 -04: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