Commit Graph

24 Commits (4f00c7ca4fe3088adb664b368d8c1c65ee323362)

Author SHA1 Message Date
Emmanuelle Vargas-Gonzalez 96b81fc489 pre-commit formatting changes 2018-12-06 15:19:50 -05:00
Emmanuelle Vargas-Gonzalez 3d099bec91 Merge branch 'master' of github.com:oasis-open/cti-python-stix2 into 1.1.0-release 2018-12-06 15:08:36 -05:00
Emmanuelle Vargas-Gonzalez 71a2aa2611 update project documentation. 2018-11-28 16:51:00 -05:00
Michael Chisholm 3a2f247f68 Fixed my own brainfart with converting string filter values to
datetimes: I'd converted the object property instead of the
filter value! :-P

Also, I fixed filter validation: it was checking for exact types
of the filter values and disallowing subtypes.  This library
includes a datetime subtype named STIXdatetime, and this type
should be usable as a filter value too.  So we need to allow
subtypes.
2018-11-27 18:38:55 -05:00
Michael Chisholm 18ff6f6094 Import cleanup to satisfy tox checks 2018-11-27 17:52:38 -05:00
Michael Chisholm 3adf7800a8 Changed how filters work, with respect to datetime objects.
Timestamp properties can now be checked against filter values
which are either strings or datetime objects, using datetime
semantics (previously, it reduced to a string compare).
If a stix object property is datetime-valued and the filter
value is a string, the string is parsed to a datetime object,
rather than the other way around.

Filtering in the filesystem store now parses JSON dicts to
_STIXBase objects before applying the filters.

Due to the parsing change, bad JSON content can produce a
different kind of error, so I had to change one of the tests.
2018-11-27 17:36:17 -05:00
Emmanuelle Vargas-Gonzalez eff5369670 Merge branch 'master' of github.com:oasis-open/cti-python-stix2 into stix2.1 2018-11-01 07:57:09 -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
Emmanuelle Vargas-Gonzalez a042970a1f Merge branch 'master' of github.com:oasis-open/cti-python-stix2 into stix2.1 2018-07-11 09:41:42 -04: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
Emmanuelle Vargas-Gonzalez 7fd379d0b5 Minor style changes.
Removed OrderedDict and update()... Also a lot of single quoting except for errors
2018-06-29 18:38:04 -04:00
Chris Lenk 194672ee2b Tweak FilterSet docstrings style 2018-04-13 17:11:07 -04:00
= 6df23e7268 removed unecessary checks, (clearly I need to review python ref model) 2018-04-13 16:06:31 -04:00
= eba1844535 tweak to filter property checking to make sure original object property is not altered; added tests for this as well 2018-04-13 14:01:33 -04:00
= 61e091baf3 added FilterSet class for internal use; modified certain parsing processes to make deepcopies or suppled values(dicts) so as to taint original user passed data; added Filter logic to handle datetime objects; added/adjusted tests accordingly 2018-04-13 12:25:12 -04:00
= 1a1e5e1616 WIP- getting close though 2018-04-13 11:08:03 -04:00
= 31fc1c369a still WIP 2018-04-12 12:03:07 -04:00
= 333fea4d18 merge conflicts 2018-04-11 21:08:37 -04:00
= ba6fa595c6 WIP - finding more issues with allowing dicts as filters 2018-04-11 20:54:16 -04:00
= 27647091a5 WIP - just at stash point 2018-04-11 13:36:52 -04:00
Chris Lenk e3bbc39353 Fix bug with mutable default parameter 2018-04-05 10:07:35 -04:00
Chris Lenk f951b9b09e Factor out dupl. code for creating list of filters 2018-04-04 13:50:41 -04:00
= 536e56836c adding Filter check when the Filter property is 'type', checks the value has no underscores (issue #136) 2018-03-22 10:59:07 -04:00
Chris Lenk 5f703509be Rename "sources" subpackage to "datastore"
Fix #114.
2018-03-01 09:04:42 -05:00