Desai, Kartikey H
36f7035785
Fixes #338
2020-03-12 09:24:43 -04:00
Chris Lenk
e782d095ea
Merge pull request #369 from chisholm/malware_os_refs
...
Change software SCO: os_execution_envs -> operating_system_refs
2020-03-11 23:47:14 -04:00
Chris Lenk
33fb31421b
Merge pull request #357 from chisholm/malware_analysis_result
...
Update malware-analysis SDO's av_result property
2020-03-11 09:16:34 -04:00
Chris Lenk
bdf7cab8fe
Merge pull request #356 from chisholm/malware_analysis_sample_ref
...
Add the "sample_ref" property to malware-analysis SDOs
2020-03-11 09:12:02 -04:00
Michael Chisholm
792cc570d7
Change the os_execution_envs property of software SCOs to
...
operating_system_refs, and add a test for it.
2020-03-06 19:43:47 -05:00
Michael Chisholm
d2bff4d411
Update malware-analysis SDO's av_result property: replace it with
...
result and result_name properties. Per:
https://github.com/oasis-tcs/cti-stix2/issues/213
2020-02-27 17:26:04 -05:00
Michael Chisholm
50eb188190
Add the "sample_ref" property to malware-analysis SDOs, per:
...
https://github.com/oasis-tcs/cti-stix2/issues/210
2020-02-27 16:40:56 -05:00
Michael Chisholm
31c37a9b12
Changed several *_types properties which were formerly required,
...
to be optional, due to a STIX spec change. Updated unit tests
accordingly.
2020-02-25 20:07:47 -05:00
chrisr3d
c8cd84925b
Merge branch 'master' of github.com:oasis-open/cti-python-stix2
2020-01-08 14:53:36 +01:00
Desai, Kartikey H
4350680e79
Introduce and relocate version-based pattern checking. Fixes #307
2020-01-04 10:24:17 -05:00
Desai, Kartikey H
a18612bdfb
Fixes #307
2020-01-04 10:24:17 -05:00
Chris Lenk
cde57ce8f7
Merge pull request #315 from khdesai/fix_issue_308
...
Fix issue 308
2019-12-17 12:13:25 -05:00
Desai, Kartikey H
6df7da65b8
Fixes #308
2019-12-17 11:57:55 -05:00
chrisr3d
31d944b159
Merge branch 'master' of github.com:oasis-open/cti-python-stix2
2019-12-12 22:59:39 +01:00
Desai, Kartikey H
3a46d42aaa
parse() handles observables in 2.1. Change mechanism for (in)valid_types in ReferenceProperty. Fix _custom_observable_builder to include ReferenceProperty instead of ObjectReferenceProperty, and added ID property to custom observables
2019-12-06 09:35:36 -05:00
Zach Rush
806c6c52d9
Added tests for other changes, and moved attribute defaults to an init function
2019-11-25 15:52:50 -05:00
Zach Rush
46f1778d04
Fixed all issues brought up in issue #305 by Chris Lenk
2019-11-22 13:24:09 -05:00
chrisr3d
adbaec1942
Merge branch 'master' of github.com:oasis-open/cti-python-stix2 + fix interoperability param support
2019-10-14 12:30:15 +02:00
Desai, Kartikey H
3b1c922ba6
Fix observed data property check for at least one property existing
2019-09-18 10:29:07 -04:00
Desai, Kartikey H
8447c9fcd9
Add few tests to improve some code coverage
2019-09-11 14:21:41 -04:00
Desai, Kartikey H
abf2980336
Fix tests and ReferenceProperty
2019-09-04 19:08:34 -04:00
Desai, Kartikey H
44ebd64a16
Some test fixes. More coming soon
2019-08-30 03:47:47 -04:00
Desai, Kartikey H
f69b13a006
Some more updates, primarily to ReferenceProperty (and related code)
2019-08-29 17:15:51 -04:00
Desai, Kartikey H
49077352d7
Updates and corrections for SCO WD 05 updates. Temp backup; testing and more fixes coming soon
2019-08-27 17:36:45 -04:00
Michael Chisholm
5e5a03c001
Changed emitted deprecation warnings to a custom DeprecationWarning
...
subclass. Changed the unit test to test for that specific
warning category, instead of any DeprecationWarning.
2019-08-07 10:16:18 -04:00
Michael Chisholm
27beec4060
Add a deprecation warning for the "objects" property of
...
observed-data. Add a unit test to ensure we get the warning.
2019-07-29 16:35:38 -04:00
Michael Chisholm
5589480980
Improved the exception class hierarchy:
...
- Removed all plain python base classes (e.g. ValueError, TypeError)
- Renamed InvalidPropertyConfigurationError -> PropertyPresenceError,
since incorrect values could be considered a property config error, and
I really just wanted this class to apply to presence (co-)constraint
violations.
- Added ObjectConfigurationError as a superclass of InvalidValueError,
PropertyPresenceError, and any other exception that could be raised
during _STIXBase object init, which is when the spec compliance
checks happen. This class is intended to represent general spec
violations.
- Did some class reordering in exceptions.py, so all the
ObjectConfigurationError subclasses were together.
Changed how property "cleaning" errors were handled:
- Previous docs said they should all be ValueErrors, but that would require
extra exception check-and-replace complexity in the property
implementations, so that requirement is removed. Doc is changed to just
say that cleaning problems should cause exceptions to be raised.
_STIXBase._check_property() now handles most exception types, not just
ValueError.
- Decided to try chaining the original clean error to the InvalidValueError,
in case the extra diagnostics would be helpful in the future. This is
done via 'six' adapter function and only works on python3.
- A small amount of testing was removed, since it was looking at custom
exception properties which became unavailable once the exception was
replaced with InvalidValueError.
Did another pass through unit tests to fix breakage caused by the changed
exception class hierarchy.
Removed unnecessary observable extension handling code from
parse_observable(), since it was all duplicated in ExtensionsProperty.
The redundant code in parse_observable() had different exception behavior
than ExtensionsProperty, which makes the API inconsistent and unit tests
more complicated. (Problems in ExtensionsProperty get replaced with
InvalidValueError, but extensions problems handled directly in
parse_observable() don't get the same replacement, and so the exception
type is different.)
Redid the workbench monkeypatching. The old way was impossible to make
work, and had caused ugly ripple effect hackage in other parts of the
codebase. Now, it replaces the global object maps with factory functions
which behave the same way when called, as real classes. Had to fix up a
few unit tests to get them all passing with this monkeypatching in place.
Also remove all the xfail markings in the workbench test suite, since all
tests now pass.
Since workbench monkeypatching isn't currently affecting any unit tests,
tox.ini was simplified to remove the special-casing for running the
workbench tests.
Removed the v20 workbench test suite, since the workbench currently only
works with the latest stix object version.
2019-07-19 14:50:11 -04:00
Michael Chisholm
1b7abaf228
WIP: updating objects to be compliant with stix2.1 WD05. This
...
includes SDO/SRO class updates, but no unit test updates. The
class updates broke unit tests, so that still needs to be
addressed.
2019-07-14 15:34:31 -04:00
Desai, Kartikey H
c98fcafb1a
Update tests to address conformance to WD04 specs
2019-07-01 15:26:30 -04:00
Desai, Kartikey H
ef408e1971
preliminary changes to make stix2 code conform to WD 04 specs
2019-07-01 11:52:55 -04:00
Chris Lenk
953a91ba8e
Merge pull request #273 from chisholm/update_course_of_action
...
Update course of action for stix2.1 (again)
2019-06-28 12:32:14 -04:00
Chris Lenk
266516ebbc
Merge pull request #272 from chisholm/malware_analysis
...
Add stix2.1 malware-analysis SDO
2019-06-28 09:57:47 -04:00
Michael Chisholm
de93a2ee32
Fix stix2.1 course-of-action SDO class properties action_reference
...
and action_bin to have the correct types.
2019-06-26 19:54:28 -04:00
Michael Chisholm
5c92db9861
Add stix2.1 malware-analysis SDO
2019-06-26 17:06:26 -04:00
Chris Lenk
b8c5bec101
Merge branch 'master' into stix2.1
2019-06-26 12:22:40 -04:00
Chris Lenk
28ac284b84
Remove unnecessary ObservedData constraint
...
first_observed and last_observed are both required, so this co-constraint was removed from WD04.
2019-06-26 11:18:47 -04:00
Michael Chisholm
58ff89f112
Update observed-data SDO class, adding the new stix2.1 property
...
"object_refs". Added a couple tests for it.
2019-06-21 15:44:04 -04:00
Michael Chisholm
a150b0f4aa
Change all uses of IDProperty and ReferenceProperty to specify
...
a particular spec_version.
2019-06-14 17:58:51 -04:00
Michael Chisholm
4f593e6d16
Changes from the add-trailing-comma pre-commit hook
2019-06-12 14:49:34 -04:00
Michael Chisholm
caa1d45ae2
Update stix2.1 course-of-action support to the latest spec.
2019-06-11 18:10:02 -04:00
chrisr3d
28db2df045
Merge branch 'master' of github.com:oasis-open/cti-python-stix2
2019-02-12 11:45:14 +01:00
Chris Lenk
afe57f642d
Add docstring for to_maps_url()
2019-02-08 14:41:54 -05:00
Desai, Kartikey H
edfe0ba51a
Add support for Bing Maps and corresponding tests. Fixes #86
2019-02-08 09:37:27 -05:00
Desai, Kartikey H
8be704a5b9
Update to_map_url and add tests. Fixes #86
2019-02-07 10:31:51 -05:00
Desai, Kartikey H
dc91c9cbf4
Initial fix for issue 86. Fixes #86
2019-02-06 16:16:50 -05:00
chrisr3d
939a2d5428
add: Applying interoperability parameter to v2.1 objects
2018-12-14 10:12:30 +01:00
Emmanuelle Vargas-Gonzalez
71a2aa2611
update project documentation.
2018-11-28 16:51:00 -05:00
Emmanuelle Vargas-Gonzalez
dec75082df
Add new constrains parameters to IntegerProperty and FloatProperty
...
New constraints on timestamps, integer and floats for many objects
2018-10-15 15:02:59 -04:00
Emmanuelle Vargas-Gonzalez
ad76e7155c
MALWARE RESTORE POINT - Reverted changes to Malware based on STIX 2.1 CSD01
...
Use this commit to restore Malware changes.
2018-07-25 13:34:56 -04:00
Emmanuelle Vargas-Gonzalez
303159a818
pre-commit hooks changes
2018-07-25 13:32:22 -04:00
Emmanuelle Vargas-Gonzalez
af2a5605ce
Add constraints to Location object
2018-07-25 12:43:57 -04:00
Emmanuelle Vargas-Gonzalez
51a499cb33
Formatting changes made by the new pre-commit hook 'add trailing commas'
...
closes #189
2018-07-13 11:10:05 -04:00
Emmanuelle Vargas-Gonzalez
bdfc221cb0
Update v21 properties to latest spec changes
2018-07-12 14:31:14 -04:00
Emmanuelle Vargas-Gonzalez
e513c8d638
Hide builder methods in 'custom.py' and update imports accordingly
2018-07-11 08:11:47 -04:00
Emmanuelle Vargas-Gonzalez
023603d86f
Remove duplicate code from 'sdo.py', removed STIXDomainObject
...
Apply proper 'spec_version' constraints to v21 objects
2018-07-10 15:22:21 -04:00
Emmanuelle Vargas-Gonzalez
2e6bb74be8
Add spec version 2.1 to object missing the property.
2018-06-29 18:48:41 -04:00
Emmanuelle Vargas-Gonzalez
7fd379d0b5
Minor style changes.
...
Removed OrderedDict and update()... Also a lot of single quoting except for errors
2018-06-29 18:38:04 -04:00
Emmanuelle Vargas-Gonzalez
9baaad6e08
Sort imports.
2018-06-26 12:23:53 -04:00
Trey Darley
5cbe886cdb
split properties out by spec version
2018-06-26 09:32:24 +00:00
Michael Chisholm
0c3f826c24
First cut at splitting the Bundle implementation into v20 and
...
v21 variants. Also fixed up unit tests and got them passing
again.
2018-06-14 15:56:02 -04:00
Michael Chisholm
f211649529
Made some minimal changes to support the STIX 2.1 Malware SDO,
...
and the maec2stix tool.
2018-06-14 15:56:01 -04:00
Greg Back
75e478312a
Additional changes to match updates in v20 code.
2018-06-11 13:37:45 -05:00
Emmanuelle Vargas-Gonzalez
d51f1014c7
Fix InstrusionSet 'last_seen' in 2.1
2018-02-23 08:24:26 -05:00
Emmanuelle Vargas-Gonzalez
bdb91c6ac4
Update STIX 2.1 structure
2017-11-02 07:21:24 -04:00