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
Greg Back
a7805c4ac0
Add Exception for missing values.
2017-04-18 14:41:18 -05:00
Greg Back
2aa1f5cedd
Add exception for invalid Property values.
2017-04-18 14:19:16 -05:00
clenk
05ccffc5bd
Use correct Property classes for all STIX objects
2017-04-18 09:21:38 -04: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
cf0b56c04f
Use correct property classes for ExternalReference
2017-04-17 14:15:01 -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
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
168105603b
Parse dictionaries as well as strings and file-like objects
2017-04-10 10:42:07 -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
Greg Back
1517eb899b
Move fixtures to conftest.py
2017-04-07 15:36:42 -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
clenk
5e4ca9e882
Add parsing of Malware objects
2017-04-05 17:12:44 -04:00
Greg Back
08dcfee64c
Don't be so strict about exact error message
2017-03-22 08:33:42 -05:00
Greg Back
a2f5981dfb
Improve test coverage
2017-03-22 08:26:13 -05:00
Greg Back
a0600b5ba4
Fix or ignore Flake8 warnings.
2017-03-22 08:05:59 -05:00
Greg Back
26c65e3bd0
Split up test functions
2017-03-22 07:46:39 -05:00
Greg Back
19146c8327
Convert REF_PROPERTY to ReferenceProperty
2017-03-21 19:44:01 -04:00
Greg Back
ef332a328b
Convert BOOL_PROPERTY to BooleanProperty.
2017-03-21 19:33:43 -04:00
Greg Back
a79df01449
Convert more fields to Property classes.
2017-02-24 13:07:54 -06:00
Greg Back
7ef6e20e9a
Add tests for kill chain phases.
2017-02-24 12:53:57 -06:00
Greg Back
2768426a28
Used fixed property for Bundle spec_version
2017-02-24 12:33:47 -06:00
Greg Back
2645bf2c71
Convert 'type' to a new Property class.
2017-02-24 12:33:45 -06:00
Greg Back
a264ca1e5e
Convert ID properties to class style
2017-02-24 12:32:05 -06:00
Greg Back
cf688c3851
WIP: Start transforming properties.
2017-02-24 12:29:51 -06:00
Greg Back
805c15c397
Add tests for all SDOs
2017-02-24 11:56:55 -06:00
clenk
417b43b1fe
Add revoked property
2017-02-20 16:19:07 -05:00
clenk
e2f60bc8c5
Add created_by_ref common property
2017-02-15 17:10:30 -05:00
Greg Back
031cdc9931
Add blank line
2017-02-10 16:12:02 -06:00
Greg Back
dbe98c664a
More repr tests.
2017-02-10 16:09:37 -06:00
Greg Back
bc66db94aa
Add generic __repr__ to _STIXBase.
2017-02-10 15:58:17 -06:00
Greg Back
96e880b49b
Refactor library into separate files.
2017-02-10 15:35:02 -06:00
Greg Back
b171f025c8
Test for exact exception strings.
2017-02-02 11:07:57 -06:00
Greg Back
1a46a4b073
Add external references.
2017-02-02 10:58:46 -06:00
Greg Back
5d7ed643bd
Check for required args first, and check for them all at once.
...
This is necessary for versions of Python <3.6, where dictionaries are
unordered by default, meaning we can't ensure the order in which fields
are checked.
2017-02-02 10:17:13 -06:00
Greg Back
e677167cb4
Refine tests.
2017-02-02 08:13:48 -06:00
Greg Back
2a1709a7de
Allow passing objects to Bundle as args
2017-02-01 14:57:07 -06:00
Greg Back
26ed0389ea
Fix invalid numeric literals
2017-02-01 12:50:43 -06:00