Commit Graph

269 Commits (513b172a5c964a3dcbdc6b3289d94d25b2ff59a7)

Author SHA1 Message Date
clenk 513b172a5c Tell bumpversion to look in the right file 2017-07-24 15:45:29 -04:00
clenk fe91907615 Fix link in README for PyPI
Previous version would not break display, but the link would go nowhere.
2017-07-20 09:45:39 -04:00
Greg Back 750b408801 Avoid byte/str error on reading version file. 2017-07-19 22:17:48 +00:00
Greg Back 3420bb3493 Convert README to ReStructuredText 2017-07-19 22:04:54 +00:00
Greg Back fd74edc33b Update setup.py to match PyPA sampleproject 2017-07-19 21:51:07 +00:00
Greg Back 59b53661f6 Update README
[ci skip]
2017-07-19 14:20:52 +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
Greg Back 595ba10695 Merge pull request #34 from oasis-open/object-factory
Object factory
2017-07-19 13:54:24 +00:00
Richard Piazza 979c09d8c0 fixed import sorting error 2017-07-18 20:36:27 +00:00
Richard Piazza 27af0c0d5b Fixed style errors 2017-07-18 20:34:39 +00:00
Richard Piazza 6fa009e509 added object_paths
added more tests for pattern expressions
added "set" comparison expressions
implemented make_constant
fixed type name for EmailAddress
2017-07-18 20:30:02 +00:00
Richard Piazza c1b07ef505 Introduce constant objects for literals in pattern expressions
fixed idioms
2017-07-18 20:26:46 +00:00
Richard Piazza c8bcece6f6 added tests for expressions
fix __str__ methods
2017-07-18 20:26:46 +00:00
Richard Piazza c0467da5f9 added classes for Pattern Expressions 2017-07-18 20:26:44 +00:00
clenk 4bdbb4a2f9 Deep-copy in Object Factory and allow appending multiple items to list
properties in ObjectFactory.create()
2017-07-18 12:05:19 -04:00
clenk 0a2cda00cc Add object factory docstring 2017-07-17 15:23:20 -04:00
Greg Back 9ea65933c6 Merge pull request #32 from oasis-open/issue23
Refactor Observables code for issue #23
2017-07-17 19:05:03 +00:00
clenk 2e45cacd52 Add to list properties like `external_references`, but include option to
replace instead
2017-07-17 14:56:13 -04:00
clenk e233a424fb Drop granular markings from object factory for now 2017-07-14 16:11:48 -04:00
clenk 5c5903179d Fix import sort order 2017-07-14 16:02:29 -04:00
clenk 7ebf5ac7c7 Fix timestamp in test 2017-07-14 15:30:19 -04:00
clenk e1330692c8 Move ObservableProperty, ExtensionsProperty, and Observable parsing code
into observables.py to prevent circular imports and fix #23.
2017-07-14 15:10:12 -04:00
Greg Back c29acfa3ce Alternate implementation of ObjectFactory. 2017-07-13 15:35:22 +00:00
clenk 4dba41afc8 Add created to object factory, clean up code 2017-07-13 09:45:43 -04:00
clenk 6ddad22810 Add external references to object factory 2017-07-12 16:11:51 -04:00
clenk 593f16662a Add granular markings to object factory 2017-07-12 15:22:50 -04:00
clenk 659ad3df89 Add object markings to object factory 2017-07-12 14:44:52 -04:00
clenk 0c47936ee0 Create ObjectFactory class
currently only supports created_by_ref
2017-07-12 11:36:15 -04:00
clenk 6f680be8a6 Add stix2.__version__ 2017-07-06 09:41:50 -04:00
Greg Back 9bfc240008 Merge pull request #27 from oasis-open/issue26
Allow passing a list to Bundle constructor
2017-07-06 13:36:06 +00:00
clenk 1d3c59cc44 Move TLP constants up to stix2 namespace 2017-07-05 13:27:09 -04:00
clenk 1ea9671b68 Allow passing a list to Bundle constructor
Fix #26
2017-07-05 11:31:56 -04:00
Greg Back f8e3a4f0e8 Merge pull request #25 from oasis-open/issue24
Add timestamp precision for `created` and `modified`
2017-06-29 20:41:15 +00:00
Greg Back 2c8efc93bb Add information on API layers 2017-06-29 12:51:17 +00:00
clenk 29d9467ce0 Add more timestamp test cases, address suggestions 2017-06-28 15:55:23 -04:00
clenk e01ce132db Add timestamp precision for `created` and `modified`
Fix #24
2017-06-22 18:47:35 -04:00
Greg Back 07ccf9ec03 Merge pull request #22 from oasis-open/custom
Custom properties, object types, and cyber observables
2017-06-15 16:11:55 +00:00
clenk fdbb6ff337 Add custom Cyber Observables 2017-06-14 09:36:35 -04:00
clenk d4e92dd813 Allow adding validation to custom object types
_Custom.__init__() is a solution to recursion errors arising from using
a decorator. See https://stackoverflow.com/q/14739809/1013457
2017-06-13 10:27:31 -04:00
clenk bcfb13f23c Add custom STIX Object types 2017-06-12 16:22:16 -04:00
clenk 8f1ae4e6d3 Add custom properties via 'allow_custom'
Custom properties can be specified by passing them to a STIX object
constructor in the 'custom_properties' argument, or with the
'allow_custom' argument set to True, which will add any unrecognized
keyword arguments as properties on the object. The 'allow_custom'
argument can also be used with the parse() and parse_observable()
functions.
An error is now raised when attempting to parse objects without a 'type'
property, such as external references, kill chain phases, and granular
markings. The object which contains them is what should be parsed, not
these objects themselves.
2017-06-12 13:04:20 -04:00
clenk 9036c7f7b8 Add custom properties 2017-06-09 12:30:19 -04:00
Greg Back 41481139bf Merge pull request #21 from emmanvg/master
Minor Code Changes.
2017-06-08 10:04:09 -05:00
Emmanuelle Vargas-Gonzalez c1c5c05f47 Some changes to Process and EmailMessage objects. Added tests. 2017-06-08 10:09:18 -04:00
Emmanuelle Vargas-Gonzalez b9f63e8de6 Minor Code Changes. 2017-06-08 08:42:32 -04:00
clenk 860efcc230 Make object attribute access act like dictionary access, raising an
error for any property (including custom or optional) not set on the object.
2017-06-07 11:06:20 -04:00
Greg Back 35e973243f Merge pull request #20 from emmanvg/master
Instantiate ImmutableError, more descriptive message. Check the attribute being requested actually exists in object. Fix being able to set certain empty values like: list, strings, False, etc.
2017-06-05 09:30:04 -05:00
Emmanuelle Vargas-Gonzalez a38b912d19 Change _check_property_dependency() to also check for values for the required properties. 2017-06-02 13:48:44 -04:00
Emmanuelle Vargas-Gonzalez 653eef4b95 Revert changes to test_file_example_encryption_error() 2017-06-02 13:47:08 -04:00