oasis-tcs / cti-stix2

OASIS CTI TC: Provides issue tracking and wiki pages for the STIX 2.x Work Products
https://github.com/oasis-tcs/cti-stix2
Other
24 stars 9 forks source link

Spec currently allows both the use of definition_type/definition properties and extensions with marking-definitions #300

Open rpiazza opened 2 years ago

rpiazza commented 2 years ago

The following is valid as the spec is currently written:

{
            "type": "marking-definition",
            "spec_version": "2.1",
            "id": "marking-definition--b58d6a2a-f14a-4994-af70-69156cd48190",
            "created": "2022-10-25T13:51:56.797459Z",
            "definition_type": "statement",
            "definition": {
                "statement": "U//FOUO"
            },
            "name": "UNCLASSIFIED//FOR OFFICIAL USE ONLY",
            "extensions": {
                "extension-definition--3a65884d-005a-4290-8335-cb2d778a83ce": {
                    "control_set": {
                        "classification": "U",
                        "formal_determination": [
                            "FOUO"
                        ]
                    },
                    "create_date_time": "2022-10-25T13:51:56.796458Z",
                    "extension_type": "property-extension",
                    "identifier": "isa:guide.19001.ACS3-2b51e0d7-e3de-43cf-81ac-09e21ee0ff5d",
                    "policy_reference": "urn:isa:policy:acs:ns:v3.0?privdefault=deny&sharedefault=permit",
                    "responsible_entity_custodian": "USA.USG"
                }

            }
        }

This marking-definition object contains both statement and ACS marking information, as an extension. The spec says:

If the extensions property is not present, this (definition-type) property MUST be present.

But it doesn’t say the opposite (i.e., if the definition-type is present, then the extension property MUST NOT be present).

One marking-definition object shouldn’t contain information about more than one marking definition type, since they could be contradictory. This should be corrected in the spec