Commit Graph

201 Commits (c3a1c3dc3a1584aba06b019a1ce6add37b8b0610)

Author SHA1 Message Date
Chris Lenk be07c32500 Add parse() to Environment layer
The Environment layer does not keep its own mapping of custom object types.
If we think it likely that users will want to maintain separate lists of
custom object types between two or more Environments, we can add this
later.
2017-09-08 12:40:01 -04:00
Chris Lenk 4dfb5d2365 Test Environment layer 2017-09-08 09:01:12 -04:00
Greg Back adac43708b Merge pull request #46 from oasis-open/markings
Marking Support
2017-09-05 19:08:45 +00:00
Chris Lenk 42962e6675 Improve markings tests
- Test markings functions with both dictionaries and our _STIXBase-derived
  classes as input.
- Slightly improve test coverage.
- Drop Python 2.6 support.
2017-09-01 16:41:16 -04:00
Chris Lenk cc66e1a492 Make markings function signatures consistent
Put `marking` before `selectors`. The granular marking version of
`is_marked` requires selectors to not be None.
2017-09-01 10:50:01 -04:00
Emmanuelle Vargas-Gonzalez 6f36ea8488 Merge remote-tracking branch 'oasis/master' into datastores 2017-09-01 10:13:57 -04:00
Emmanuelle Vargas-Gonzalez 13f2810b25 Remove name positional argument, clean memory.py redundant codeother minor changes. Increase coverage. 2017-09-01 08:15:50 -04:00
Greg Back 124da846c3 Merge branch 'master' into markings 2017-08-31 20:36:59 +00:00
Greg Back b1054e780a Merge remote-tracking branch 'origin/master' into datastores 2017-08-31 19:52:48 +00:00
Greg Back ba846f9501 Clean up some tests. 2017-08-31 18:23:08 +00:00
Greg Back 7b46283a5c Build filter function map 2017-08-31 18:21:29 +00:00
Chris Lenk 9d45a3dca2 Keep MALWARE_KWARGS to a minimal set
...but use an additional set with a description for marking tests.
2017-08-31 12:51:13 -04:00
Chris Lenk 15287959a4 Modify versioning API to work on dictionaries
This includes new_version() and revoke().
2017-08-31 12:28:07 -04:00
clenk 8a33cb7716 Touch up ObjectReferenceProperty checks
- reword "_refs" error
- check with isinstance instead of __class__.__name__
2017-08-30 16:15:05 -04:00
clenk 0e658255a8 Move check to when custom observable is defined
Catch properties named "_ref" or "_refs" that aren't
ObjectReferenceProperty when the custom observable is defined, not when
it is instantiated.
2017-08-30 15:33:28 -04:00
Emmanuelle Vargas-Gonzalez 8ca2c3390b Minor changes to DataSource.apply_common_filters(). Improve overall code coverage. 2017-08-29 15:15:32 -04:00
Emmanuelle Vargas-Gonzalez 415c53066f Code coverage changes, fix some tests. Add stix2-validator dependency. 2017-08-28 15:19:55 -04:00
Emmanuelle Vargas-Gonzalez aea076103c Update tests to improve coverage. 2017-08-28 14:33:12 -04:00
Emmanuelle Vargas-Gonzalez 07bbe23a98 Add some tests for custom objects. 2017-08-28 14:32:05 -04:00
clenk 095c5066d5 Touch up markings tests
Increase code coverage and s/tlo/sdo/
2017-08-25 15:56:39 -04:00
clenk 0cd75e3fba Increase code coverage 2017-08-24 17:53:43 -04:00
clenk 6fa3c84aa3 Improve tests and coverage for custom content
In ObservableProperty.clean(), parse_observable() will handle the issue
of non-cyber observable objects being presnt in an observable property.
The line raising a ValueError would not be reached so it was removed.
2017-08-24 15:46:36 -04:00
Emmanuelle Vargas-Gonzalez dd17e88ae0 Code refactor/clean-up, changed some exceptions. Update docstrings. 2017-08-24 12:47:14 -04:00
clenk ee49e78c72 Add custom extensions to cyber observables
Fix #31.
2017-08-23 18:36:24 -04:00
Emmanuelle Vargas-Gonzalez 8d4c1d55b5 Minor style changes. 2017-08-23 13:12:40 -04:00
Emmanuelle Vargas-Gonzalez f33427328b Update tests for object and granular markings. 2017-08-23 13:07:22 -04:00
Emmanuelle Vargas-Gonzalez f437a4df5b Merge branch 'datastores' of github.com:oasis-open/cti-python-stix2 into datastores 2017-08-22 10:47:23 -04:00
Emmanuelle Vargas-Gonzalez d060abbed5 Updated regex expressions. Thanks to @drothenberg for that contribution! 2017-08-22 10:47:13 -04:00
Greg Back 69eb09c32b Merge remote-tracking branch 'origin/master' into datastores 2017-08-21 22:40:07 +00:00
Greg Back 4cd99f04ea Use version of taxii2-client from PyPI. 2017-08-21 22:16:23 +00:00
clenk 8687521111 Change object markings for immutable SDOs 2017-08-21 13:57:01 -04:00
clenk d4edb8b0bc Validate patterns when creating Indicators 2017-08-18 14:22:57 -04:00
clenk c0d02fbfcd [WIP] Touch up marking code 2017-08-18 12:36:34 -04:00
clenk 14b922ba92 Merge remote-tracking branch 'emmanvg/marking-support' into markings 2017-08-17 12:26:46 -04:00
Emmanuelle Vargas-Gonzalez 681be1a5d9 Make CompositeDataStore subclass DataStore. Remove deduplicate() from CompositeDataSource. 2017-08-16 09:58:33 -04:00
Emmanuelle Vargas-Gonzalez 4ffc8edeeb Update all tests. Re-organize EXPECTED values, update some regex expressions. 2017-08-15 13:41:51 -04:00
Emmanuelle Vargas-Gonzalez cb5c4ad080 Merge pull request #42 from oasis-open/bundles Parse bundles correctly 2017-08-14 15:21:58 -04:00
Emmanuelle Vargas-Gonzalez 569ca34d78 Remove test skip for data_sources. 2017-08-14 15:02:26 -04:00
Emmanuelle Vargas-Gonzalez 226a41e0ff Merge pull request #41 from oasis-open/namedtuple-filters Use Namedtuples for Filters. 2017-08-14 15:01:07 -04:00
clenk ee8013d782 Parse bundles correctly
This required refactoring parts of the library. Code in __init__.py
merged into bundle.py, which was renamed core.py. Code in other.py was
merged into common.py.

Fixes #40.
2017-08-11 16:18:20 -04:00
Emmanuelle Vargas-Gonzalez 86fd3778f5 Formatting changes, replace deduplicate() code in DataSource, missing super() calls to initialize objects. 2017-08-11 08:10:20 -04:00
Greg Back 961dfdc984 Convert rest of code to use namedtuple Filters 2017-08-09 19:25:06 +00:00
Greg Back 87f7503c0a Convert filters to be NamedTuples 2017-08-09 18:49:06 +00:00
Emmanuelle Vargas-Gonzalez a4ead4f6e7 Formatting changes, skip add/remove filter test, change deduplicate() approach. 2017-08-09 13:31:07 -04:00
Greg Back b8c96e37a2 Update to get tests passing 2017-07-20 20:30:04 +00:00
Greg Back b82606ba38 Clean up TAXII Datastore to use latest TAXII client 2017-07-20 19:36:54 +00:00
Greg Back 55e92bc237 Update with correct class name
Also PEP-8 fixes
2017-07-19 21:30:29 +00:00
Greg Back bf9677094f Merge branch 'master' into datastores 2017-07-19 21:21:08 +00:00
Greg Back bac87465cb Merge pull request #35 from oasis-open/pattern_expressions
Pattern expressions
2017-07-19 14:17:57 +00:00
Richard Piazza a2aacc5e20 merge all classes into patterns.py 2017-07-19 14:03:43 +00:00