Commit Graph

39 Commits (70718063d3a85cbae0664316b4f46f6bb7af0233)

Author SHA1 Message Date
Chris Lenk 2528077eb0 Merge branch 'master' into dev-extensions-proposal 2021-06-13 01:48:33 -04:00
Michael Chisholm e735b537c7 Remove a workaround which was used in the 2.0 and 2.1 Report
objects, to structure object_refs type requirements as an empty
blacklist, instead of a whitelist.  I think it was originally
necessary due to the older implementation of ReferenceProperty
which was in place at the time.  With the implementation change
to invert whitelists with generics to blacklists when
allow_custom=True, a "full" whitelist is internally converted to
an empty blacklist anyway, so it winds up being the same thing.
But I think the full whitelist looks better in the code, so I
prefer that to the empty blacklist.
2021-03-31 20:56:31 -04:00
Michael Chisholm c590de8ea5 Add proper customization enforcement for open vocabs. This adds
a new OpenVocabProperty class.  It also requires a redesign of
HashesProperty and redoes general library support for hash
algorithms.
2021-03-31 16:20:28 -04:00
Michael Chisholm 387ce7e7cb Fix Report SDO: I'd fixed ReferenceProperty to work the way I
thought it should, but forgot to fix Report to use
ReferenceProperty in the way I thought it should!  Oops.
Added some tests to ensure Report is working property with
custom ID types in object_refs.
2021-03-31 15:22:00 -04:00
Michael Chisholm d2f960f2fc Initial revamp of customization enforcement and detection. 2021-03-31 15:21:55 -04:00
Emmanuelle Vargas-Gonzalez 82390ba648 Merge branch 'master' of github.com:oasis-open/cti-python-stix2 into dev-extensions-proposal 2021-01-15 13:01:30 -05:00
Emmanuelle Vargas-Gonzalez 85c14d1502 all changes from add-trailing-commas v2.0.2 2021-01-13 17:52:15 -05:00
Emmanuelle Vargas-Gonzalez 4340be13c4 changes to the ExtensionsProperty 2020-11-09 20:58:34 -05:00
Chris Lenk c494a2e477 Use TypeProperty.clean() to verify type format 2020-04-01 21:52:04 -04:00
Chris Lenk 01ba190525 Reorganize bases, use isinstance to check version
Renamed STIXDomainObject -> _DomainObject.
Renamed STIXRelationshipObject -> _RelationshipObject.
2020-03-27 02:40:42 -04:00
Chris Lenk e31634c32b Rework spec version detection for _STIXBase objs 2020-03-21 22:22:36 -04: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
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
Desai, Kartikey H abf2980336 Fix tests and ReferenceProperty 2019-09-04 19:08:34 -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 23d5bef2ec Change all uses of multi-STIX-version properties (i.e. those
with a spec_version constructor argument) in STIX-version-specific
contexts, to explicitly specify the STIX version.
2019-06-21 14:29:08 -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
Emmanuelle Vargas-Gonzalez 71a2aa2611 update project documentation. 2018-11-28 16:51:00 -05:00
Emmanuelle Vargas-Gonzalez 352749edb0 Add constrains to ObservedData and Sighting, tests updated. 2018-10-17 07:47:25 -04:00
Emmanuelle Vargas-Gonzalez b2ef77b322 Merge branch 'master' of github.com:oasis-open/cti-python-stix2 into stix2.1 2018-10-17 07:30:23 -04:00
Maciej Urbanski e80fb4f59a
python 3.7 support 2018-10-03 18:00:38 +02: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 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 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
Chris Lenk 69c31ca3fc Pass allow_custom to ExtensionsProperty
Also fix bug caused by _properties being a class variable rather than an
instance variable. If you created an object with allow_custom,
allow_custom would be set for all future instances.
2018-05-16 12:14:33 -04:00
Chris Lenk 06e5a33639 Pass allow_custom when adding to ObservedData 2018-05-11 17:28:55 -04:00
Chris Lenk 14dce03616 Provide default for revoked, sighting:summary.
This allows filter on un-revoked objects. Changes default JSONEncoder to
drop optional properties with default values in the spec if set to the
default value. They can be included by passing
include_optional_defaults=True to serialize().
2018-04-16 14:37:07 -04:00
Chris Lenk a475fc6dbd Disallow invalid type names in custom classes 2018-04-13 14:52:00 -04:00
Chris Lenk f83d9a56b5 Clean up documentation 2018-04-09 13:29:53 -04:00
Chris Lenk 2886ae9961 Add links to specs in STIX Objects' documentation 2018-02-21 16:46:13 -05:00
Greg Back e2c9354d14 GH-121: Use correct property name for IntrusionSet.last_seen
Fix #121
2018-01-16 08:49:15 -06:00
Emmanuelle Vargas-Gonzalez 8c56adda21 Update package structure 2017-10-26 11:39:45 -04:00