Commit Graph

133 Commits (8827149ef0f123e066ced107141e0373a16ef1b6)

Author SHA1 Message Date
Richard Piazza 8827149ef0 avoid {} set notation. It doesn't seem to be in 2.6 2017-05-17 15:51:07 -04:00
Richard Piazza f56ea8e951 added tests for process and file extensions
if no properties are passed to _check_at_least_one_property assume its all properties
when extensions are involved always check them in _check_at_least_one_property (caused by raising the exception on the enclosing type)
added _check_object_constaints to extensions, where appropriate
2017-05-17 15:33:28 -04:00
Richard Piazza 7c71b9e577 added tests for File and Process extensions
fixed typo in WindowsPEOptionalHeaderType
2017-05-16 12:39:04 -04:00
Richard Piazza 826b6af644 added missing required properties 2017-05-15 15:21:59 -04:00
Richard Piazza 6456e490cc added rest of cyber observables extensions and embedded objects
set up EXT_MAPs
added FloatProperty
implemented ExtensionsProperty
2017-05-15 13:48:41 -04:00
Richard Piazza c20f640910 Merge branch 'cyber-observables' of https://github.com/rpiazza/cti-python-stix2 into cyber-observables 2017-05-12 13:18:40 -04:00
Richard Piazza a95e91005c too Chris' suggestions to improve interproperty constraint methods
added interproperty constraint check to ExternalReferences
2017-05-12 13:18:02 -04:00
clenk 9273207576 Merge branch 'parse-cyber-observables' of https://github.com/oasis-open/cti-python-stix2 into parse-cyber-observables 2017-05-12 12:19:54 -04:00
clenk 0568a0e671 Add ExtensionsProperty and ArchiveExt 2017-05-12 11:22:23 -04:00
Richard Piazza 29871427b7 fix import error 2017-05-11 15:42:56 -04:00
Richard Piazza 191b14a4bb fix import error 2017-05-11 15:33:45 -04:00
Rich Piazza ae5fb51564 Merge branch 'parse-cyber-observables' into cyber-observables 2017-05-11 15:29:15 -04:00
Richard Piazza 94f4f48329 Changes so File object creation doesn't violate on of the MUSTs
Added three new exceptions: DependentPropertiestError, AtLeastOnePropertyError, MutuallyExclusivePropertiesError
Added tests for NetworkTraffic, Process, URL, WindowsRegistryKey and X509Certificate
Added error tests for EmailMessage, NetworkTraffic, Artifact,
Added interproperty checker methods to the base class:  _check_mutually_exclusive_properties, _check_at_least_one_property and _check_properties_dependency
Added interproperty checkers to Artifact, EmailMIMEComponent, EmailMessage, NetworkTraffic
Made NetworkTraffic.protocols required
Added X509V3ExtenstionsType class
Use EmbeddedObjectProperty for X509Certificate.x509_v3_extensions
2017-05-11 15:22:46 -04:00
clenk 13245d28ce Add EnumProperty, use it in WindowsRegistryValueType 2017-05-10 11:52:59 -04:00
clenk b18259af77 Merge branch 'parse-cyber-observables' of https://github.com/oasis-open/cti-python-stix2 into parse-cyber-observables 2017-05-10 09:20:09 -04:00
clenk 67935d08fe Fix isort settings, rename Observable to clarify
it's an internal class
2017-05-09 18:03:46 -04:00
Richard Piazza 643941a950 Merge branch 'cyber-observables' of https://github.com/rpiazza/cti-python-stix2 into cyber-observables 2017-05-09 15:52:23 -04:00
Richard Piazza 4493ac9cae style issue 2017-05-09 15:51:52 -04:00
Rich Piazza 7c1fd1e7f0 Merge branch 'parse-cyber-observables' into cyber-observables 2017-05-09 15:36:59 -04:00
Richard Piazza 075b8485e5 fix conflict 2017-05-09 15:35:44 -04:00
Richard Piazza c3477b83bf encryption_algorithm was misspelled
uncomment test_file_example_encryption_error
added _check_object_constrains and properties_populated to base class
added ObjectConstraintError
added _check_object_constrains for File
2017-05-09 15:28:32 -04:00
clenk bdd18be6c3 Switch to isort for checking import order
because it has a pre-commit hook
2017-05-09 15:10:53 -04:00
clenk f4c813d84b Merge branch 'parse-cyber-observables' 2017-05-09 12:39:17 -04:00
clenk 555c81d30f Add EmailMessage and EmbeddedObjectProperty (for embedded object types
like EmailMIMEComponent)
2017-05-09 11:03:19 -04:00
Richard Piazza 549372048c style issues 2017-05-08 21:14:32 -04:00
Richard Piazza 125f57e297 added basic cyber observables
added some test cases
in Observable constructor permit no _valid_refs in kwargs
in Observable._check_property ensure that the prop_name is in the kwargs
2017-05-08 21:03:15 -04:00
clenk d26662776c Merge branch 'master' into parse-cyber-observables 2017-05-08 11:14:54 -04:00
clenk 04e3a72a7d Add EmailAddress and ObjectReferenceProperty 2017-05-05 12:32:02 -04:00
Richard Piazza 1e7e87ef44 style errors 3 2017-05-05 10:53:28 -04:00
Richard Piazza ddecd52904 style errors 2 2017-05-04 19:30:09 -04:00
Richard Piazza c9320ad895 style errors 2017-05-04 16:41:37 -04:00
Richard Piazza 200bb8556f added unsetting capability
cleaned up MissingFieldsError tests
error when new modified property is earlier than current modified property
2017-05-04 16:34:08 -04:00
clenk 1a75d830bb Add Autonomous System 2017-05-03 18:19:30 -04:00
clenk 2c67b90638 Add Artifact type 2017-05-03 17:35:33 -04:00
clenk c63ba8e447 Add ObservableProperty, DictionaryProperty, HashesProperty,
BinaryProperty, and HexProperty
2017-05-03 14:10:10 -04:00
Richard Piazza 5b8585b392 added versioning test for embedded_object
replaced VersioningError with RevokeError and UnmodifiablePropertyError
added __deepcopy__ to base class to handle embedded_objects
2017-05-03 12:14:09 -04:00
Richard Piazza c2d628db50 import style errors 2 2017-05-02 15:53:07 -04:00
Richard Piazza cda2b47691 import style errors 2 2017-05-02 14:29:59 -04:00
Richard Piazza 411c087fc1 import style errors 2017-05-02 14:25:01 -04:00
Richard Piazza a70fc2c952 Added versioning api, with tests 2017-05-02 14:17:26 -04:00
Richard Piazza 4efe5357b1 Added versioning api, with tests 2017-05-02 14:06:42 -04:00
clenk c5ba5dad65 Modify UUID checking 2017-04-25 10:03:37 -04:00
clenk cd815bfe84 Fix import order, add flake8-import-order plugin
to Tox
2017-04-24 18:29:56 -04:00
clenk fe4c4d78fc Fix typos, add to Property class documentation, small performance
boosts, and let strings and booleans in a ListProperty be handled by
__call__().
2017-04-24 17:34:16 -04:00
clenk 76acd8c0c2 Merge branch 'master' into parsing 2017-04-19 15:22:36 -04:00
clenk d06df8b9da Fix parsing errors
- Typos in Attack Pattern tests
- Put MarkingDefinition, ExternalReference, and KillChainPhase together
  in a file for objects that aren't SDOs or SROs
- Create utility function to return dictionary from string or
  file-like object
- Put off testing parsing Cyber Observable Objects until a later commit
2017-04-19 14:32:56 -04:00
clenk fabfbe20ec Parse all SDOs and SROs 2017-04-19 09:22:08 -04:00
Greg Back 6bf3584616 Create custom exception class for modifying an immutable object. 2017-04-18 15:06:41 -05:00
Greg Back 91cecb7b0c Add exception for extra/invalid custom properties. 2017-04-18 14:56:16 -05:00
Greg Back 32ff00559e Rename exception class. 2017-04-18 14:42:59 -05:00