Commit Graph

141 Commits (0d736509e298909fcfbdf5d548d13087b29edcd0)

Author SHA1 Message Date
clenk 0d736509e2 Fix tests 2017-05-18 11:24:43 -04:00
clenk 931de31a10 Merge branch 'parse-cyber-observables' of https://github.com/oasis-open/cti-python-stix2 into parse-cyber-observables 2017-05-18 11:08:12 -04:00
Chris Lenk b6e22bcbdf Merge pull request #12 from rpiazza/cyber-observables
Cyber observables
2017-05-18 11:02:10 -04:00
Richard Piazza f8242cffe4 correct misspelling on _check_object_constraints 2017-05-18 09:48:01 -04:00
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
clenk 3e0e80141b For object reference properties, check the type of the object
referenced, not only that it is included in the local scope.
2017-05-17 15:21:02 -04:00
Richard Piazza 7c71b9e577 added tests for File and Process extensions
fixed typo in WindowsPEOptionalHeaderType
2017-05-16 12:39:04 -04:00
clenk 9761c37f20 Replace 'field' with 'property' to be consistent
with the specification
2017-05-16 12:27:30 -04:00
clenk a520a67511 Add tests for the Network Traffic extension and
User Account extensions
2017-05-16 11:35:43 -04:00
clenk 2460fb75be Rework select properties to use get_dict(),
which automatically coerces values to a dictionary if possible
2017-05-16 09:25:08 -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