Commit Graph

90 Commits (cf972479ed487b0ef58f1275d0bf3ae81b48721a)

Author SHA1 Message Date
= 1a1e5e1616 WIP- getting close though 2018-04-13 11:08:03 -04:00
Greg Back a1ad90d43f
Merge pull request #150 from oasis-open/38-workbench
Create Workbench layer
2018-04-05 10:09:23 -05:00
Chris Lenk 3abfe7868a Add more patterning tests
... and fix bugs detected in doing so
2018-04-02 16:38:04 -04:00
Chris Lenk b9bbd03481 Update workbench imports and documentation
Import a bunch of stuff so users can just "from stix2.workbench import *" and
not need to import other stuff (e.g. MarkingDefinition, Cyber Observable
Object classes, etc.) from stix2.
2018-03-30 12:04:31 -04:00
Greg Back 307a85c8b1 Reorder modules for API documentation 2018-03-01 13:15:02 -06:00
Chris Lenk 5f703509be Rename "sources" subpackage to "datastore"
Fix #114.
2018-03-01 09:04:42 -05:00
Chris Lenk 2dc8a97a51 Fix documentation links for v20 2017-11-13 14:14:24 -05:00
Emmanuelle Vargas-Gonzalez 06a50b0178 Update README, add DEFAULT_VERSION 2017-11-01 10:48:28 -04:00
Emmanuelle Vargas-Gonzalez 42317ddf31 Update filesystem.py to allow_custom and version 2017-10-27 12:38:03 -04:00
Emmanuelle Vargas-Gonzalez 8c56adda21 Update package structure 2017-10-26 11:39:45 -04:00
Chris Lenk 233ee7924e Merge branch 'master' into documentation 2017-10-04 10:38:40 -04:00
Chris Lenk 58db629de8 Add markings functions to top level namespace 2017-10-02 16:09:38 -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
Chris Lenk d7efd1f752 Set up Sphinx autodoc
This will automatically generate API documentation from docstrings.
2017-09-21 17:27:13 -04:00
Chris Lenk 21d978acc8 Fix errors when instantiating custom classes
Defining a custom object/observable/extension class with no custom
__init__() function would result in an `AttributeError` or `TypeError`,
depending on if the class sub-classed `object` or not.
2017-09-21 09:11:01 -04:00
Greg Back 463d1e6b28 Merge pull request #52 from oasis-open/environment
Environment layer
2017-09-12 13:59:08 +00:00
Greg Back f00dcb682a Fix imports 2017-09-11 13:00:40 +00:00
Chris Lenk 4dfb5d2365 Test Environment layer 2017-09-08 09:01:12 -04:00
Richard Piazza ceb88f176e added TimestampConstant 2017-09-07 10:35:31 -04: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
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 23f36a9a69 Minor changes to custom object decorators. Add new marking decorator. 2017-08-28 14:30:53 -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 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 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 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 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
clenk 1d3c59cc44 Move TLP constants up to stix2 namespace 2017-07-05 13:27:09 -04:00
clenk fdbb6ff337 Add custom Cyber Observables 2017-06-14 09:36:35 -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 9761c37f20 Replace 'field' with 'property' to be consistent
with the specification
2017-05-16 12:27:30 -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 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 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 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 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