Commit Graph

58 Commits (134267bfd6159caed17882c3a6a54ef49eb7346f)

Author SHA1 Message Date
Chris Lenk 2b6023e7bb Allow objects with custom properties in bundles 2017-10-09 17:33:12 -04:00
Chris Lenk eac1ce94de Improve docstrings for Sphinx output
Also remove package and module names from classes and functions.

Also remove stix2.base from docs. We hide all private classes and
functions from the docs, so the only thing the documentation for base
included was STIXJSONEncoder.
2017-09-22 11:24:55 -04:00
Chris Lenk c0fd740e0a Improve autodoc output
- Add markings and sources
- Tidy up some docstrings
2017-09-22 10:01:00 -04:00
Greg Back 124da846c3 Merge branch 'master' into markings 2017-08-31 20:36:59 +00:00
Emmanuelle Vargas-Gonzalez 415c53066f Code coverage changes, fix some tests. Add stix2-validator dependency. 2017-08-28 15:19:55 -04: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 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
Greg Back 595ba10695 Merge pull request #34 from oasis-open/object-factory
Object factory
2017-07-19 13:54:24 +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 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
clenk 659ad3df89 Add object markings to object factory 2017-07-12 14:44:52 -04: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
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
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
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 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
clenk 0568a0e671 Add ExtensionsProperty and ArchiveExt 2017-05-12 11:22:23 -04:00
clenk 13245d28ce Add EnumProperty, use it in WindowsRegistryValueType 2017-05-10 11:52:59 -04:00
clenk 67935d08fe Fix isort settings, rename Observable to clarify
it's an internal class
2017-05-09 18:03:46 -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 555c81d30f Add EmailMessage and EmbeddedObjectProperty (for embedded object types
like EmailMIMEComponent)
2017-05-09 11:03:19 -04:00
clenk 04e3a72a7d Add EmailAddress and ObjectReferenceProperty 2017-05-05 12:32:02 -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
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
Greg Back 2aa1f5cedd Add exception for invalid Property values. 2017-04-18 14:19:16 -05:00
clenk a14d507f48 Add IntegerProperty 2017-04-18 09:19:38 -04:00
clenk 635a3ec389 Combine clean() and validate() 2017-04-17 15:13:11 -04:00
clenk 40810646fb Fix Flake8 error and use UTC as default timezone 2017-04-17 13:16:14 -04:00
clenk b4f116a33f Fix TimestampProperty
- improved timestamp formatting
- python-stix2 will only include subsecond values if they don't equal 0
- in Python 3.6, datetime.astimezone doesn't throw an error on naive
  timestamps as in previous versions
2017-04-17 10:48:13 -04:00
clenk 35981025c5 Rework ListProperty, fix merging issues 2017-04-14 10:42:17 -04:00
clenk bc8bdccece Merge branch 'master' into parsing 2017-04-11 15:05:22 -04:00
clenk 2e3dfe5d84 Add TimestampProperty 2017-04-11 12:10:55 -04:00
clenk dd382520d6 Clean up code/comments 2017-04-10 10:18:54 -04:00
clenk bab8d187c9 Rework kill chain phases 2017-04-07 17:34:06 -04:00
Richard Piazza 3c17c9259c Add Sighting object and data markings
- Update ReferenceProperty to allow specifying a particular object type
- Update ListProperty and add SelectorProperty
- Add description to Relationship
2017-04-07 16:07:17 -05:00
clenk 93b8076ae3 Use StringProperty and ListProperty in Malware objects,
fix bugs in those properties
2017-04-07 14:53:40 -04:00
clenk 474833248d Flesh out ListProperty, add StringProperty 2017-04-06 19:17:32 -04:00
clenk 253989cc52 Coerce boolean properties automatically
for values like "true", "F", or 1
2017-04-06 16:08:36 -04:00
clenk ce0de97df1 Validate UUID portion of IDProperty 2017-04-06 13:29:14 -04:00
Greg Back a0600b5ba4 Fix or ignore Flake8 warnings. 2017-03-22 08:05:59 -05:00