From 79261b89cd8ba47f08023ecdb78c38bd04e3c341 Mon Sep 17 00:00:00 2001 From: Benjamin Hendrix Date: Fri, 4 Aug 2023 14:19:21 -0400 Subject: [PATCH 01/61] Issue: 549 Added new vocabulary:ObjectStatusVocab vocabulary Added new core:objectStatus property Added new associated property shapes on core:UcoObject --- ontology/uco/core/core.ttl | 52 +++++++++++++++++++++++++- ontology/uco/vocabulary/vocabulary.ttl | 14 +++++++ 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index aaa52614..92cab686 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -396,7 +396,44 @@ core:UcoObject sh:datatype xsd:string ; sh:nodeKind sh:Literal ; sh:path core:tag ; - ] + ] , + [ + sh:datatype vocabulary:ObjectStatusVocab ; + sh:message "Value is outside the default vocabulary ObjectStatusVocab." ; + sh:path core:objectStatus ; + sh:severity sh:Info ; + ] , + [ + sh:minCount "1"^^xsd:integer ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; + sh:or ( + [ + sh:datatype vocabulary:ObjectStatusVocab ; + ] + [ + sh:datatype xsd:string ; + ] + ) ; + sh:path core:objectStatus ; + ] , + [ + sh:message "Value is not member of the vocabulary ObjectStatusVocab." ; + sh:or ( + [ + sh:datatype vocabulary:ObjectStatusVocab ; + sh:in ( + "Draft"^^vocabulary:ObjectStatusVocab + "Final"^^vocabulary:ObjectStatusVocab + "Deprecated"^^vocabulary:ObjectStatusVocab + ) ; + ] + [ + sh:datatype xsd:string ; + ] + ) ; + sh:path core:objectStatus ; + ] ; sh:targetClass core:UcoObject ; . @@ -621,6 +658,19 @@ core:objectMarking rdfs:range core:MarkingDefinitionAbstraction ; . +core:objectStatus + a owl:DatatypeProperty ; + rdfs:comment "The current state of formality and acceptance for a UCO object ."@en-US ; + rdfs:label "Object Status"@en-US ; + rdfs:range [ + a rdfs:Datatype ; + owl:unionOf ( + xsd:string + vocabulary:ObjectStatusVocab + ) ; + ] ; + . + core:referenceURL a owl:DatatypeProperty ; rdfs:label "referenceURL"@en ; diff --git a/ontology/uco/vocabulary/vocabulary.ttl b/ontology/uco/vocabulary/vocabulary.ttl index a376011b..e88f4630 100644 --- a/ontology/uco/vocabulary/vocabulary.ttl +++ b/ontology/uco/vocabulary/vocabulary.ttl @@ -659,6 +659,20 @@ vocabulary:MemoryBlockTypeVocab ] ; . +vocabulary:ObjectStatusVocab + a rdfs:Datatype ; + rdfs:label "Object Status Vocabulary"@en-US ; + owl:equivalentClass [ + a rdfs:Datatype ; + owl:onDatatype xsd:string ; + owl:oneOf ( + "Draft"^^vocabulary:ObjectStatusVocab + "Final"^^vocabulary:ObjectStatusVocab + "Deprecated"^^vocabulary:ObjectStatusVocab + ) ; + ] ; + . + vocabulary:ObservableObjectRelationshipVocab a rdfs:Datatype ; rdfs:label "Cyber Item Relationship Vocabulary"@en-US ; From 61600193bdd1c693b9a167aa03e74e2c6e2dcd01 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 21 Dec 2023 11:16:18 -0500 Subject: [PATCH 02/61] Warn if target or source on an ObservableRelationship are not Observables No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/573 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index d4fb17ea..7cfa4a4a 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -5056,6 +5056,20 @@ observable:ObservableRelationship ; rdfs:label "ObservableRelationship"@en ; rdfs:comment "An observable relationship is a grouping of characteristics unique to an assertion of an association between two observable objects."@en ; + sh:property + [ + sh:class observable:Observable ; + sh:message "The source on an ObservableRelationship is expected to be typed as an Observable, and the noted value node is not. This will be an error in UCO 2.0.0."@en ; + sh:path core:source ; + sh:severity sh:Warning ; + ] , + [ + sh:class observable:Observable ; + sh:message "The target on an ObservableRelationship is expected to be typed as an Observable, and the noted value node is not. This will be an error in UCO 2.0.0."@en ; + sh:path core:target ; + sh:severity sh:Warning ; + ] + ; sh:targetClass observable:ObservableRelationship ; . From 084e2cd800e6303c2940fa13ba329103cb52fea1 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 1 Feb 2024 13:52:40 -0500 Subject: [PATCH 03/61] Replace errant reference to non-existent concept owl:Datatype No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/584 Signed-off-by: Alex Nelson --- ontology/owl/owl.ttl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ontology/owl/owl.ttl b/ontology/owl/owl.ttl index ced847dd..2f5ecc72 100644 --- a/ontology/owl/owl.ttl +++ b/ontology/owl/owl.ttl @@ -149,12 +149,12 @@ uco-owl:Disjointedness-C-DT-shape sh:sparql [ a sh:SPARQLConstraint ; rdfs:seeAlso ; - sh:message "An IRI may not be a member of both an owl:Class and owl:Datatype."@en ; + sh:message "An IRI may not be a member of both an owl:Class and rdfs:Datatype."@en ; sh:select """ PREFIX owl: SELECT $this WHERE { - $this a owl:Datatype ; + $this a rdfs:Datatype ; } """ ; ] ; From e6dba28e95810676e3848b3ae1c6a8a3385ae04d Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 1 Feb 2024 14:09:22 -0500 Subject: [PATCH 04/61] Warn of prior disjointedness declarations in core: and types: A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/586 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 11 +++++++++++ ontology/uco/types/types.ttl | 22 ++++++++++++++++++++++ tests/examples/Makefile | 2 ++ tests/examples/disjointedness_PASS.json | 18 ++++++++++++++++++ tests/examples/test_validation.py | 9 +++++++++ 5 files changed, 62 insertions(+) create mode 100644 tests/examples/disjointedness_PASS.json diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index e061bd54..2764132d 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -378,6 +378,17 @@ core:UcoInherentCharacterizationThing sh:targetClass core:UcoInherentCharacterizationThing ; . +core:UcoInherentCharacterizationThing-disjointWith-UcoObject-shape + a sh:NodeShape ; + sh:message "observable:UcoInherentCharacterizationThing and observable:UcoObject are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ; + sh:not [ + a sh:NodeShape ; + sh:class core:UcoObject ; + ] ; + sh:severity sh:Warning ; + sh:targetClass core:UcoInherentCharacterizationThing ; + . + core:UcoObject a owl:Class , diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index ad91bedb..0b8ac9c7 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -195,6 +195,17 @@ types:Thread ] ; . +types:Thread-disjointWith-co-List-shape + a sh:NodeShape ; + sh:message "types:Thread and co:List are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ; + sh:not [ + a sh:NodeShape ; + sh:class co:List ; + ] ; + sh:severity sh:Warning ; + sh:targetClass types:Thread ; + . + types:ThreadItem a owl:Class , @@ -213,6 +224,17 @@ types:ThreadItem ] ; . +types:ThreadItem-disjointWith-co-ListItem-shape + a sh:NodeShape ; + sh:message "types:ThreadItem and co:ListItem are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ; + sh:not [ + a sh:NodeShape ; + sh:class co:ListItem ; + ] ; + sh:severity sh:Warning ; + sh:targetClass types:ThreadItem ; + . + types:entry a owl:ObjectProperty ; rdfs:label "entry"@en ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 80f59e04..6b36e63b 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -27,6 +27,7 @@ all: \ configuration_setting_XFAIL_validation.ttl \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ + disjointedness_PASS_validation.ttl \ event_XFAIL_validation.ttl \ file_url_PASS_validation.ttl \ has_facet_inverse_functional_PASS_validation.ttl \ @@ -98,6 +99,7 @@ check: \ configuration_setting_XFAIL_validation.ttl \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ + disjointedness_PASS_validation.ttl \ event_XFAIL_validation.ttl \ file_url_PASS_validation.ttl \ has_facet_inverse_functional_PASS_validation.ttl \ diff --git a/tests/examples/disjointedness_PASS.json b/tests/examples/disjointedness_PASS.json new file mode 100644 index 00000000..227775a6 --- /dev/null +++ b/tests/examples/disjointedness_PASS.json @@ -0,0 +1,18 @@ +{ + "@context": { + "kb": "http://example.org/kb/", + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "kb:File-33a25932-3a1a-4828-a90f-d31818b495ce", + "@type": [ + "observable:File", + "observable:FileFacet" + ], + "rdfs:comment": "This node will trigger a violation in UCO 2.0.0 for designating itself a File and FileFacet, which are disjoint due to File being a (eventual) subclass of UcoObject, and FileFacet being a (eventual) subclass of UcoInherentCharacterizationThing." + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index c714d0c3..91807153 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -207,6 +207,15 @@ def test_database_records_XFAIL() -> None: } ) +def test_disjointedness_PASS() -> None: + confirm_validation_results( + "disjointedness_PASS_validation.ttl", + True, + expected_focus_node_severities={ + ("http://example.org/kb/File-33a25932-3a1a-4828-a90f-d31818b495ce", str(NS_SH.Warning)), + } + ) + def test_event_XFAIL() -> None: confirm_validation_results( "event_XFAIL_validation.ttl", From 9460e743b1358e5753de71dbc6d1057954a27723 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 1 Feb 2024 17:57:37 -0500 Subject: [PATCH 05/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/586 Signed-off-by: Alex Nelson --- .../disjointedness_PASS_validation.ttl | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/examples/disjointedness_PASS_validation.ttl diff --git a/tests/examples/disjointedness_PASS_validation.ttl b/tests/examples/disjointedness_PASS_validation.ttl new file mode 100644 index 00000000..c88a7234 --- /dev/null +++ b/tests/examples/disjointedness_PASS_validation.ttl @@ -0,0 +1,21 @@ +@prefix core: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + sh:result [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "observable:UcoInherentCharacterizationThing and observable:UcoObject are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:NotConstraintComponent ; + sh:sourceShape core:UcoInherentCharacterizationThing-disjointWith-UcoObject-shape ; + sh:value ; + ] ; + . + From e0346f3242721fdde9212aa4d14ccb0053ee91ef Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 6 Mar 2024 19:13:18 -0500 Subject: [PATCH 06/61] Remove 1-member minimum on core:ContextualCompilation No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/599 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 1 - 1 file changed, 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index e061bd54..ab907fcf 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -121,7 +121,6 @@ core:ContextualCompilation rdfs:comment "A contextual compilation is a grouping of things sharing some context (e.g., a set of network connections observed on a given day, all accounts associated with a given person)."@en ; sh:property [ sh:class core:UcoObject ; - sh:minCount "1"^^xsd:integer ; sh:nodeKind sh:IRI ; sh:path core:object ; ] ; From c349b32b6d8981ea85f985570a81e495db57ea56 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 7 May 2024 14:42:34 -0400 Subject: [PATCH 07/61] Warn about key-uniqueness enforcement to types:Dictionary A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/602 Signed-off-by: Alex Nelson --- ontology/uco/types/types.ttl | 21 ++++++++ tests/examples/Makefile | 2 + tests/examples/dictionary_PASS.json | 83 +++++++++++++++++++++++++++++ tests/examples/test_validation.py | 10 ++++ 4 files changed, 116 insertions(+) create mode 100644 tests/examples/dictionary_PASS.json diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index ad91bedb..b9f0c450 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -60,6 +60,27 @@ types:Dictionary rdfs:subClassOf core:UcoInherentCharacterizationThing ; rdfs:label "Dictionary"@en ; rdfs:comment "A dictionary is list of (term/key, value) pairs with each term/key existing no more than once."@en ; + rdfs:seeAlso [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached to types:Dictionary with rdfs:seeAlso in order to associate a warning-severity SPARQL-based shape, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:severity sh:Warning ; + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "A key in a dictionary can appear no more than once."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:targetClass types:Dictionary ; + ] ; sh:property [ sh:class types:DictionaryEntry ; sh:minCount "1"^^xsd:integer ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 80f59e04..935b6b44 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -27,6 +27,7 @@ all: \ configuration_setting_XFAIL_validation.ttl \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ + dictionary_PASS_validation.ttl \ event_XFAIL_validation.ttl \ file_url_PASS_validation.ttl \ has_facet_inverse_functional_PASS_validation.ttl \ @@ -98,6 +99,7 @@ check: \ configuration_setting_XFAIL_validation.ttl \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ + dictionary_PASS_validation.ttl \ event_XFAIL_validation.ttl \ file_url_PASS_validation.ttl \ has_facet_inverse_functional_PASS_validation.ttl \ diff --git a/tests/examples/dictionary_PASS.json b/tests/examples/dictionary_PASS.json new file mode 100644 index 00000000..a137ca8c --- /dev/null +++ b/tests/examples/dictionary_PASS.json @@ -0,0 +1,83 @@ +{ + "@context": { + "kb": "http://example.org/kb/", + "types": "https://ontology.unifiedcyberontology.org/uco/types/" + }, + "@graph": [ + { + "@id": "kb:Dictionary-eaded28e-0bf8-4df1-aee8-84d22c09702c", + "@type": "types:Dictionary", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-314212eb-39c4-4bf3-be3a-f07c38f0eae8" + }, + { + "@id": "kb:DictionaryEntry-9ec24a1a-7e99-41c9-ba7d-9d23f11babb4" + } + ] + }, + { + "@id": "kb:DictionaryEntry-314212eb-39c4-4bf3-be3a-f07c38f0eae8", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-9ec24a1a-7e99-41c9-ba7d-9d23f11babb4", + "@type": "types:DictionaryEntry", + "types:key": "y", + "types:value": "2" + }, + { + "@id": "kb:Dictionary-a8e5e8e1-b3de-4ac4-99dd-e36f96beea4d", + "@type": "types:Dictionary", + "rdfs": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-55786f64-534d-4e8c-8a64-616f708ea4d3" + }, + { + "@id": "kb:DictionaryEntry-d1a83c3d-cbe6-40b0-bb26-3527c47a01d8" + } + ] + }, + { + "@id": "kb:DictionaryEntry-55786f64-534d-4e8c-8a64-616f708ea4d3", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-d1a83c3d-cbe6-40b0-bb26-3527c47a01d8", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "2" + }, + { + "@id": "kb:Dictionary-e9adf6c1-0287-4290-95a9-c94a128d7ff6", + + "@type": "types:Dictionary", + "rdfs": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-20431f00-64a3-4c0f-94a4-1eb09f8a6b6a" + }, + { + "@id": "kb:DictionaryEntry-f187ee7f-12fb-4580-966d-47bf1afd4975" + } + ] + }, + { + "@id": "kb:DictionaryEntry-20431f00-64a3-4c0f-94a4-1eb09f8a6b6a", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-f187ee7f-12fb-4580-966d-47bf1afd4975", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index c714d0c3..dc7bde6d 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -207,6 +207,16 @@ def test_database_records_XFAIL() -> None: } ) +def test_dictionary_PASS() -> None: + confirm_validation_results( + "dictionary_PASS_validation.ttl", + True, + expected_focus_node_severities={ + ("http://example.org/kb/Dictionary-a8e5e8e1-b3de-4ac4-99dd-e36f96beea4d", str(NS_SH.Warning)), + ('http://example.org/kb/Dictionary-e9adf6c1-0287-4290-95a9-c94a128d7ff6', str(NS_SH.Warning)), + } + ) + def test_event_XFAIL() -> None: confirm_validation_results( "event_XFAIL_validation.ttl", From 45d98e93b9a98f8c999dcef76bdc0e626ffcc629 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 7 May 2024 14:51:06 -0400 Subject: [PATCH 08/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/602 Signed-off-by: Alex Nelson --- tests/examples/dictionary_PASS_validation.ttl | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 tests/examples/dictionary_PASS_validation.ttl diff --git a/tests/examples/dictionary_PASS_validation.ttl b/tests/examples/dictionary_PASS_validation.ttl new file mode 100644 index 00000000..b00c4ad5 --- /dev/null +++ b/tests/examples/dictionary_PASS_validation.ttl @@ -0,0 +1,102 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix types: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "A key in a dictionary can appear no more than once." ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraint [ + a sh:SPARQLConstraint ; + sh:message "A key in a dictionary can appear no more than once."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; + sh:sourceShape [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached to types:Dictionary with rdfs:seeAlso in order to associate a warning-severity SPARQL-based shape, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:severity sh:Warning ; + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "A key in a dictionary can appear no more than once."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:targetClass types:Dictionary ; + ] ; + sh:value "x" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "A key in a dictionary can appear no more than once." ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraint [ + a sh:SPARQLConstraint ; + sh:message "A key in a dictionary can appear no more than once."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; + sh:sourceShape [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached to types:Dictionary with rdfs:seeAlso in order to associate a warning-severity SPARQL-based shape, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:severity sh:Warning ; + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "A key in a dictionary can appear no more than once."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:targetClass types:Dictionary ; + ] ; + sh:value "x" ; + ] + ; + . + From 13f877bc50071e52357464d9c2478376fa6bd6cc Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 10 May 2024 10:14:55 -0400 Subject: [PATCH 09/61] Warn if an AlternateDataStream instance is not also a FileSystemObject A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/590 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 8 +++++++ tests/examples/Makefile | 2 ++ .../examples/alternate_data_stream_PASS.json | 21 +++++++++++++++++++ tests/examples/test_validation.py | 9 ++++++++ 4 files changed, 40 insertions(+) create mode 100644 tests/examples/alternate_data_stream_PASS.json diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 6f5553b2..37dc84be 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -239,6 +239,14 @@ observable:AlternateDataStream rdfs:subClassOf observable:ObservableObject ; rdfs:label "AlternateDataStream"@en ; rdfs:comment "An alternate data stream is data content stored within an NTFS file that is independent of the standard content stream of the file and is hidden from access by default NTFS file viewing mechanisms."@en ; + rdfs:seeAlso [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:class observable:FileSystemObject ; + sh:message "In UCO 2.0.0, uco-observable:AlternateDataStream will be a subclass of uco-observable:FileSystemObject. In preparation for UCO 2.0.0, the additional type uco-observable:FileSystemObject should be assigned to this node."@en ; + sh:severity sh:Warning ; + sh:targetClass observable:AlternateDataStream ; + ] ; sh:targetClass observable:AlternateDataStream ; . diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 80f59e04..712ba277 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -21,6 +21,7 @@ all: \ action_inheritance_PASS_validation.ttl \ action_inheritance_XFAIL_validation.ttl \ action_result_PASS_validation.ttl \ + alternate_data_stream_PASS_validation.ttl \ co_PASS_validation.ttl \ co_XFAIL_validation.ttl \ configuration_setting_PASS_validation.ttl \ @@ -92,6 +93,7 @@ check: \ action_inheritance_PASS_validation.ttl \ action_inheritance_XFAIL_validation.ttl \ action_result_PASS_validation.ttl \ + alternate_data_stream_PASS_validation.ttl \ co_PASS_validation.ttl \ co_XFAIL_validation.ttl \ configuration_setting_PASS_validation.ttl \ diff --git a/tests/examples/alternate_data_stream_PASS.json b/tests/examples/alternate_data_stream_PASS.json new file mode 100644 index 00000000..e6abd5bb --- /dev/null +++ b/tests/examples/alternate_data_stream_PASS.json @@ -0,0 +1,21 @@ +{ + "@context": { + "kb": "http://example.org/kb/", + "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "@graph": [ + { + "@id": "kb:AlternateDataStream-07b3c41a-080c-4916-8375-c18148763e13", + "@type": "observable:AlternateDataStream", + "rdfs:comment": "This node should trigger a sh:Warning from not being a observable:FileSystemObject" + }, + { + "@id": "kb:AlternateDataStream-b2d4968b-4490-4b44-a56b-832058834454", + "@type": [ + "observable:AlternateDataStream", + "observable:FileSystemObject" + ] + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index c714d0c3..a2ef1138 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -177,6 +177,15 @@ def test_action_result_PASS_validation() -> None: g = load_validation_graph("action_result_PASS_validation.ttl", True) assert isinstance(g, rdflib.Graph) +def test_alternate_data_stream_PASS_validation() -> None: + confirm_validation_results( + "alternate_data_stream_PASS_validation.ttl", + True, + expected_focus_node_severities={ + ("http://example.org/kb/AlternateDataStream-07b3c41a-080c-4916-8375-c18148763e13", str(NS_SH.Warning)), + } + ) + def test_configuration_setting_PASS_validation() -> None: g = load_validation_graph("configuration_setting_PASS_validation.ttl", True) assert isinstance(g, rdflib.Graph) From 5a40aa46f7ead5290ab180e4b40e9c184bb50c2d Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 10 May 2024 10:15:15 -0400 Subject: [PATCH 10/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/590 Signed-off-by: Alex Nelson --- .../alternate_data_stream_PASS_validation.ttl | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/examples/alternate_data_stream_PASS_validation.ttl diff --git a/tests/examples/alternate_data_stream_PASS_validation.ttl b/tests/examples/alternate_data_stream_PASS_validation.ttl new file mode 100644 index 00000000..d13a07eb --- /dev/null +++ b/tests/examples/alternate_data_stream_PASS_validation.ttl @@ -0,0 +1,28 @@ +@prefix observable: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + sh:result [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "In UCO 2.0.0, uco-observable:AlternateDataStream will be a subclass of uco-observable:FileSystemObject. In preparation for UCO 2.0.0, the additional type uco-observable:FileSystemObject should be assigned to this node."@en ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:class observable:FileSystemObject ; + sh:message "In UCO 2.0.0, uco-observable:AlternateDataStream will be a subclass of uco-observable:FileSystemObject. In preparation for UCO 2.0.0, the additional type uco-observable:FileSystemObject should be assigned to this node."@en ; + sh:severity sh:Warning ; + sh:targetClass observable:AlternateDataStream ; + ] ; + sh:value ; + ] ; + . + From c63a636a2e7773625375aa9133c491cfd72ebe6f Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 4 Jun 2024 17:56:26 -0400 Subject: [PATCH 11/61] Fix syntax No effects were observed on Make-managed files. Signed-off-by: Alex Nelson --- tests/examples/dictionary_PASS.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/examples/dictionary_PASS.json b/tests/examples/dictionary_PASS.json index a137ca8c..f0772dde 100644 --- a/tests/examples/dictionary_PASS.json +++ b/tests/examples/dictionary_PASS.json @@ -1,6 +1,7 @@ { "@context": { "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "types": "https://ontology.unifiedcyberontology.org/uco/types/" }, "@graph": [ @@ -31,7 +32,7 @@ { "@id": "kb:Dictionary-a8e5e8e1-b3de-4ac4-99dd-e36f96beea4d", "@type": "types:Dictionary", - "rdfs": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", + "rdfs:comment": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", "types:entry": [ { "@id": "kb:DictionaryEntry-55786f64-534d-4e8c-8a64-616f708ea4d3" @@ -57,7 +58,7 @@ "@id": "kb:Dictionary-e9adf6c1-0287-4290-95a9-c94a128d7ff6", "@type": "types:Dictionary", - "rdfs": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", + "rdfs:comment": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", "types:entry": [ { "@id": "kb:DictionaryEntry-20431f00-64a3-4c0f-94a4-1eb09f8a6b6a" From f9d273b3d047099f9717fd0f571d974be8593fe2 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 4 Jun 2024 18:10:06 -0400 Subject: [PATCH 12/61] Inline DictionaryEntry nodes This manual revision is done to reduce IRI repetitions. No effects were observed on Make-managed files. Signed-off-by: Alex Nelson --- tests/examples/dictionary_PASS.json | 66 +++++++++++------------------ 1 file changed, 24 insertions(+), 42 deletions(-) diff --git a/tests/examples/dictionary_PASS.json b/tests/examples/dictionary_PASS.json index f0772dde..ae34187f 100644 --- a/tests/examples/dictionary_PASS.json +++ b/tests/examples/dictionary_PASS.json @@ -10,50 +10,38 @@ "@type": "types:Dictionary", "types:entry": [ { - "@id": "kb:DictionaryEntry-314212eb-39c4-4bf3-be3a-f07c38f0eae8" + "@id": "kb:DictionaryEntry-314212eb-39c4-4bf3-be3a-f07c38f0eae8", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" }, { - "@id": "kb:DictionaryEntry-9ec24a1a-7e99-41c9-ba7d-9d23f11babb4" + "@id": "kb:DictionaryEntry-9ec24a1a-7e99-41c9-ba7d-9d23f11babb4", + "@type": "types:DictionaryEntry", + "types:key": "y", + "types:value": "2" } ] }, - { - "@id": "kb:DictionaryEntry-314212eb-39c4-4bf3-be3a-f07c38f0eae8", - "@type": "types:DictionaryEntry", - "types:key": "x", - "types:value": "1" - }, - { - "@id": "kb:DictionaryEntry-9ec24a1a-7e99-41c9-ba7d-9d23f11babb4", - "@type": "types:DictionaryEntry", - "types:key": "y", - "types:value": "2" - }, { "@id": "kb:Dictionary-a8e5e8e1-b3de-4ac4-99dd-e36f96beea4d", "@type": "types:Dictionary", "rdfs:comment": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", "types:entry": [ { - "@id": "kb:DictionaryEntry-55786f64-534d-4e8c-8a64-616f708ea4d3" + "@id": "kb:DictionaryEntry-55786f64-534d-4e8c-8a64-616f708ea4d3", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" }, { - "@id": "kb:DictionaryEntry-d1a83c3d-cbe6-40b0-bb26-3527c47a01d8" + "@id": "kb:DictionaryEntry-d1a83c3d-cbe6-40b0-bb26-3527c47a01d8", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "2" } ] }, - { - "@id": "kb:DictionaryEntry-55786f64-534d-4e8c-8a64-616f708ea4d3", - "@type": "types:DictionaryEntry", - "types:key": "x", - "types:value": "1" - }, - { - "@id": "kb:DictionaryEntry-d1a83c3d-cbe6-40b0-bb26-3527c47a01d8", - "@type": "types:DictionaryEntry", - "types:key": "x", - "types:value": "2" - }, { "@id": "kb:Dictionary-e9adf6c1-0287-4290-95a9-c94a128d7ff6", @@ -61,24 +49,18 @@ "rdfs:comment": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", "types:entry": [ { - "@id": "kb:DictionaryEntry-20431f00-64a3-4c0f-94a4-1eb09f8a6b6a" + "@id": "kb:DictionaryEntry-20431f00-64a3-4c0f-94a4-1eb09f8a6b6a", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" }, { - "@id": "kb:DictionaryEntry-f187ee7f-12fb-4580-966d-47bf1afd4975" + "@id": "kb:DictionaryEntry-f187ee7f-12fb-4580-966d-47bf1afd4975", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" } ] - }, - { - "@id": "kb:DictionaryEntry-20431f00-64a3-4c0f-94a4-1eb09f8a6b6a", - "@type": "types:DictionaryEntry", - "types:key": "x", - "types:value": "1" - }, - { - "@id": "kb:DictionaryEntry-f187ee7f-12fb-4580-966d-47bf1afd4975", - "@type": "types:DictionaryEntry", - "types:key": "x", - "types:value": "1" } ] } From 68275962aa26bb8a6d336e5d50c7c40e8715dc21 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 4 Jun 2024 16:17:49 -0400 Subject: [PATCH 13/61] Add and test Improper and Proper Dictionary subclasses and repeatsKey property A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/602 Signed-off-by: Alex Nelson --- ontology/uco/types/types.ttl | 122 ++++++++++++++++++++++----- tests/examples/Makefile | 2 + tests/examples/README.md | 26 ++++++ tests/examples/dictionary_PASS.json | 85 +++++++++++++++++-- tests/examples/dictionary_XFAIL.json | 122 +++++++++++++++++++++++++++ tests/examples/test_validation.py | 18 +++- 6 files changed, 345 insertions(+), 30 deletions(-) create mode 100644 tests/examples/dictionary_XFAIL.json diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index b9f0c450..9744d75a 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -59,28 +59,7 @@ types:Dictionary ; rdfs:subClassOf core:UcoInherentCharacterizationThing ; rdfs:label "Dictionary"@en ; - rdfs:comment "A dictionary is list of (term/key, value) pairs with each term/key existing no more than once."@en ; - rdfs:seeAlso [ - a sh:NodeShape ; - rdfs:comment "This anonymous shape is attached to types:Dictionary with rdfs:seeAlso in order to associate a warning-severity SPARQL-based shape, that will only be necessary as an independent shape until UCO 2.0.0."@en ; - sh:severity sh:Warning ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "A key in a dictionary can appear no more than once."@en ; - sh:select """ - PREFIX types: - SELECT $this ?value - WHERE { - $this - types:entry/types:key ?value ; - . - } - GROUP BY ?value - HAVING (COUNT(?value) > 1) - """ ; - ] ; - sh:targetClass types:Dictionary ; - ] ; + rdfs:comment "A dictionary is list of (term/key, value) pairs with each term/key having an expectation to exist no more than once. types:Dictionary alone does not validate this expectation, but validation is available. For use cases where this expectation must be validated, the subclass types:ProperDictionary should be used instead of types:Dictionary. For instances where this expectation has been found to be violated, the subclass types:ImproperDictionary should be used instead of types:Dictionary."@en ; sh:property [ sh:class types:DictionaryEntry ; sh:minCount "1"^^xsd:integer ; @@ -90,6 +69,38 @@ types:Dictionary sh:targetClass types:Dictionary ; . +types:Dictionary-keyUniqueness-shape + a sh:NodeShape ; + sh:description "This shape is separated from the types:Dictionary class-shape in order to associate a warning-severity SPARQL-based shape."@en ; + sh:severity sh:Warning ; + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "A key in a dictionary should appear no more than once. The value literal does. Please consider using the types:ImproperDictionary class and types:repeatsKey property."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + FILTER NOT EXISTS { + $this + a types:ImproperDictionary ; + . + } + FILTER NOT EXISTS { + $this + a types:ProperDictionary ; + . + } + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:targetClass types:Dictionary ; + . + types:DictionaryEntry a owl:Class , @@ -188,11 +199,64 @@ types:Identifier rdfs:comment "An identifier is a string conformant to the specified UUID-based format for UCO object identifiers."@en ; . +types:ImproperDictionary + a + owl:Class , + sh:NodeShape + ; + rdfs:subClassOf types:Dictionary ; + rdfs:label "ImproperDictionary"@en ; + owl:disjointWith types:ProperDictionary ; + sh:property [ + sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:path types:repeatsKey ; + ] ; + sh:targetClass types:ImproperDictionary ; + . + +types:ImproperDictionary-disjointWith-ProperDictionary-shape + a sh:NodeShape ; + sh:message "types:ImproperDictionary and types:ProperDictionary are disjoint classes."@en ; + sh:not [ + a sh:NodeShape ; + sh:class types:ProperDictionary ; + ] ; + sh:targetClass types:ImproperDictionary ; + . + types:NativeFormatString a rdfs:Datatype ; rdfs:comment "Specifies data in its native format of some external language. The data may be encoded in Base64 per [RFC4648]. Data encoded in Base64 must be denoted as such using the encoded property."@en ; . +types:ProperDictionary + a + owl:Class , + sh:NodeShape + ; + rdfs:subClassOf types:Dictionary ; + rdfs:label "ProperDictionary"@en ; + rdfs:comment "A proper dictionary is list of (term/key, value) pairs with each term/key existing no more than once."@en ; + owl:disjointWith types:ImproperDictionary ; + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "A key in a proper dictionary can appear no more than once."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:targetClass types:ProperDictionary ; + . + types:StructuredText a rdfs:Datatype ; rdfs:comment "Expresses string-based data in some information structuring format (e.g., HTML5)."@en ; @@ -268,6 +332,20 @@ types:key rdfs:range xsd:string ; . +types:repeatsKey + a owl:DatatypeProperty ; + rdfs:label "repeatsKey"@en ; + rdfs:comment "A key found to be repeated in multiple dictionary entries within one dictionary."@en ; + rdfs:domain types:ImproperDictionary ; + rdfs:range xsd:string ; + . + +types:repeatsKey-subjects-shape + a sh:NodeShape ; + sh:class types:ImproperDictionary ; + sh:targetSubjectsOf types:repeatsKey ; + . + types:threadNextItem a owl:ObjectProperty ; rdfs:subPropertyOf types:threadSuccessor ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 935b6b44..5e553202 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -28,6 +28,7 @@ all: \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ dictionary_PASS_validation.ttl \ + dictionary_XFAIL_validation.ttl \ event_XFAIL_validation.ttl \ file_url_PASS_validation.ttl \ has_facet_inverse_functional_PASS_validation.ttl \ @@ -100,6 +101,7 @@ check: \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ dictionary_PASS_validation.ttl \ + dictionary_XFAIL_validation.ttl \ event_XFAIL_validation.ttl \ file_url_PASS_validation.ttl \ has_facet_inverse_functional_PASS_validation.ttl \ diff --git a/tests/examples/README.md b/tests/examples/README.md index 4b00de91..03abedd1 100644 --- a/tests/examples/README.md +++ b/tests/examples/README.md @@ -9,6 +9,32 @@ Two instance data files are currently in the directory: SHACL validation results are stored in corresponding files named `..._validation.ttl`, to present the current state of validation conditions. +## Design of the Dictionary tests + +The `Dictionary` objects in the `dictionary_*.json` files cover these combinations of asserted type (proper dictionary, improper dictionary, or the generic parent class), whether a dictionary entry key is repeated in the data, and whether the `repeatsKey` property is asserted. (P/X denotes whether the instance is a PASS or XFAIL test case.) + +| uuid | P/X | Dictionary type | Key repeats | repeatsKey asserted | +| --- | --- | --- | --- | --- | +| `3bb38b3e` | P | `Dictionary` | no | no | +| `e6dc9c2e` | X | `Dictionary` | no | yes | +| `e9adf6c1` | P | `Dictionary` | yes | no | +| `34ac0c49` | X | `Dictionary` | yes | yes | +| `cbc1c80d` | P | `ImproperDictionary` | no | no | +| `7fa3ea45` | P | `ImproperDictionary` | no | yes | +| `14e28425` | P | `ImproperDictionary` | yes | no | +| `a8e5e8e1` | P | `ImproperDictionary` | yes | yes | +| `eaded28e` | P | `ProperDictionary` | no | no | +| `8114819f` | X | `ProperDictionary` | no | yes | +| `b2baf8af` | X | `ProperDictionary` | yes | no | +| `f5ae2e6a` | X | `ProperDictionary` | yes | yes | + +Other miscellaneous tests are added without full combinatoric review: + +* `kb:ProperDictionary-f5ae2e6a-9b10-46f3-8441-30aada36aa1b` also demonstrates an XFAIL case where a key-value *pair* is repeated. +* `kb:ImproperDictionary-7fa3ea45-6426-4ad3-bb5f-7559e07adeb4` also demonstrates a PASS case where `repeatsKey`'s value is not in the supplied dictionary. +* `kb:Dictionary-5bc55661-4808-48e6-9e02-80a153eee5d3` demonstrates an XFAIL case where the disjoint `Dictionary` subtypes are both asserted. + + ## Design of the Relationship tests The `Relationship` objects in the `relationship_*.json` files include a numbering scheme in their identifiers, (object class)-(lexical value)-(datatype). These track the following matrix of test cases: diff --git a/tests/examples/dictionary_PASS.json b/tests/examples/dictionary_PASS.json index ae34187f..a81dd866 100644 --- a/tests/examples/dictionary_PASS.json +++ b/tests/examples/dictionary_PASS.json @@ -6,8 +6,26 @@ }, "@graph": [ { - "@id": "kb:Dictionary-eaded28e-0bf8-4df1-aee8-84d22c09702c", + "@id": "kb:Dictionary-3bb38b3e-d47a-43c8-8a77-afc0e6655ce1", "@type": "types:Dictionary", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-b8a01d49-53c1-440f-a2d5-618b58801d37", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-6cac6c2c-5d4e-45f5-b784-c029c9f9fb6d", + "@type": "types:DictionaryEntry", + "types:key": "y", + "types:value": "2" + } + ] + }, + { + "@id": "kb:ProperDictionary-eaded28e-0bf8-4df1-aee8-84d22c09702c", + "@type": "types:ProperDictionary", "types:entry": [ { "@id": "kb:DictionaryEntry-314212eb-39c4-4bf3-be3a-f07c38f0eae8", @@ -24,9 +42,9 @@ ] }, { - "@id": "kb:Dictionary-a8e5e8e1-b3de-4ac4-99dd-e36f96beea4d", - "@type": "types:Dictionary", - "rdfs:comment": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", + "@id": "kb:ImproperDictionary-a8e5e8e1-b3de-4ac4-99dd-e36f96beea4d", + "@type": "types:ImproperDictionary", + "types:repeatsKey": "x", "types:entry": [ { "@id": "kb:DictionaryEntry-55786f64-534d-4e8c-8a64-616f708ea4d3", @@ -44,9 +62,8 @@ }, { "@id": "kb:Dictionary-e9adf6c1-0287-4290-95a9-c94a128d7ff6", - "@type": "types:Dictionary", - "rdfs:comment": "This dictionary will trigger a warning from having two entries keyed with value 'x'.", + "rdfs:comment": "This dictionary, not being typed as a ProperDictionary, will not trigger a warning from having two entries keyed with value 'x'.", "types:entry": [ { "@id": "kb:DictionaryEntry-20431f00-64a3-4c0f-94a4-1eb09f8a6b6a", @@ -61,6 +78,62 @@ "types:value": "1" } ] + }, + { + "@id": "kb:ImproperDictionary-7fa3ea45-6426-4ad3-bb5f-7559e07adeb4", + "@type": "types:ImproperDictionary", + "repeatsKey": "z", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-cf363490-65ba-465f-8459-239c6a5d640e", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-8e71524c-9921-44e8-839d-2d27281941bb", + "@type": "types:DictionaryEntry", + "types:key": "y", + "types:value": "2" + } + ] + }, + { + "@id": "kb:ImproperDictionary-14e28425-00c1-4f11-b2ed-21390fc0749a", + "@type": "types:ImproperDictionary", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-09f23642-389b-4553-b5be-283a6160f534", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-7a84a0d6-d1cd-4291-afb4-c834d611898d", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "2" + } + ] + }, + { + "@id": "kb:ImproperDictionary-cbc1c80d-1bad-4947-8459-c53ff61e8bfa", + "@type": "types:ImproperDictionary", + "rdfs:comment": "This improper dictionary has no repeated key or assertion of a repeated key. This should not trigger a data error, because the information in the graph could merely be incomplete.", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-ca1910ab-fa26-402a-86bb-229f490dd89a", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-2a13e674-5e95-4a7a-9fac-c90417dcd97c", + "@type": "types:DictionaryEntry", + "types:key": "y", + "types:value": "2" + } + ] } ] } diff --git a/tests/examples/dictionary_XFAIL.json b/tests/examples/dictionary_XFAIL.json new file mode 100644 index 00000000..dd2a4567 --- /dev/null +++ b/tests/examples/dictionary_XFAIL.json @@ -0,0 +1,122 @@ +{ + "@context": { + "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "types": "https://ontology.unifiedcyberontology.org/uco/types/" + }, + "@graph": [ + { + "@id": "kb:Dictionary-5bc55661-4808-48e6-9e02-80a153eee5d3", + "@type": [ + "types:ImproperDictionary", + "types:ProperDictionary" + ], + "rdfs:comment": "This dictionary will trigger an error from being typed as both disjoint subclasses of types:Dictionary.", + "types:entry": { + "@id": "kb:DictionaryEntry-fa139d6e-2b4d-49e5-8c7d-3cfc635d56e0", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + } + }, + { + "@id": "kb:Dictionary-34ac0c49-1042-49c0-8fd6-c42a810e58da", + "@type": "types:Dictionary", + "rdfs:comment": "This dictionary will trigger an error from using repeatsKey while not also typing itself as a types:ImproperDictionary.", + "types:repeatsKey": "x", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-322b718b-3869-48a3-a7bf-d97d5463563b", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-e51c7808-7fcb-423a-95e6-dcb431a3bade", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "2" + } + ] + }, + { + "@id": "kb:ProperDictionary-b2baf8af-3d5d-4c4e-b442-49befefd147e", + "@type": "types:ProperDictionary", + "rdfs:comment": "This dictionary will trigger an error from having two entries keyed with value 'x'.", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-203a8596-1439-4065-a99f-daf4d530bed7", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-40b9d75d-6a11-4a8f-9951-e96e2c1fe683", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "2" + } + ] + }, + { + "@id": "kb:ProperDictionary-8114819f-d3c8-4e29-9e31-295d771f9db2", + "@type": "types:ProperDictionary", + "rdfs:comment": "This proper dictionary will trigger an error from using repeatsKey while not being an ImproperDictionary.", + "types:repeatsKey": "x", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-1311a664-fce3-4174-ace1-539ac6d54a5f", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-8b149881-5adc-4020-b46f-2be1c60bab83", + "@type": "types:DictionaryEntry", + "types:key": "y", + "types:value": "2" + } + ] + }, + { + "@id": "kb:ProperDictionary-f5ae2e6a-9b10-46f3-8441-30aada36aa1b", + "@type": "types:ProperDictionary", + "rdfs:comment": "This dictionary will trigger an error from having two entries keyed with value 'x'.", + "types:repeatsKey": "x", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-0274c19c-89b9-42b6-a87e-f671cbd2c731", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-de108ec2-8ddd-4201-8267-5a04035ba88e", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + } + ] + }, + { + "@id": "kb:Dictionary-e6dc9c2e-25bc-422f-8ae8-8457e29f5fde", + "@type": "types:Dictionary", + "rdfs:comment": "This dictionary will trigger an error from using repeatsKey while not also typing itself as a types:ImproperDictionary.", + "types:repeatsKey": "x", + "types:entry": [ + { + "@id": "kb:DictionaryEntry-02edb446-1ad5-41ef-8877-fbee912189e7", + "@type": "types:DictionaryEntry", + "types:key": "x", + "types:value": "1" + }, + { + "@id": "kb:DictionaryEntry-147908bb-ebba-42e8-854d-72352dc903a1", + "@type": "types:DictionaryEntry", + "types:key": "y", + "types:value": "2" + } + ] + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index dc7bde6d..9b2bcbbe 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -212,8 +212,22 @@ def test_dictionary_PASS() -> None: "dictionary_PASS_validation.ttl", True, expected_focus_node_severities={ - ("http://example.org/kb/Dictionary-a8e5e8e1-b3de-4ac4-99dd-e36f96beea4d", str(NS_SH.Warning)), - ('http://example.org/kb/Dictionary-e9adf6c1-0287-4290-95a9-c94a128d7ff6', str(NS_SH.Warning)), + ("http://example.org/kb/Dictionary-e9adf6c1-0287-4290-95a9-c94a128d7ff6", str(NS_SH.Warning)), + } + ) + +def test_dictionary_XFAIL() -> None: + confirm_validation_results( + "dictionary_XFAIL_validation.ttl", + False, + expected_focus_node_severities={ + ("http://example.org/kb/Dictionary-5bc55661-4808-48e6-9e02-80a153eee5d3", str(NS_SH.Violation)), + ("http://example.org/kb/Dictionary-e6dc9c2e-25bc-422f-8ae8-8457e29f5fde", str(NS_SH.Violation)), + ("http://example.org/kb/Dictionary-34ac0c49-1042-49c0-8fd6-c42a810e58da", str(NS_SH.Warning)), + ("http://example.org/kb/Dictionary-34ac0c49-1042-49c0-8fd6-c42a810e58da", str(NS_SH.Violation)), + ("http://example.org/kb/ProperDictionary-8114819f-d3c8-4e29-9e31-295d771f9db2", str(NS_SH.Violation)), + ("http://example.org/kb/ProperDictionary-b2baf8af-3d5d-4c4e-b442-49befefd147e", str(NS_SH.Violation)), + ("http://example.org/kb/ProperDictionary-f5ae2e6a-9b10-46f3-8441-30aada36aa1b", str(NS_SH.Violation)), } ) From 1e6d1af1063f3fd12eee421d85b08a8d066cb226 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 4 Jun 2024 17:48:05 -0400 Subject: [PATCH 14/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/602 Signed-off-by: Alex Nelson --- tests/examples/dictionary_PASS_validation.ttl | 110 ++++---------- .../examples/dictionary_XFAIL_validation.ttl | 141 ++++++++++++++++++ 2 files changed, 168 insertions(+), 83 deletions(-) create mode 100644 tests/examples/dictionary_XFAIL_validation.ttl diff --git a/tests/examples/dictionary_PASS_validation.ttl b/tests/examples/dictionary_PASS_validation.ttl index b00c4ad5..f563abc0 100644 --- a/tests/examples/dictionary_PASS_validation.ttl +++ b/tests/examples/dictionary_PASS_validation.ttl @@ -8,95 +8,39 @@ [] a sh:ValidationReport ; sh:conforms "true"^^xsd:boolean ; - sh:result - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "A key in a dictionary can appear no more than once." ; - sh:resultSeverity sh:Warning ; - sh:sourceConstraint [ - a sh:SPARQLConstraint ; - sh:message "A key in a dictionary can appear no more than once."@en ; - sh:select """ - PREFIX types: - SELECT $this ?value - WHERE { + sh:result [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "A key in a dictionary should appear no more than once. The value literal does. Please consider using the types:ImproperDictionary class and types:repeatsKey property." ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraint [ + a sh:SPARQLConstraint ; + sh:message "A key in a dictionary should appear no more than once. The value literal does. Please consider using the types:ImproperDictionary class and types:repeatsKey property."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + FILTER NOT EXISTS { $this - types:entry/types:key ?value ; + a types:ImproperDictionary ; . } - GROUP BY ?value - HAVING (COUNT(?value) > 1) - """ ; - ] ; - sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; - sh:sourceShape [ - a sh:NodeShape ; - rdfs:comment "This anonymous shape is attached to types:Dictionary with rdfs:seeAlso in order to associate a warning-severity SPARQL-based shape, that will only be necessary as an independent shape until UCO 2.0.0."@en ; - sh:severity sh:Warning ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "A key in a dictionary can appear no more than once."@en ; - sh:select """ - PREFIX types: - SELECT $this ?value - WHERE { - $this - types:entry/types:key ?value ; - . - } - GROUP BY ?value - HAVING (COUNT(?value) > 1) - """ ; - ] ; - sh:targetClass types:Dictionary ; - ] ; - sh:value "x" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "A key in a dictionary can appear no more than once." ; - sh:resultSeverity sh:Warning ; - sh:sourceConstraint [ - a sh:SPARQLConstraint ; - sh:message "A key in a dictionary can appear no more than once."@en ; - sh:select """ - PREFIX types: - SELECT $this ?value - WHERE { - $this - types:entry/types:key ?value ; - . - } - GROUP BY ?value - HAVING (COUNT(?value) > 1) - """ ; - ] ; - sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; - sh:sourceShape [ - a sh:NodeShape ; - rdfs:comment "This anonymous shape is attached to types:Dictionary with rdfs:seeAlso in order to associate a warning-severity SPARQL-based shape, that will only be necessary as an independent shape until UCO 2.0.0."@en ; - sh:severity sh:Warning ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "A key in a dictionary can appear no more than once."@en ; - sh:select """ - PREFIX types: - SELECT $this ?value - WHERE { + FILTER NOT EXISTS { $this - types:entry/types:key ?value ; + a types:ProperDictionary ; . } - GROUP BY ?value - HAVING (COUNT(?value) > 1) + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) """ ; - ] ; - sh:targetClass types:Dictionary ; - ] ; - sh:value "x" ; - ] - ; + ] ; + sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; + sh:sourceShape types:Dictionary-keyUniqueness-shape ; + sh:value "x" ; + ] ; . diff --git a/tests/examples/dictionary_XFAIL_validation.ttl b/tests/examples/dictionary_XFAIL_validation.ttl new file mode 100644 index 00000000..f15a7580 --- /dev/null +++ b/tests/examples/dictionary_XFAIL_validation.ttl @@ -0,0 +1,141 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix types: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "A key in a dictionary should appear no more than once. The value literal does. Please consider using the types:ImproperDictionary class and types:repeatsKey property." ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraint [ + a sh:SPARQLConstraint ; + sh:message "A key in a dictionary should appear no more than once. The value literal does. Please consider using the types:ImproperDictionary class and types:repeatsKey property."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + FILTER NOT EXISTS { + $this + a types:ImproperDictionary ; + . + } + FILTER NOT EXISTS { + $this + a types:ProperDictionary ; + . + } + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; + sh:sourceShape types:Dictionary-keyUniqueness-shape ; + sh:value "x" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value does not have class types:ImproperDictionary" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape types:repeatsKey-subjects-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "types:ImproperDictionary and types:ProperDictionary are disjoint classes."@en ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NotConstraintComponent ; + sh:sourceShape types:ImproperDictionary-disjointWith-ProperDictionary-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value does not have class types:ImproperDictionary" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape types:repeatsKey-subjects-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value does not have class types:ImproperDictionary" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape types:repeatsKey-subjects-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "A key in a proper dictionary can appear no more than once." ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraint [ + a sh:SPARQLConstraint ; + sh:message "A key in a proper dictionary can appear no more than once."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; + sh:sourceShape types:ProperDictionary ; + sh:value "x" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "A key in a proper dictionary can appear no more than once." ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraint [ + a sh:SPARQLConstraint ; + sh:message "A key in a proper dictionary can appear no more than once."@en ; + sh:select """ + PREFIX types: + SELECT $this ?value + WHERE { + $this + types:entry/types:key ?value ; + . + } + GROUP BY ?value + HAVING (COUNT(?value) > 1) + """ ; + ] ; + sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; + sh:sourceShape types:ProperDictionary ; + sh:value "x" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value does not have class types:ImproperDictionary" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape types:repeatsKey-subjects-shape ; + sh:value ; + ] + ; + . + From 6d4b8502053996f3354677d9d6e2c8aa238e9879 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 4 Jun 2024 17:00:14 -0400 Subject: [PATCH 15/61] Remove requirement that a Dictionary must have at least one entry This has analagous rationale to UCO Issue 599, as well as supporting the data-sharing use case where a dictionary key repetition is wished to be shared without sharing other members of the dictionary. No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/599 * https://github.com/ucoProject/UCO/issues/602 Signed-off-by: Alex Nelson --- ontology/uco/types/types.ttl | 1 - tests/examples/dictionary_PASS.json | 16 +--------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index 9744d75a..4e7e9f5f 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -62,7 +62,6 @@ types:Dictionary rdfs:comment "A dictionary is list of (term/key, value) pairs with each term/key having an expectation to exist no more than once. types:Dictionary alone does not validate this expectation, but validation is available. For use cases where this expectation must be validated, the subclass types:ProperDictionary should be used instead of types:Dictionary. For instances where this expectation has been found to be violated, the subclass types:ImproperDictionary should be used instead of types:Dictionary."@en ; sh:property [ sh:class types:DictionaryEntry ; - sh:minCount "1"^^xsd:integer ; sh:nodeKind sh:IRI ; sh:path types:entry ; ] ; diff --git a/tests/examples/dictionary_PASS.json b/tests/examples/dictionary_PASS.json index a81dd866..31e1aab8 100644 --- a/tests/examples/dictionary_PASS.json +++ b/tests/examples/dictionary_PASS.json @@ -82,21 +82,7 @@ { "@id": "kb:ImproperDictionary-7fa3ea45-6426-4ad3-bb5f-7559e07adeb4", "@type": "types:ImproperDictionary", - "repeatsKey": "z", - "types:entry": [ - { - "@id": "kb:DictionaryEntry-cf363490-65ba-465f-8459-239c6a5d640e", - "@type": "types:DictionaryEntry", - "types:key": "x", - "types:value": "1" - }, - { - "@id": "kb:DictionaryEntry-8e71524c-9921-44e8-839d-2d27281941bb", - "@type": "types:DictionaryEntry", - "types:key": "y", - "types:value": "2" - } - ] + "repeatsKey": "z" }, { "@id": "kb:ImproperDictionary-14e28425-00c1-4f11-b2ed-21390fc0749a", From 79de6094ba9d63b379b02c18893d2a2802686267 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 14 Jun 2024 08:43:48 -0400 Subject: [PATCH 16/61] Fix typo A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/586 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index e4bf1777..8bd191fb 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -379,7 +379,7 @@ core:UcoInherentCharacterizationThing core:UcoInherentCharacterizationThing-disjointWith-UcoObject-shape a sh:NodeShape ; - sh:message "observable:UcoInherentCharacterizationThing and observable:UcoObject are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ; + sh:message "core:UcoInherentCharacterizationThing and core:UcoObject are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ; sh:not [ a sh:NodeShape ; sh:class core:UcoObject ; From 845b8197a80ca4f1db1d0ef656872a74f906e7c4 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 14 Jun 2024 08:52:45 -0400 Subject: [PATCH 17/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/586 Signed-off-by: Alex Nelson --- tests/examples/disjointedness_PASS_validation.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/examples/disjointedness_PASS_validation.ttl b/tests/examples/disjointedness_PASS_validation.ttl index c88a7234..02ba4683 100644 --- a/tests/examples/disjointedness_PASS_validation.ttl +++ b/tests/examples/disjointedness_PASS_validation.ttl @@ -11,7 +11,7 @@ sh:result [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage "observable:UcoInherentCharacterizationThing and observable:UcoObject are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ; + sh:resultMessage "core:UcoInherentCharacterizationThing and core:UcoObject are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ; sh:resultSeverity sh:Warning ; sh:sourceConstraintComponent sh:NotConstraintComponent ; sh:sourceShape core:UcoInherentCharacterizationThing-disjointWith-UcoObject-shape ; From 03a3d3c38ee924d8bb1b0e2c2c98c9f4f7401cf3 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 26 Jul 2024 10:05:42 -0400 Subject: [PATCH 18/61] Warn if a Disk instance is not also a Device Test cases omitted from ontology's tests because CASE example data are known to use `uco-observable:Disk`. No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/612 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 37dc84be..a11ef758 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -2437,6 +2437,14 @@ observable:Disk rdfs:subClassOf observable:ObservableObject ; rdfs:label "Disk"@en ; rdfs:comment "A disk is a storage mechanism where data is recorded by various electronic, magnetic, optical, or mechanical changes to a surface layer of one or more rotating disks."@en ; + rdfs:seeAlso [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:class observable:Device ; + sh:message "In UCO 2.0.0, uco-observable:Disk will be a subclass of uco-observable:Device. In preparation for UCO 2.0.0, the additional type uco-observable:Device should be assigned to this node."@en ; + sh:severity sh:Warning ; + sh:targetClass observable:Disk ; + ] ; sh:targetClass observable:Disk ; . From a27175072d6e3524c56274523b99d53faa9ef353 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 29 Jul 2024 09:49:52 -0400 Subject: [PATCH 19/61] Warn if a Disk instance is not also a StorageMedium No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/612 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index a11ef758..6dc75195 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -2440,8 +2440,8 @@ observable:Disk rdfs:seeAlso [ a sh:NodeShape ; rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ; - sh:class observable:Device ; - sh:message "In UCO 2.0.0, uco-observable:Disk will be a subclass of uco-observable:Device. In preparation for UCO 2.0.0, the additional type uco-observable:Device should be assigned to this node."@en ; + sh:class observable:StorageMedium ; + sh:message "In UCO 2.0.0, uco-observable:Disk will be a subclass of uco-observable:StorageMedium. In preparation for UCO 2.0.0, the additional type uco-observable:StorageMedium should be assigned to this node."@en ; sh:severity sh:Warning ; sh:targetClass observable:Disk ; ] ; From dd8abaab74d210ea3e476c4d6ea6a2746c772960 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 2 Aug 2024 13:30:55 -0400 Subject: [PATCH 20/61] Add cpeid to DeviceFacet No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/624 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 37dc84be..c8963d59 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -2242,6 +2242,12 @@ observable:DeviceFacet sh:nodeKind sh:IRI ; sh:path observable:manufacturer ; ] , + [ + sh:datatype xsd:string ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; + sh:path observable:cpeid ; + ] , [ sh:datatype xsd:string ; sh:maxCount "1"^^xsd:integer ; From 03779926984b43278217a33c18c95400a6a2446c Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 2 Aug 2024 17:49:42 -0400 Subject: [PATCH 21/61] Warn of coming constraints on observable:cpeid A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/626 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 27 +++++++++ tests/examples/Makefile | 2 + tests/examples/cpe_PASS.json | 84 ++++++++++++++++++++++++++ tests/examples/test_validation.py | 11 ++++ 4 files changed, 124 insertions(+) create mode 100644 tests/examples/cpe_PASS.json diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index c8963d59..0c9feee3 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -2265,6 +2265,12 @@ observable:DeviceFacet sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; sh:path observable:serialNumber ; + ] , + [ + sh:message "In UCO 2.0.0, cpeid in DeviceFacet will be constrained to be a CPE version 2.3 hardware name."@en ; + sh:path observable:cpeid ; + sh:pattern "^cpe:2.3:h:.+" ; + sh:severity sh:Warning ; ] ; sh:targetClass observable:DeviceFacet ; @@ -5156,6 +5162,15 @@ observable:OperatingSystem rdfs:subClassOf observable:ObservableObject ; rdfs:label "OperatingSystem"@en ; rdfs:comment "An operating system is the software that manages computer hardware, software resources, and provides common services for computer programs. [based on https://en.wikipedia.org/wiki/Operating_system]"@en ; + sh:property [ + sh:message "In UCO 2.0.0, cpeid in any Facet attached to an OperatingSystem will be constrained to be a CPE version 2.3 operating system name."@en ; + sh:path ( + core:hasFacet + observable:cpeid + ) ; + sh:pattern "^cpe:2.3:o:.+" ; + sh:severity sh:Warning ; + ] ; sh:targetClass observable:OperatingSystem ; . @@ -5208,6 +5223,12 @@ observable:OperatingSystemFacet sh:datatype xsd:string ; sh:nodeKind sh:Literal ; sh:path observable:advertisingID ; + ] , + [ + sh:maxCount "0"^^xsd:integer ; + sh:message "observable:cpeid should appear on a SoftwareFacet instead of an OperatingSystemFacet."@en ; + sh:path observable:cpeid ; + sh:severity sh:Warning ; ] ; sh:targetClass observable:OperatingSystemFacet ; @@ -6213,6 +6234,12 @@ observable:SoftwareFacet sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; sh:path observable:version ; + ] , + [ + sh:message "In UCO 2.0.0, cpeid in SoftwareFacet will be constrained to be a CPE version 2.3 application or operating system name."@en ; + sh:path observable:cpeid ; + sh:pattern "^cpe:2.3:[a,o]:.+" ; + sh:severity sh:Warning ; ] ; sh:targetClass observable:SoftwareFacet ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 66b33e05..2ccd0c04 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -26,6 +26,7 @@ all: \ co_XFAIL_validation.ttl \ configuration_setting_PASS_validation.ttl \ configuration_setting_XFAIL_validation.ttl \ + cpe_PASS_validation.ttl \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ dictionary_PASS_validation.ttl \ @@ -101,6 +102,7 @@ check: \ co_XFAIL_validation.ttl \ configuration_setting_PASS_validation.ttl \ configuration_setting_XFAIL_validation.ttl \ + cpe_PASS_validation.ttl \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ dictionary_PASS_validation.ttl \ diff --git a/tests/examples/cpe_PASS.json b/tests/examples/cpe_PASS.json new file mode 100644 index 00000000..56555ab5 --- /dev/null +++ b/tests/examples/cpe_PASS.json @@ -0,0 +1,84 @@ +{ + "@context": { + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "ex": "http://example.org/ontology/", + "kb": "http://example.org/kb/", + "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "@graph": [ + { + "@id": "kb:Device-3b8fde6f-0f0b-4472-b9c8-31380eb80dc3", + "@type": "observable:Tablet", + "core:hasFacet": { + "@id": "kb:DeviceFacet-4a1cdff8-be81-46e3-8502-0f488d353ca0", + "@type": "observable:DeviceFacet", + "rdfs:comment": "This node will trigger a warning for assigning an operating system CPE to a device. This will be an error in UCO 2.0.0.", + "observable:cpeid": "cpe:2.3:o:exampleco:exampletabletos:-:*:*:*:*:*:*:*" + } + }, + { + "@id": "ex:hadInventoryNumber", + "@type": "owl:DatatypeProperty", + "rdfs:domain": "observable:Tablet", + "rdfs:range": "xsd:string" + }, + { + "@id": "kb:Device-b1432774-082d-4eda-ad2e-fcdbe159d37c", + "@type": "observable:Tablet", + "core:hasFacet": { + "@id": "kb:DeviceFacet-57721427-8a91-4b2a-a685-8de72cabdebc", + "@type": "observable:DeviceFacet", + "observable:cpeid": "cpe:2.3:h:exampleco:exampletablet:-:*:*:*:*:*:*:*", + "observable:serialNumber": "XYZ56780000000002" + }, + "ex:hadInventoryNumber": "TAB-1234" + }, + { + "@id": "kb:OperatingSystem-628d531f-254c-4efb-aaa0-0874306afa01", + "@type": "observable:OperatingSystem", + "core:name": "ExampleTabletOS", + "core:hasFacet": { + "@id": "kb:SoftwareFacet-ff426a44-65eb-4940-b61a-d70357273a8c", + "@type": "observable:SoftwareFacet", + "rdfs:comment": "This node will trigger a warning for assigning an Application CPE for an OperatingSystem. This will be an error in UCO 2.0.0.", + "observable:cpeid": "cpe:2.3:a:exampleco:exampletabletos:2024.06:*:*:*:*:*:*:*", + "observable:version": "2024.06" + } + }, + { + "@id": "kb:OperatingSystem-7f06e899-2dbb-4847-9956-5c4a68723c49", + "@type": "observable:OperatingSystem", + "core:name": "ExampleTabletOS", + "core:hasFacet": { + "@id": "kb:OperatingSystemFacet-872c1ba2-e1b4-4bc6-8267-6dbed687d0be", + "@type": "observable:OperatingSystemFacet", + "rdfs:comment": "This node will trigger a warning for assigning a CPE with an OperatingSystemFacet. This will be an error in UCO 2.0.0.", + "observable:cpeid": "cpe:2.3:o:exampleco:exampletabletos:2024.07:*:*:*:*:*:*:*", + "observable:version": "2024.07" + } + }, + { + "@id": "kb:OperatingSystem-cbbaf178-ccc0-495e-a068-65085d499d7f", + "@type": "observable:OperatingSystem", + "core:name": "ExampleTabletOS", + "core:hasFacet": { + "@id": "kb:SoftwareFacet-b2b8ed66-f681-4eda-b013-b8861843420c", + "@type": "observable:SoftwareFacet", + "observable:cpeid": "cpe:2.3:o:exampleco:exampletabletos:2024.08:*:*:*:*:*:*:*", + "observable:version": "2024.08" + } + }, + { + "@id": "kb:Software-687a7648-6902-4233-a37d-f31bb2245a15", + "@type": "observable:Software", + "core:name": "ExampleCalculator", + "core:hasFacet": { + "@id": "kb:SoftwareFacet-cd6d68ae-9248-4657-86d4-a4fe398f1004", + "@type": "observable:SoftwareFacet", + "observable:cpeid": "cpe:2.3:a:exampleco:examplecalculator:5.5:*:*:*:*:*:*:*", + "observable:version": "5.5" + } + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 6c4fc658..95d80d8d 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -200,6 +200,17 @@ def test_configuration_setting_XFAIL_validation() -> None: } ) +def test_cpe_PASS_validation() -> None: + confirm_validation_results( + "cpe_PASS_validation.ttl", + True, + expected_focus_node_severities={ + ("http://example.org/kb/DeviceFacet-4a1cdff8-be81-46e3-8502-0f488d353ca0", str(NS_SH.Warning)), + ("http://example.org/kb/OperatingSystem-628d531f-254c-4efb-aaa0-0874306afa01", str(NS_SH.Warning)), + ("http://example.org/kb/OperatingSystemFacet-872c1ba2-e1b4-4bc6-8267-6dbed687d0be", str(NS_SH.Warning)), + } + ) + def test_database_records_PASS() -> None: confirm_validation_results( "database_records_PASS_validation.ttl", From c9c921d4b01da470895251f2e6a70e94521c4d7c Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 9 Aug 2024 09:50:02 -0400 Subject: [PATCH 22/61] Add missed prefix A follow-on patch will normalize. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 1 + 1 file changed, 1 insertion(+) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 92cab686..a14616ab 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -4,6 +4,7 @@ @prefix rdfs: . @prefix sh: . @prefix types: . +@prefix vocabulary: . @prefix xsd: . From 37f7b86e085bfa3749325cb1ecd2457caf9f2ce6 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 9 Aug 2024 10:00:31 -0400 Subject: [PATCH 23/61] Make objectStatus optional A follow-on patch will normalize. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 1 - 1 file changed, 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index a14616ab..a281dce2 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -405,7 +405,6 @@ core:UcoObject sh:severity sh:Info ; ] , [ - sh:minCount "1"^^xsd:integer ; sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; sh:or ( From a6f84ce665db58f413a723f99b9913e3734f10d9 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 9 Aug 2024 10:00:56 -0400 Subject: [PATCH 24/61] Normalize No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index a281dce2..1094bce4 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -403,8 +403,8 @@ core:UcoObject sh:message "Value is outside the default vocabulary ObjectStatusVocab." ; sh:path core:objectStatus ; sh:severity sh:Info ; - ] , - [ + ] , + [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; sh:or ( @@ -416,8 +416,8 @@ core:UcoObject ] ) ; sh:path core:objectStatus ; - ] , - [ + ] , + [ sh:message "Value is not member of the vocabulary ObjectStatusVocab." ; sh:or ( [ @@ -433,7 +433,7 @@ core:UcoObject ] ) ; sh:path core:objectStatus ; - ] + ] ; sh:targetClass core:UcoObject ; . @@ -660,9 +660,9 @@ core:objectMarking core:objectStatus a owl:DatatypeProperty ; - rdfs:comment "The current state of formality and acceptance for a UCO object ."@en-US ; - rdfs:label "Object Status"@en-US ; - rdfs:range [ + rdfs:label "Object Status"@en-US ; + rdfs:comment "The current state of formality and acceptance for a UCO object ."@en-US ; + rdfs:range [ a rdfs:Datatype ; owl:unionOf ( xsd:string From 70a1975461548ee695c43a283259f0f15faaa0af Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 9 Aug 2024 11:54:00 -0400 Subject: [PATCH 25/61] Move ObjectStatusVocab into core namesapce This follows a committee decision to keep core as a namespace with no import-dependencies. No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 29 +++++++++++++++++++------- ontology/uco/vocabulary/vocabulary.ttl | 14 ------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index b9d4d8f8..c976948a 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -5,7 +5,6 @@ @prefix rdfs: . @prefix sh: . @prefix types: . -@prefix vocabulary: . @prefix xsd: . @@ -318,6 +317,20 @@ core:ModusOperandi sh:targetClass core:ModusOperandi ; . +core:ObjectStatusVocab + a rdfs:Datatype ; + rdfs:label "Object Status Vocabulary"@en-US ; + owl:equivalentClass [ + a rdfs:Datatype ; + owl:onDatatype xsd:string ; + owl:oneOf ( + "Draft"^^core:ObjectStatusVocab + "Final"^^core:ObjectStatusVocab + "Deprecated"^^core:ObjectStatusVocab + ) ; + ] ; + . + core:Relationship a owl:Class , @@ -454,7 +467,7 @@ core:UcoObject sh:path core:tag ; ] , [ - sh:datatype vocabulary:ObjectStatusVocab ; + sh:datatype core:ObjectStatusVocab ; sh:message "Value is outside the default vocabulary ObjectStatusVocab." ; sh:path core:objectStatus ; sh:severity sh:Info ; @@ -464,7 +477,7 @@ core:UcoObject sh:nodeKind sh:Literal ; sh:or ( [ - sh:datatype vocabulary:ObjectStatusVocab ; + sh:datatype core:ObjectStatusVocab ; ] [ sh:datatype xsd:string ; @@ -476,11 +489,11 @@ core:UcoObject sh:message "Value is not member of the vocabulary ObjectStatusVocab." ; sh:or ( [ - sh:datatype vocabulary:ObjectStatusVocab ; + sh:datatype core:ObjectStatusVocab ; sh:in ( - "Draft"^^vocabulary:ObjectStatusVocab - "Final"^^vocabulary:ObjectStatusVocab - "Deprecated"^^vocabulary:ObjectStatusVocab + "Draft"^^core:ObjectStatusVocab + "Final"^^core:ObjectStatusVocab + "Deprecated"^^core:ObjectStatusVocab ) ; ] [ @@ -742,7 +755,7 @@ core:objectStatus a rdfs:Datatype ; owl:unionOf ( xsd:string - vocabulary:ObjectStatusVocab + core:ObjectStatusVocab ) ; ] ; . diff --git a/ontology/uco/vocabulary/vocabulary.ttl b/ontology/uco/vocabulary/vocabulary.ttl index fe63a0a0..d13c89e7 100644 --- a/ontology/uco/vocabulary/vocabulary.ttl +++ b/ontology/uco/vocabulary/vocabulary.ttl @@ -659,20 +659,6 @@ vocabulary:MemoryBlockTypeVocab ] ; . -vocabulary:ObjectStatusVocab - a rdfs:Datatype ; - rdfs:label "Object Status Vocabulary"@en-US ; - owl:equivalentClass [ - a rdfs:Datatype ; - owl:onDatatype xsd:string ; - owl:oneOf ( - "Draft"^^vocabulary:ObjectStatusVocab - "Final"^^vocabulary:ObjectStatusVocab - "Deprecated"^^vocabulary:ObjectStatusVocab - ) ; - ] ; - . - vocabulary:ObservableObjectRelationshipVocab a rdfs:Datatype ; rdfs:label "Cyber Item Relationship Vocabulary"@en-US ; From becf55e731f6099c704cf77e06839dff83e78a02 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 9 Aug 2024 14:07:57 -0400 Subject: [PATCH 26/61] Remove owl:onDatatype from vocabulary definitions References: * https://github.com/ucoProject/UCO/issues/593 Signed-off-by: Alex Nelson --- ontology/uco/vocabulary/vocabulary.ttl | 44 -------------------------- 1 file changed, 44 deletions(-) diff --git a/ontology/uco/vocabulary/vocabulary.ttl b/ontology/uco/vocabulary/vocabulary.ttl index d13c89e7..2e013aa7 100644 --- a/ontology/uco/vocabulary/vocabulary.ttl +++ b/ontology/uco/vocabulary/vocabulary.ttl @@ -17,7 +17,6 @@ vocabulary:AccountTypeVocab rdfs:label "Account Type Vocabulary"@en-US ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "ldap"^^vocabulary:AccountTypeVocab "nis"^^vocabulary:AccountTypeVocab @@ -37,7 +36,6 @@ vocabulary:ActionArgumentNameVocab rdfs:comment "Defines an open-vocabulary for common arguments of cyber actions."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "APC Address"^^vocabulary:ActionArgumentNameVocab "APC Mode"^^vocabulary:ActionArgumentNameVocab @@ -100,7 +98,6 @@ vocabulary:ActionNameVocab rdfs:comment "Defines an open-vocabulary of common specific cyber action names."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Accept Socket Connection"^^vocabulary:ActionNameVocab "Add Connection to Network Share"^^vocabulary:ActionNameVocab @@ -293,7 +290,6 @@ vocabulary:ActionRelationshipTypeVocab rdfs:comment "Defines an open-vocabulary for capturing types of relationships between actions."@en-US ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Dependent_On"^^vocabulary:ActionRelationshipTypeVocab "Equivalent_To"^^vocabulary:ActionRelationshipTypeVocab @@ -312,7 +308,6 @@ vocabulary:ActionStatusTypeVocab rdfs:comment "Defines an open-vocabulary of action status types."@en-US ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Complete/Finish"^^vocabulary:ActionStatusTypeVocab "Error"^^vocabulary:ActionStatusTypeVocab @@ -331,7 +326,6 @@ vocabulary:ActionTypeVocab rdfs:comment "Defines an open-vocabulary of common general action types."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Accept"^^vocabulary:ActionTypeVocab "Access"^^vocabulary:ActionTypeVocab @@ -454,7 +448,6 @@ vocabulary:BitnessVocab rdfs:comment "Defines an open-vocabulary of word sizes that define classes of operating systems."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "32"^^vocabulary:BitnessVocab "64"^^vocabulary:BitnessVocab @@ -468,7 +461,6 @@ vocabulary:CharacterEncodingVocab rdfs:comment "Defines an open-vocabulary of character encodings."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "ASCII"^^vocabulary:CharacterEncodingVocab "UTF-16"^^vocabulary:CharacterEncodingVocab @@ -493,7 +485,6 @@ vocabulary:ContactAddressScopeVocab rdfs:comment "Defines an open-vocabulary of scopes for address entries of digital contacts."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "home"^^vocabulary:ContactAddressScopeVocab "work"^^vocabulary:ContactAddressScopeVocab @@ -508,7 +499,6 @@ vocabulary:ContactEmailScopeVocab rdfs:comment "Defines an open-vocabulary of scopes for email entries of digital contacts."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "home"^^vocabulary:ContactEmailScopeVocab "work"^^vocabulary:ContactEmailScopeVocab @@ -524,7 +514,6 @@ vocabulary:ContactPhoneScopeVocab rdfs:comment "Defines an open-vocabulary of scopes for phone entries of digital contacts."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "home"^^vocabulary:ContactPhoneScopeVocab "work"^^vocabulary:ContactPhoneScopeVocab @@ -544,7 +533,6 @@ vocabulary:ContactSIPScopeVocab rdfs:comment "Defines an open-vocabulary of scopes for Session Initiation Protocol (SIP) entries of digital contacts."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "home"^^vocabulary:ContactSIPScopeVocab "work"^^vocabulary:ContactSIPScopeVocab @@ -559,7 +547,6 @@ vocabulary:ContactURLScopeVocab rdfs:comment "Defines an open-vocabulary of scopes for URL entries of digital contacts."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "home"^^vocabulary:ContactURLScopeVocab "work"^^vocabulary:ContactURLScopeVocab @@ -575,7 +562,6 @@ vocabulary:DiskTypeVocab rdfs:comment "Defines an open-vocabulary of disk types."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "CDRom"^^vocabulary:DiskTypeVocab "Fixed"^^vocabulary:DiskTypeVocab @@ -592,7 +578,6 @@ vocabulary:EndiannessTypeVocab rdfs:comment "Defines an open-vocabulary of byte ordering methods."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Big-endian"^^vocabulary:EndiannessTypeVocab "Little-endian"^^vocabulary:EndiannessTypeVocab @@ -607,7 +592,6 @@ vocabulary:HashNameVocab rdfs:comment "Defines an open-vocabulary of hashing algorithm names."@en-US ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "MD5"^^vocabulary:HashNameVocab "MD6"^^vocabulary:HashNameVocab @@ -631,7 +615,6 @@ vocabulary:LibraryTypeVocab rdfs:comment "Defines an open-vocabulary of library types."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Dynamic"^^vocabulary:LibraryTypeVocab "Other"^^vocabulary:LibraryTypeVocab @@ -648,7 +631,6 @@ vocabulary:MemoryBlockTypeVocab rdfs:comment "Defines an open-vocabulary of types of memory blocks."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Bit-mapped"^^vocabulary:MemoryBlockTypeVocab "Byte-mapped"^^vocabulary:MemoryBlockTypeVocab @@ -665,7 +647,6 @@ vocabulary:ObservableObjectRelationshipVocab rdfs:comment "Defines an open-vocabulary of inter-observable object relationships."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Allocated"^^vocabulary:ObservableObjectRelationshipVocab "Allocated_By"^^vocabulary:ObservableObjectRelationshipVocab @@ -816,7 +797,6 @@ vocabulary:ObservableObjectStateVocab rdfs:comment "Defines an open-vocabulary of observable object states."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Active"^^vocabulary:ObservableObjectStateVocab "Closed"^^vocabulary:ObservableObjectStateVocab @@ -838,7 +818,6 @@ vocabulary:PartitionTypeVocab rdfs:comment "Defines an open-vocabulary of partition types. See http://www.win.tue.nl/~aeb/partitions/partition_types-1.html for more information about the various partition types."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "PARTITION_ENTRY_UNUSED"^^vocabulary:PartitionTypeVocab "PARTITION_EXTENDED"^^vocabulary:PartitionTypeVocab @@ -869,7 +848,6 @@ vocabulary:ProcessorArchVocab rdfs:comment "Defines an open-vocabulary of computer processor architectures."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "ARM"^^vocabulary:ProcessorArchVocab "Alpha"^^vocabulary:ProcessorArchVocab @@ -893,7 +871,6 @@ vocabulary:RecoveredObjectStatusVocab rdfs:comment "Defines the vocabulary for Recovered Object status of data."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "recovered"^^vocabulary:RecoveredObjectStatusVocab "partially recovered"^^vocabulary:RecoveredObjectStatusVocab @@ -909,7 +886,6 @@ vocabulary:RegionalRegistryTypeVocab rdfs:comment "Defines an open-vocabulary of Regional Internet Registries (RIRs) names, represented via their respective acronyms."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "APNIC"^^vocabulary:RegionalRegistryTypeVocab "ARIN"^^vocabulary:RegionalRegistryTypeVocab @@ -925,7 +901,6 @@ vocabulary:RegistryDatatypeVocab rdfs:label "Registry Datatype Vocabulary"@en-US ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "reg_binary"^^vocabulary:RegistryDatatypeVocab "reg_dword"^^vocabulary:RegistryDatatypeVocab @@ -950,7 +925,6 @@ vocabulary:SIMFormVocab rdfs:comment "Defines an open-vocabulary of common SIM card form factors."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Full-size SIM"^^vocabulary:SIMFormVocab "Micro SIM"^^vocabulary:SIMFormVocab @@ -965,7 +939,6 @@ vocabulary:SIMTypeVocab rdfs:comment "Defines an open-vocabulary of common SIM card types."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "SIM"^^vocabulary:SIMTypeVocab "UICC"^^vocabulary:SIMTypeVocab @@ -980,7 +953,6 @@ vocabulary:TaskActionTypeVocab rdfs:comment "Defines an open-vocabulary of task action types. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa380596(v=vs.85).aspx."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "TASK_ACTION_COM_HANDLER"^^vocabulary:TaskActionTypeVocab "TASK_ACTION_EXEC"^^vocabulary:TaskActionTypeVocab @@ -996,7 +968,6 @@ vocabulary:TaskFlagVocab rdfs:comment "Defines an open-vocabulary of the run flags for a task scheduler task. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa381283(v=vs.85).aspx See Also: http://msdn.microsoft.com/en-us/library/microsoft.office.excel.server.addins.computecluster.taskscheduler.taskflags(v=office.12).aspx."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "TASK_FLAG_DELETE_WHEN_DONE"^^vocabulary:TaskFlagVocab "TASK_FLAG_DISABLED"^^vocabulary:TaskFlagVocab @@ -1021,7 +992,6 @@ vocabulary:TaskPriorityVocab rdfs:comment "Defines an open-vocabulary of the priority levels of task scheduler tasks. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383512(v=vs.85).aspx."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "ABOVE_NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab "BELOW_NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab @@ -1039,7 +1009,6 @@ vocabulary:TaskStatusVocab rdfs:comment "Defines an open-vocabulary of the possible statuses of a scheduled task. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383604(v=vs.85).aspx See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa381263(v=vs.85).aspx See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa381833(v=vs.85).aspx See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383617(v=vs.85).aspx."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "SCHED_E_ACCOUNT_DBASE_CORRUPT"^^vocabulary:TaskStatusVocab "SCHED_E_ACCOUNT_INFORMATION_NOT_SET"^^vocabulary:TaskStatusVocab @@ -1075,7 +1044,6 @@ vocabulary:ThreadRunningStatusVocab rdfs:comment "Defines an open-vocabulary of the various states that a thread may be in before, during, or after execution. See http://msdn.microsoft.com/en-us/library/system.diagnostics.threadstate(v=vs.110).aspx."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Initialized"^^vocabulary:ThreadRunningStatusVocab "Ready"^^vocabulary:ThreadRunningStatusVocab @@ -1095,7 +1063,6 @@ vocabulary:TimestampPrecisionVocab rdfs:comment "Defines an open-vocabulary of timestamp precision granularities."@en-US ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "day"^^vocabulary:TimestampPrecisionVocab "hour"^^vocabulary:TimestampPrecisionVocab @@ -1113,7 +1080,6 @@ vocabulary:TrendVocab rdfs:comment "Defines an open-vocabulary of trend values."@en-US ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Decreasing"^^vocabulary:TrendVocab "Increasing"^^vocabulary:TrendVocab @@ -1127,7 +1093,6 @@ vocabulary:TriggerFrequencyVocab rdfs:comment "Defines an open-vocabulary of the frequency types that a trigger may use. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383620(v=vs.85).aspx and http://msdn.microsoft.com/en-us/library/windows/desktop/aa383987(v=vs.85).aspx."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "TASK_EVENT_TRIGGER_AT_LOGON"^^vocabulary:TriggerFrequencyVocab "TASK_EVENT_TRIGGER_AT_SYSTEMSTART"^^vocabulary:TriggerFrequencyVocab @@ -1147,7 +1112,6 @@ vocabulary:TriggerTypeVocab rdfs:comment "Defines an open-vocabulary of the types of triggers associated with a task."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "TASK_TRIGGER_BOOT"^^vocabulary:TriggerTypeVocab "TASK_TRIGGER_EVENT"^^vocabulary:TriggerTypeVocab @@ -1166,7 +1130,6 @@ vocabulary:URLTransitionTypeVocab rdfs:comment "Defines an open-vocabulary of types of URL transitions."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "link"^^vocabulary:URLTransitionTypeVocab "typed"^^vocabulary:URLTransitionTypeVocab @@ -1189,7 +1152,6 @@ vocabulary:UnixProcessStateVocab rdfs:comment "Defines an open-vocabulary of Unix process states"@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Dead"^^vocabulary:UnixProcessStateVocab "InterruptibleSleep"^^vocabulary:UnixProcessStateVocab @@ -1208,7 +1170,6 @@ vocabulary:WhoisContactTypeVocab rdfs:comment "Defines an open-vocabulary of types of registrar contacts listed in a whois entry."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "ADMIN"^^vocabulary:WhoisContactTypeVocab "BILLING"^^vocabulary:WhoisContactTypeVocab @@ -1223,7 +1184,6 @@ vocabulary:WhoisDNSSECTypeVocab rdfs:comment "Defines an open-vocabulary of acceptable values for the DNSSEC field in a Whois entry."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Signed"^^vocabulary:WhoisDNSSECTypeVocab "Unsigned"^^vocabulary:WhoisDNSSECTypeVocab @@ -1237,7 +1197,6 @@ vocabulary:WhoisStatusTypeVocab rdfs:comment "Defines an open-vocabulary of all valid statuses for a domain within a whois entry."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "ADD_PERIOD"^^vocabulary:WhoisStatusTypeVocab "AUTO_RENEW_PERIOD"^^vocabulary:WhoisStatusTypeVocab @@ -1268,7 +1227,6 @@ vocabulary:WindowsDriveTypeVocab rdfs:comment "Defines an open-vocabulary of possible drive types, as enumerated by the WINAPI GetDriveType function: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364939(v=vs.85).aspx."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "DRIVE_CDROM"^^vocabulary:WindowsDriveTypeVocab "DRIVE_FIXED"^^vocabulary:WindowsDriveTypeVocab @@ -1287,7 +1245,6 @@ vocabulary:WindowsVolumeAttributeVocab rdfs:comment "Defines an open-vocabulary of attributes that may be returned by the diskpart attributes command: http://technet.microsoft.com/en-us/library/cc766465(v=ws.10).aspx."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Hidden"^^vocabulary:WindowsVolumeAttributeVocab "NoDefaultDriveLetter"^^vocabulary:WindowsVolumeAttributeVocab @@ -1303,7 +1260,6 @@ vocabulary:WirelessNetworkSecurityModeVocab rdfs:comment "Defines an open-vocabulary of security modes that may be configured for wireless network connections."@en ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "None"^^vocabulary:WirelessNetworkSecurityModeVocab "WEP"^^vocabulary:WirelessNetworkSecurityModeVocab From aea0c04c264e680d28fd2cda896c4079eb629d20 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:01:43 -0400 Subject: [PATCH 27/61] Demonstrate revised vocabulary pattern on types:hashMethod A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- ontology/uco/types/types.ttl | 62 +++++++++++--------------- ontology/uco/vocabulary/vocabulary.ttl | 24 +++++----- tests/examples/hash_PASS.json | 32 +++++++++++++ tests/examples/hash_XFAIL.json | 42 ++--------------- tests/examples/test_validation.py | 20 ++++++--- 5 files changed, 85 insertions(+), 95 deletions(-) diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index 2f646d9f..2b366e0e 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -135,6 +135,7 @@ types:Hash rdfs:subClassOf core:UcoInherentCharacterizationThing ; rdfs:label "Hash"@en ; rdfs:comment "A hash is a grouping of characteristics unique to the result of applying a mathematical algorithm that maps data of arbitrary size to a bit string (the 'hash') and is a one-way function, that is, a function which is practically infeasible to invert. This is commonly used for integrity checking of data. [based on https://en.wikipedia.org/wiki/Cryptographic_hash_function]"@en ; + rdfs:seeAlso types:hashMethod-objects-in-shape ; sh:property [ sh:datatype xsd:hexBinary ; @@ -144,49 +145,15 @@ types:Hash sh:path types:hashValue ; ] , [ - sh:datatype vocabulary:HashNameVocab ; - sh:message "Value is outside the default vocabulary HashNameVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for types:hashMethod should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path types:hashMethod ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:HashNameVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path types:hashMethod ; - ] , - [ - sh:message "Value is not member of the vocabulary HashNameVocab." ; - sh:or ( - [ - sh:datatype vocabulary:HashNameVocab ; - sh:in ( - "MD5"^^vocabulary:HashNameVocab - "MD6"^^vocabulary:HashNameVocab - "SHA1"^^vocabulary:HashNameVocab - "SHA224"^^vocabulary:HashNameVocab - "SHA256"^^vocabulary:HashNameVocab - "SHA3-224"^^vocabulary:HashNameVocab - "SHA3-256"^^vocabulary:HashNameVocab - "SHA3-384"^^vocabulary:HashNameVocab - "SHA3-512"^^vocabulary:HashNameVocab - "SHA384"^^vocabulary:HashNameVocab - "SHA512"^^vocabulary:HashNameVocab - "SSDEEP"^^vocabulary:HashNameVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; sh:path types:hashMethod ; ] ; @@ -339,6 +306,27 @@ types:hashMethod ] ; . +types:hashMethod-objects-in-shape + a sh:NodeShape ; + sh:in ( + "MD5" + "MD6" + "SHA1" + "SHA224" + "SHA256" + "SHA3-224" + "SHA3-256" + "SHA3-384" + "SHA3-512" + "SHA384" + "SHA512" + "SSDEEP" + ) ; + sh:message "Value is not member of the vocabulary HashNameVocab." ; + sh:severity sh:Info ; + sh:targetObjectsOf types:hashMethod ; + . + types:hashValue a owl:DatatypeProperty ; rdfs:label "hashValue"@en ; diff --git a/ontology/uco/vocabulary/vocabulary.ttl b/ontology/uco/vocabulary/vocabulary.ttl index d13c89e7..8b128275 100644 --- a/ontology/uco/vocabulary/vocabulary.ttl +++ b/ontology/uco/vocabulary/vocabulary.ttl @@ -609,18 +609,18 @@ vocabulary:HashNameVocab a rdfs:Datatype ; owl:onDatatype xsd:string ; owl:oneOf ( - "MD5"^^vocabulary:HashNameVocab - "MD6"^^vocabulary:HashNameVocab - "SHA1"^^vocabulary:HashNameVocab - "SHA224"^^vocabulary:HashNameVocab - "SHA256"^^vocabulary:HashNameVocab - "SHA3-224"^^vocabulary:HashNameVocab - "SHA3-256"^^vocabulary:HashNameVocab - "SHA3-384"^^vocabulary:HashNameVocab - "SHA3-512"^^vocabulary:HashNameVocab - "SHA384"^^vocabulary:HashNameVocab - "SHA512"^^vocabulary:HashNameVocab - "SSDEEP"^^vocabulary:HashNameVocab + "MD5" + "MD6" + "SHA1" + "SHA224" + "SHA256" + "SHA3-224" + "SHA3-256" + "SHA3-384" + "SHA3-512" + "SHA384" + "SHA512" + "SSDEEP" ) ; ] ; . diff --git a/tests/examples/hash_PASS.json b/tests/examples/hash_PASS.json index c663ea5a..753470f1 100644 --- a/tests/examples/hash_PASS.json +++ b/tests/examples/hash_PASS.json @@ -1,14 +1,36 @@ { "@context": { "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "types": "https://ontology.unifiedcyberontology.org/uco/types/", "vocabulary": "https://ontology.unifiedcyberontology.org/uco/vocabulary/", "xsd": "http://www.w3.org/2001/XMLSchema#" }, "@graph": [ + { + "@id": "kb:hash-04dcd1dc-6920-4977-a898-e242870249a4", + "@type": "types:Hash", + "rdfs:comment": "Should trigger sh:Info from the hashMethod literal not having its value be in the HashNameVocab vocabulary.", + "types:hashMethod": "CUSTOM_hash", + "types:hashValue": { + "@type": "xsd:hexBinary", + "@value": "a39a3ee5e6b4b0d3255bfef95601890afd80709d" + } + }, + { + "@id": "kb:hash-af4b0c85-b042-4e2d-a213-210b3d7f115c", + "@type": "types:Hash", + "rdfs:comment": "Should trigger sh:Info from the hashMethod literal not being a member of the vocabulary. ('SHA1' is in the vocabulary; 'SHA-1' isn't.)", + "types:hashMethod": "SHA-1", + "types:hashValue": { + "@type": "xsd:hexBinary", + "@value": "da39a3ee5e6b4b0d3255bfef95601890afd80709" + } + }, { "@id": "kb:hash-b7eca8de-142d-4aa9-b546-0796a268afa4", "@type": "types:Hash", + "rdfs:comment": "Should trigger an sh:Info from the hashMethod value not having its (literal-)value in the HashNameVocab vocabulary, and also not being an xsd:string.", "types:hashMethod": { "@type": "vocabulary:HashNameVocab", "@value": "SHA1" @@ -17,6 +39,16 @@ "@type": "xsd:hexBinary", "@value": "da39a3ee5e6b4b0d3255bfef95601890afd80709" } + }, + { + "@id": "kb:hash-f46c714f-559a-4325-bf8a-4ef60c92c771", + "@type": "types:Hash", + "rdfs:comment": "This should trigger an sh:Warning from the hashMethod value not being a string, and not being in the HashNameVocab vocabulary.", + "types:hashMethod": 1, + "types:hashValue": { + "@type": "xsd:hexBinary", + "@value": "da39a3ee5e6b4b0d3255bfef95601890afd80709" + } } ] } diff --git a/tests/examples/hash_XFAIL.json b/tests/examples/hash_XFAIL.json index 9b056adc..d0097408 100644 --- a/tests/examples/hash_XFAIL.json +++ b/tests/examples/hash_XFAIL.json @@ -7,47 +7,11 @@ }, "@graph": [ { - "@id": "kb:hash-04dcd1dc-6920-4977-a898-e242870249a4", + "@id": "kb:hash-66954988-aa9a-4f0d-8ad1-380700c830fc", "@type": "types:Hash", - "rdfs:comment": "Should trigger sh:Info from the literal not having its datatype be the HashNameVocab vocabulary.", - "types:hashMethod": "CUSTOM_hash", - "types:hashValue": { - "@type": "xsd:hexBinary", - "@value": "a39a3ee5e6b4b0d3255bfef95601890afd80709d" - } - }, - { - "@id": "kb:hash-af4b0c85-b042-4e2d-a213-210b3d7f115c", - "@type": "types:Hash", - "rdfs:comment": "Should trigger sh:Violation from the literal declaring itself a member of the vocabulary, but not being a member. ('SHA1' is in the vocabulary; 'SHA-1' isn't.)", - "types:hashMethod": { - "@type": "vocabulary:HashNameVocab", - "@value": "SHA-1" - }, - "types:hashValue": { - "@type": "xsd:hexBinary", - "@value": "da39a3ee5e6b4b0d3255bfef95601890afd80709" - } - }, - { - "@id": "kb:hash-e97431ea-6fb8-46d9-9c23-94be4b7cc977", - "@type": "types:Hash", - "rdfs:comment": "This should trigger sh:Info from the term not having its datatype be the vocabulary. Currently, no inspection is done on the lexical value.", + "rdfs:comment": "This should trigger sh:Violation from the hash value not being hexBinary.", "types:hashMethod": "SHA1", - "types:hashValue": { - "@type": "xsd:hexBinary", - "@value": "da39a3ee5e6b4b0d3255bfef95601890afd80709" - } - }, - { - "@id": "kb:hash-f46c714f-559a-4325-bf8a-4ef60c92c771", - "@type": "types:Hash", - "rdfs:comment": "This should trigger sh:Violation from the term not being a string.", - "types:hashMethod": 1, - "types:hashValue": { - "@type": "xsd:hexBinary", - "@value": "da39a3ee5e6b4b0d3255bfef95601890afd80709" - } + "types:hashValue": "da39a3ee5e6b4b0d3255bfef95601890afd80709" } ] } diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 6c4fc658..49f57ee7 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -283,19 +283,25 @@ def test_has_facet_inverse_functional_XFAIL() -> None: ) def test_hash_PASS() -> None: - g = load_validation_graph("hash_PASS_validation.ttl", True) - assert isinstance(g, rdflib.Graph) + confirm_validation_results( + "hash_PASS_validation.ttl", + True, + expected_focus_node_severities={ + ("1", str(NS_SH.Info)), + ("CUSTOM_hash", str(NS_SH.Info)), + ("SHA-1", str(NS_SH.Info)), + ("SHA1", str(NS_SH.Info)), + ("http://example.org/kb/hash-b7eca8de-142d-4aa9-b546-0796a268afa4", str(NS_SH.Warning)), + ("http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771", str(NS_SH.Warning)), + } + ) def test_hash_XFAIL() -> None: confirm_validation_results( "hash_XFAIL_validation.ttl", False, expected_focus_node_severities={ - ("http://example.org/kb/hash-04dcd1dc-6920-4977-a898-e242870249a4", str(NS_SH.Info)), - ("http://example.org/kb/hash-af4b0c85-b042-4e2d-a213-210b3d7f115c", str(NS_SH.Violation)), - ("http://example.org/kb/hash-e97431ea-6fb8-46d9-9c23-94be4b7cc977", str(NS_SH.Info)), - ("http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771", str(NS_SH.Info)), - ("http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771", str(NS_SH.Violation)) + ("http://example.org/kb/hash-66954988-aa9a-4f0d-8ad1-380700c830fc", str(NS_SH.Violation)) } ) From 6d385ba7834cf71360e6bea206ce1fb0b6a2c006 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:01:58 -0400 Subject: [PATCH 28/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- tests/examples/hash_PASS_validation.ttl | 70 ++++++++++ tests/examples/hash_XFAIL_validation.ttl | 157 +++-------------------- 2 files changed, 86 insertions(+), 141 deletions(-) diff --git a/tests/examples/hash_PASS_validation.ttl b/tests/examples/hash_PASS_validation.ttl index 33496ff0..56044fea 100644 --- a/tests/examples/hash_PASS_validation.ttl +++ b/tests/examples/hash_PASS_validation.ttl @@ -2,10 +2,80 @@ @prefix rdf: . @prefix rdfs: . @prefix sh: . +@prefix types: . +@prefix vocabulary: . @prefix xsd: . [] a sh:ValidationReport ; sh:conforms "true"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode "1"^^xsd:integer ; + sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; + sh:resultSeverity sh:Info ; + sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceShape types:hashMethod-objects-in-shape ; + sh:value "1"^^xsd:integer ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode "CUSTOM_hash" ; + sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; + sh:resultSeverity sh:Info ; + sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceShape types:hashMethod-objects-in-shape ; + sh:value "CUSTOM_hash" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode "SHA-1" ; + sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; + sh:resultSeverity sh:Info ; + sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceShape types:hashMethod-objects-in-shape ; + sh:value "SHA-1" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode "SHA1"^^vocabulary:HashNameVocab ; + sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; + sh:resultSeverity sh:Info ; + sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceShape types:hashMethod-objects-in-shape ; + sh:value "SHA1"^^vocabulary:HashNameVocab ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "As of UCO 1.4.0, the datatype to use for types:hashMethod should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:resultPath types:hashMethod ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for types:hashMethod should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:path types:hashMethod ; + sh:severity sh:Warning ; + ] ; + sh:value "SHA1"^^vocabulary:HashNameVocab ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "As of UCO 1.4.0, the datatype to use for types:hashMethod should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:resultPath types:hashMethod ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for types:hashMethod should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:path types:hashMethod ; + sh:severity sh:Warning ; + ] ; + sh:value "1"^^xsd:integer ; + ] + ; . diff --git a/tests/examples/hash_XFAIL_validation.ttl b/tests/examples/hash_XFAIL_validation.ttl index e05552df..48cc07e1 100644 --- a/tests/examples/hash_XFAIL_validation.ttl +++ b/tests/examples/hash_XFAIL_validation.ttl @@ -3,151 +3,26 @@ @prefix rdfs: . @prefix sh: . @prefix types: . -@prefix vocabulary: . @prefix xsd: . [] a sh:ValidationReport ; sh:conforms "false"^^xsd:boolean ; - sh:result - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is outside the default vocabulary HashNameVocab." ; - sh:resultPath types:hashMethod ; - sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - sh:datatype vocabulary:HashNameVocab ; - sh:message "Value is outside the default vocabulary HashNameVocab." ; - sh:path types:hashMethod ; - sh:severity sh:Info ; - ] ; - sh:value "CUSTOM_hash" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; - sh:resultPath types:hashMethod ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:OrConstraintComponent ; - sh:sourceShape [ - sh:message "Value is not member of the vocabulary HashNameVocab." ; - sh:or ( - [ - sh:datatype vocabulary:HashNameVocab ; - sh:in ( - "MD5"^^vocabulary:HashNameVocab - "MD6"^^vocabulary:HashNameVocab - "SHA1"^^vocabulary:HashNameVocab - "SHA224"^^vocabulary:HashNameVocab - "SHA256"^^vocabulary:HashNameVocab - "SHA3-224"^^vocabulary:HashNameVocab - "SHA3-256"^^vocabulary:HashNameVocab - "SHA3-384"^^vocabulary:HashNameVocab - "SHA3-512"^^vocabulary:HashNameVocab - "SHA384"^^vocabulary:HashNameVocab - "SHA512"^^vocabulary:HashNameVocab - "SSDEEP"^^vocabulary:HashNameVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path types:hashMethod ; - ] ; - sh:value "SHA-1"^^vocabulary:HashNameVocab ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is outside the default vocabulary HashNameVocab." ; - sh:resultPath types:hashMethod ; - sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - sh:datatype vocabulary:HashNameVocab ; - sh:message "Value is outside the default vocabulary HashNameVocab." ; - sh:path types:hashMethod ; - sh:severity sh:Info ; - ] ; - sh:value "SHA1" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage 'Node Literal("1", datatype=xsd:integer) does not conform to one or more shapes in [ sh:datatype vocabulary:HashNameVocab ] , [ sh:datatype xsd:string ]' ; - sh:resultPath types:hashMethod ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:OrConstraintComponent ; - sh:sourceShape [ - sh:maxCount "1"^^xsd:integer ; - sh:minCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:HashNameVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path types:hashMethod ; - ] ; - sh:value "1"^^xsd:integer ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; - sh:resultPath types:hashMethod ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:OrConstraintComponent ; - sh:sourceShape [ - sh:message "Value is not member of the vocabulary HashNameVocab." ; - sh:or ( - [ - sh:datatype vocabulary:HashNameVocab ; - sh:in ( - "MD5"^^vocabulary:HashNameVocab - "MD6"^^vocabulary:HashNameVocab - "SHA1"^^vocabulary:HashNameVocab - "SHA224"^^vocabulary:HashNameVocab - "SHA256"^^vocabulary:HashNameVocab - "SHA3-224"^^vocabulary:HashNameVocab - "SHA3-256"^^vocabulary:HashNameVocab - "SHA3-384"^^vocabulary:HashNameVocab - "SHA3-512"^^vocabulary:HashNameVocab - "SHA384"^^vocabulary:HashNameVocab - "SHA512"^^vocabulary:HashNameVocab - "SSDEEP"^^vocabulary:HashNameVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path types:hashMethod ; - ] ; - sh:value "1"^^xsd:integer ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is outside the default vocabulary HashNameVocab." ; - sh:resultPath types:hashMethod ; - sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - sh:datatype vocabulary:HashNameVocab ; - sh:message "Value is outside the default vocabulary HashNameVocab." ; - sh:path types:hashMethod ; - sh:severity sh:Info ; - ] ; - sh:value "1"^^xsd:integer ; - ] - ; + sh:result [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value is not Literal with datatype xsd:hexBinary" ; + sh:resultPath types:hashValue ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + sh:datatype xsd:hexBinary ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; + sh:path types:hashValue ; + ] ; + sh:value "da39a3ee5e6b4b0d3255bfef95601890afd80709" ; + ] ; . From a7c7814fdbc68694d42a507cc35318dc9803b346 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 9 Aug 2024 11:56:33 -0400 Subject: [PATCH 29/61] Close objectStatus No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 44 ++++++-------------------------------- 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index c976948a..045f602e 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -468,38 +468,14 @@ core:UcoObject ] , [ sh:datatype core:ObjectStatusVocab ; - sh:message "Value is outside the default vocabulary ObjectStatusVocab." ; - sh:path core:objectStatus ; - sh:severity sh:Info ; - ] , - [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype core:ObjectStatusVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "Draft"^^core:ObjectStatusVocab + "Final"^^core:ObjectStatusVocab + "Deprecated"^^core:ObjectStatusVocab ) ; - sh:path core:objectStatus ; - ] , - [ + sh:maxCount "1"^^xsd:integer ; sh:message "Value is not member of the vocabulary ObjectStatusVocab." ; - sh:or ( - [ - sh:datatype core:ObjectStatusVocab ; - sh:in ( - "Draft"^^core:ObjectStatusVocab - "Final"^^core:ObjectStatusVocab - "Deprecated"^^core:ObjectStatusVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:nodeKind sh:Literal ; sh:path core:objectStatus ; ] ; @@ -751,13 +727,7 @@ core:objectStatus a owl:DatatypeProperty ; rdfs:label "Object Status"@en-US ; rdfs:comment "The current state of formality and acceptance for a UCO object ."@en-US ; - rdfs:range [ - a rdfs:Datatype ; - owl:unionOf ( - xsd:string - core:ObjectStatusVocab - ) ; - ] ; + rdfs:range core:ObjectStatusVocab ; . core:referenceURL From f7a0f306976919a27faa9bfa4954eb036991596a Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:16:28 -0400 Subject: [PATCH 30/61] Add tests A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- tests/examples/Makefile | 4 ++++ tests/examples/object_status_PASS.json | 16 ++++++++++++++++ tests/examples/object_status_XFAIL.json | 15 +++++++++++++++ tests/examples/test_validation.py | 18 ++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 tests/examples/object_status_PASS.json create mode 100644 tests/examples/object_status_XFAIL.json diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 66b33e05..552c0b89 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -41,6 +41,8 @@ all: \ location_XFAIL_validation.ttl \ message_thread_PASS_validation.ttl \ message_thread_XFAIL_validation.ttl \ + object_status_PASS_validation.ttl \ + object_status_XFAIL_validation.ttl \ observable_creation_time_PASS_validation.ttl \ owl_axiom_PASS_validation.ttl \ owl_axiom_XFAIL_validation.ttl \ @@ -116,6 +118,8 @@ check: \ location_XFAIL_validation.ttl \ message_thread_PASS_validation.ttl \ message_thread_XFAIL_validation.ttl \ + object_status_PASS_validation.ttl \ + object_status_XFAIL_validation.ttl \ observable_creation_time_PASS_validation.ttl \ owl_axiom_PASS_validation.ttl \ owl_axiom_XFAIL_validation.ttl \ diff --git a/tests/examples/object_status_PASS.json b/tests/examples/object_status_PASS.json new file mode 100644 index 00000000..2d10dc40 --- /dev/null +++ b/tests/examples/object_status_PASS.json @@ -0,0 +1,16 @@ +{ + "@context": { + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "kb": "http://example.org/kb/" + }, + "@graph": [ + { + "@id": "kb:UcoObject-f86c567d-374a-4873-b9bc-a746ca2bf360", + "@type": "core:UcoObject", + "core:objectStatus": { + "@type": "core:ObjectStatusVocab", + "@value": "Draft" + } + } + ] +} diff --git a/tests/examples/object_status_XFAIL.json b/tests/examples/object_status_XFAIL.json new file mode 100644 index 00000000..8f8134bd --- /dev/null +++ b/tests/examples/object_status_XFAIL.json @@ -0,0 +1,15 @@ +{ + "@context": { + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "@graph": [ + { + "@id": "kb:UcoObject-6ae2b245-a8cd-45dc-9f40-5b2738879351", + "@type": "core:UcoObject", + "rdfs:comment": "This will trigger an error from using a value outside of the required vocabulary.", + "core:objectStatus": "Initial draft" + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 6c4fc658..4c1d0c01 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -425,6 +425,24 @@ def test_message_thread_PASS_validation() -> None: def test_message_thread_XFAIL_validation() -> None: confirm_validation_results("message_thread_XFAIL_validation.ttl", False) +def test_object_status_PASS() -> None: + confirm_validation_results( + "object_status_PASS_validation.ttl", + True, + ) + +def test_object_status_XFAIL() -> None: + confirm_validation_results( + "object_status_XFAIL_validation.ttl", + False, + expected_focus_node_severities={ + ( + "http://example.org/kb/UcoObject-6ae2b245-a8cd-45dc-9f40-5b2738879351", + str(NS_SH.Violation) + ), + } + ) + def test_observable_creation_time_PASS() -> None: confirm_validation_results( "observable_creation_time_PASS_validation.ttl", From 8e09ce5fbd59dc94924ec4a16755f2243fe87b11 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:16:56 -0400 Subject: [PATCH 31/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- .../object_status_PASS_validation.ttl | 11 ++++ .../object_status_XFAIL_validation.ttl | 56 +++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 tests/examples/object_status_PASS_validation.ttl create mode 100644 tests/examples/object_status_XFAIL_validation.ttl diff --git a/tests/examples/object_status_PASS_validation.ttl b/tests/examples/object_status_PASS_validation.ttl new file mode 100644 index 00000000..33496ff0 --- /dev/null +++ b/tests/examples/object_status_PASS_validation.ttl @@ -0,0 +1,11 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + . + diff --git a/tests/examples/object_status_XFAIL_validation.ttl b/tests/examples/object_status_XFAIL_validation.ttl new file mode 100644 index 00000000..9edea63d --- /dev/null +++ b/tests/examples/object_status_XFAIL_validation.ttl @@ -0,0 +1,56 @@ +@prefix core: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value is not member of the vocabulary ObjectStatusVocab." ; + sh:resultPath core:objectStatus ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + sh:datatype core:ObjectStatusVocab ; + sh:in ( + "Draft"^^core:ObjectStatusVocab + "Final"^^core:ObjectStatusVocab + "Deprecated"^^core:ObjectStatusVocab + ) ; + sh:maxCount "1"^^xsd:integer ; + sh:message "Value is not member of the vocabulary ObjectStatusVocab." ; + sh:nodeKind sh:Literal ; + sh:path core:objectStatus ; + ] ; + sh:value "Initial draft" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value is not member of the vocabulary ObjectStatusVocab." ; + sh:resultPath core:objectStatus ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceShape [ + sh:datatype core:ObjectStatusVocab ; + sh:in ( + "Draft"^^core:ObjectStatusVocab + "Final"^^core:ObjectStatusVocab + "Deprecated"^^core:ObjectStatusVocab + ) ; + sh:maxCount "1"^^xsd:integer ; + sh:message "Value is not member of the vocabulary ObjectStatusVocab." ; + sh:nodeKind sh:Literal ; + sh:path core:objectStatus ; + ] ; + sh:value "Initial draft" ; + ] + ; + . + From 9c826ded368c3406005108e865f06c3491a1119b Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:20:05 -0400 Subject: [PATCH 32/61] Fix typo No effects were observed on Make-managed files. Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 045f602e..6ff703ac 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -726,7 +726,7 @@ core:objectMarking core:objectStatus a owl:DatatypeProperty ; rdfs:label "Object Status"@en-US ; - rdfs:comment "The current state of formality and acceptance for a UCO object ."@en-US ; + rdfs:comment "The current state of formality and acceptance for a UCO object."@en-US ; rdfs:range core:ObjectStatusVocab ; . From e9e9e0f9139809e0d94676e93e663450743a7123 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:24:20 -0400 Subject: [PATCH 33/61] Require core:objectStatus only be used on UcoObjects A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 6 ++++++ tests/examples/object_status_XFAIL.json | 11 +++++++++++ tests/examples/test_validation.py | 4 ++++ 3 files changed, 21 insertions(+) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 6ff703ac..172e7003 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -730,6 +730,12 @@ core:objectStatus rdfs:range core:ObjectStatusVocab ; . +core:objectStatus-subjects-shape + a sh:NodeShape ; + sh:class core:UcoObject ; + sh:targetSubjectsOf core:objectStatus ; + . + core:referenceURL a owl:DatatypeProperty ; rdfs:label "referenceURL"@en ; diff --git a/tests/examples/object_status_XFAIL.json b/tests/examples/object_status_XFAIL.json index 8f8134bd..b827c238 100644 --- a/tests/examples/object_status_XFAIL.json +++ b/tests/examples/object_status_XFAIL.json @@ -10,6 +10,17 @@ "@type": "core:UcoObject", "rdfs:comment": "This will trigger an error from using a value outside of the required vocabulary.", "core:objectStatus": "Initial draft" + }, + { + "@id": "kb:File-c9c36379-8eca-4a85-887c-b51f7721edfd", + "@type": "observable:File", + "core:hasFacet": { + "@id": "kb:ArchiveFileFacet-5884ca1c-2f5e-4e66-bdc6-7d48606f9fbc", + "@type": "observable:ArchiveFileFacet", + "rdfs:comment": "This will trigger an error from using objectStatus on a non-UcoObject thing.", + "core:objectStatus": "Draft", + "observable:archiveType": "Currently-unknown compressing-and-encrypting type seen multiple places, further research needed" + } } ] } diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 4c1d0c01..609c1b77 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -440,6 +440,10 @@ def test_object_status_XFAIL() -> None: "http://example.org/kb/UcoObject-6ae2b245-a8cd-45dc-9f40-5b2738879351", str(NS_SH.Violation) ), + ( + "http://example.org/kb/ArchiveFileFacet-5884ca1c-2f5e-4e66-bdc6-7d48606f9fbc", + str(NS_SH.Violation) + ), } ) From ccf355eff06bbb3399a0966345ac9181a2d26eea Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:32:05 -0400 Subject: [PATCH 34/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- tests/examples/object_status_XFAIL_validation.ttl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/examples/object_status_XFAIL_validation.ttl b/tests/examples/object_status_XFAIL_validation.ttl index 9edea63d..8eec5ef1 100644 --- a/tests/examples/object_status_XFAIL_validation.ttl +++ b/tests/examples/object_status_XFAIL_validation.ttl @@ -9,6 +9,15 @@ a sh:ValidationReport ; sh:conforms "false"^^xsd:boolean ; sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value does not have class core:UcoObject" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape core:objectStatus-subjects-shape ; + sh:value ; + ] , [ a sh:ValidationResult ; sh:focusNode ; From f54ac1bb93be7e9c402aa5f14d4c246c66e9fe97 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:33:36 -0400 Subject: [PATCH 35/61] Change type of core:objectStatus No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 172e7003..b0a89017 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -724,7 +724,7 @@ core:objectMarking . core:objectStatus - a owl:DatatypeProperty ; + a owl:AnnotationProperty ; rdfs:label "Object Status"@en-US ; rdfs:comment "The current state of formality and acceptance for a UCO object."@en-US ; rdfs:range core:ObjectStatusVocab ; From 253d3aa848caccd9766e00b9e804a15daa832764 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:34:33 -0400 Subject: [PATCH 36/61] Align label style for core:objectStatus No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index b0a89017..e09a766a 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -725,7 +725,7 @@ core:objectMarking core:objectStatus a owl:AnnotationProperty ; - rdfs:label "Object Status"@en-US ; + rdfs:label "objectStatus"@en ; rdfs:comment "The current state of formality and acceptance for a UCO object."@en-US ; rdfs:range core:ObjectStatusVocab ; . From 3a7b8cc0aa285ba52b1f88d143259417422813eb Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:41:16 -0400 Subject: [PATCH 37/61] Delegate membership error message to SHACL base templating A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 1 - 1 file changed, 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index e09a766a..3ecac152 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -474,7 +474,6 @@ core:UcoObject "Deprecated"^^core:ObjectStatusVocab ) ; sh:maxCount "1"^^xsd:integer ; - sh:message "Value is not member of the vocabulary ObjectStatusVocab." ; sh:nodeKind sh:Literal ; sh:path core:objectStatus ; ] From aa5a536c70d295fb2cfc948870e2172d7adedc0d Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 12 Aug 2024 23:52:14 -0400 Subject: [PATCH 38/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- tests/examples/object_status_XFAIL_validation.ttl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/examples/object_status_XFAIL_validation.ttl b/tests/examples/object_status_XFAIL_validation.ttl index 8eec5ef1..23f26131 100644 --- a/tests/examples/object_status_XFAIL_validation.ttl +++ b/tests/examples/object_status_XFAIL_validation.ttl @@ -21,10 +21,10 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage "Value is not member of the vocabulary ObjectStatusVocab." ; + sh:resultMessage "Value Literal(\"Initial draft\") not in list ['Literal(\"Final\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Draft\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Deprecated\" = None, datatype=core:ObjectStatusVocab)']" ; sh:resultPath core:objectStatus ; sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceConstraintComponent sh:InConstraintComponent ; sh:sourceShape [ sh:datatype core:ObjectStatusVocab ; sh:in ( @@ -33,7 +33,6 @@ "Deprecated"^^core:ObjectStatusVocab ) ; sh:maxCount "1"^^xsd:integer ; - sh:message "Value is not member of the vocabulary ObjectStatusVocab." ; sh:nodeKind sh:Literal ; sh:path core:objectStatus ; ] ; @@ -42,10 +41,10 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage "Value is not member of the vocabulary ObjectStatusVocab." ; + sh:resultMessage "Value is not Literal with datatype core:ObjectStatusVocab" ; sh:resultPath core:objectStatus ; sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; sh:sourceShape [ sh:datatype core:ObjectStatusVocab ; sh:in ( @@ -54,7 +53,6 @@ "Deprecated"^^core:ObjectStatusVocab ) ; sh:maxCount "1"^^xsd:integer ; - sh:message "Value is not member of the vocabulary ObjectStatusVocab." ; sh:nodeKind sh:Literal ; sh:path core:objectStatus ; ] ; From 14e32c26427ee7678d244cb0952325bcca667a81 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 28 Aug 2024 13:51:05 -0400 Subject: [PATCH 39/61] Adjust Make-managed file This patch adjusts the list to match the sort order from core.ttl. References: * https://github.com/ucoProject/UCO/issues/549 Signed-off-by: Alex Nelson --- tests/examples/object_status_XFAIL_validation.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/examples/object_status_XFAIL_validation.ttl b/tests/examples/object_status_XFAIL_validation.ttl index 23f26131..b84dd57b 100644 --- a/tests/examples/object_status_XFAIL_validation.ttl +++ b/tests/examples/object_status_XFAIL_validation.ttl @@ -21,7 +21,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage "Value Literal(\"Initial draft\") not in list ['Literal(\"Final\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Draft\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Deprecated\" = None, datatype=core:ObjectStatusVocab)']" ; + sh:resultMessage "Value Literal(\"Initial draft\") not in list ['Literal(\"Draft\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Final\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Deprecated\" = None, datatype=core:ObjectStatusVocab)']" ; sh:resultPath core:objectStatus ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:InConstraintComponent ; From 62ebeab6a1b018da991a4ddf262d29fd467aa9c7 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 13 Sep 2024 11:30:27 -0400 Subject: [PATCH 40/61] Prepare OperatingSystem to become a subclass of Software A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/632 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 20 ++++++++++ tests/examples/Makefile | 2 + tests/examples/operating_system_PASS.json | 48 +++++++++++++++++++++++ tests/examples/test_validation.py | 16 ++++++++ 4 files changed, 86 insertions(+) create mode 100644 tests/examples/operating_system_PASS.json diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 6dc75195..bf90249b 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -5158,6 +5158,14 @@ observable:OperatingSystem rdfs:subClassOf observable:ObservableObject ; rdfs:label "OperatingSystem"@en ; rdfs:comment "An operating system is the software that manages computer hardware, software resources, and provides common services for computer programs. [based on https://en.wikipedia.org/wiki/Operating_system]"@en ; + rdfs:seeAlso [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:class observable:Software ; + sh:message "In UCO 2.0.0, uco-observable:OperatingSystem will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ; + sh:severity sh:Warning ; + sh:targetClass observable:OperatingSystem ; + ] ; sh:targetClass observable:OperatingSystem ; . @@ -5210,6 +5218,18 @@ observable:OperatingSystemFacet sh:datatype xsd:string ; sh:nodeKind sh:Literal ; sh:path observable:advertisingID ; + ] , + [ + sh:maxCount "0"^^xsd:integer ; + sh:message "In UCO 2.0.0, uco-observable:manufacturer will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:path observable:manufacturer ; + sh:severity sh:Warning ; + ] , + [ + sh:maxCount "0"^^xsd:integer ; + sh:message "In UCO 2.0.0, uco-observable:version will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:path observable:version ; + sh:severity sh:Warning ; ] ; sh:targetClass observable:OperatingSystemFacet ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 552c0b89..14b4711d 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -44,6 +44,7 @@ all: \ object_status_PASS_validation.ttl \ object_status_XFAIL_validation.ttl \ observable_creation_time_PASS_validation.ttl \ + operating_system_PASS_validation.ttl \ owl_axiom_PASS_validation.ttl \ owl_axiom_XFAIL_validation.ttl \ owl_properties_PASS_validation.ttl \ @@ -121,6 +122,7 @@ check: \ object_status_PASS_validation.ttl \ object_status_XFAIL_validation.ttl \ observable_creation_time_PASS_validation.ttl \ + operating_system_PASS_validation.ttl \ owl_axiom_PASS_validation.ttl \ owl_axiom_XFAIL_validation.ttl \ owl_properties_PASS_validation.ttl \ diff --git a/tests/examples/operating_system_PASS.json b/tests/examples/operating_system_PASS.json new file mode 100644 index 00000000..c97ff495 --- /dev/null +++ b/tests/examples/operating_system_PASS.json @@ -0,0 +1,48 @@ +{ + "@context": { + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "identity": "https://ontology.unifiedcyberontology.org/uco/identity/", + "kb": "http://example.org/kb/", + "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "kb:Organization-4ea8a5bf-60ea-43ba-9ba6-f852ce8f8b54", + "@type": "identity:Organization", + "core:name": "Example OS Company" + }, + { + "@id": "kb:OperatingSystem-427dd103-2553-4ccc-ad57-1df4e88b174d", + "@type": "observable:OperatingSystem", + "core:description": "The Example Operating System instance deployed on workstation B-203-22", + "core:hasFacet": [ + { + "@id": "kb:SoftwareFacet-1bde46c5-4648-493c-b9dc-56477191d5c6", + "@type": "observable:SoftwareFacet", + "observable:cpeid": "cpe:2.3:o:exampleosco:exampleos:40:*:*:*:*:*:*:*", + "observable:language": "en-us", + "observable:manufacturer": { + "@id": "kb:Organization-4ea8a5bf-60ea-43ba-9ba6-f852ce8f8b54" + }, + "observable:version": "40" + }, + { + "@id": "kb:OperatingSystemFacet-35047ef2-ffd6-45e8-8b3c-2e8e4bfe7c2b", + "@type": "observable:OperatingSystemFacet", + "rdfs:comment": "This node will trigger a warning for housing the manufacturer and version properties, meant to be moved to SoftwareFacet.", + "observable:bitness": "64", + "observable:installDate": { + "@type": "xsd:dateTime", + "@value": "2024-09-13T09:00:00-04:00" + }, + "observable:manufacturer": { + "@id": "kb:Organization-4ea8a5bf-60ea-43ba-9ba6-f852ce8f8b54" + }, + "observable:version": "40" + } + ] + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 609c1b77..a4301855 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -459,6 +459,22 @@ def test_observable_creation_time_PASS() -> None: } ) +def test_operating_system_PASS() -> None: + confirm_validation_results( + "operating_system_PASS_validation.ttl", + True, + expected_focus_node_severities={ + ( + "http://example.org/kb/OperatingSystem-427dd103-2553-4ccc-ad57-1df4e88b174d", + str(NS_SH.Warning) + ), + ( + "http://example.org/kb/OperatingSystemFacet-35047ef2-ffd6-45e8-8b3c-2e8e4bfe7c2b", + str(NS_SH.Warning) + ), + } + ) + def test_owl_axiom_PASS() -> None: confirm_validation_results( "owl_axiom_PASS_validation.ttl", From 40b285a9089e97b536126587399c8e199293dcfe Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 13 Sep 2024 11:30:42 -0400 Subject: [PATCH 41/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/632 Signed-off-by: Alex Nelson --- .../operating_system_PASS_validation.ttl | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 tests/examples/operating_system_PASS_validation.ttl diff --git a/tests/examples/operating_system_PASS_validation.ttl b/tests/examples/operating_system_PASS_validation.ttl new file mode 100644 index 00000000..7687a1b2 --- /dev/null +++ b/tests/examples/operating_system_PASS_validation.ttl @@ -0,0 +1,58 @@ +@prefix observable: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "In UCO 2.0.0, uco-observable:OperatingSystem will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:class observable:Software ; + sh:message "In UCO 2.0.0, uco-observable:OperatingSystem will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ; + sh:severity sh:Warning ; + sh:targetClass observable:OperatingSystem ; + ] ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "In UCO 2.0.0, uco-observable:manufacturer will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:resultPath observable:manufacturer ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + sh:maxCount "0"^^xsd:integer ; + sh:message "In UCO 2.0.0, uco-observable:manufacturer will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:path observable:manufacturer ; + sh:severity sh:Warning ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "In UCO 2.0.0, uco-observable:version will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:resultPath observable:version ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + sh:maxCount "0"^^xsd:integer ; + sh:message "In UCO 2.0.0, uco-observable:version will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:path observable:version ; + sh:severity sh:Warning ; + ] ; + ] + ; + . + From 3f0f71355c97f1dd85a17b4a17b5ff50f8a19a93 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 4 Oct 2024 08:34:35 -0400 Subject: [PATCH 42/61] Remove owl:onDatatype from new vocabulary definition References: * https://github.com/ucoProject/UCO/issues/549 * https://github.com/ucoProject/UCO/issues/593 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 1 - 1 file changed, 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 3ecac152..a9010464 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -322,7 +322,6 @@ core:ObjectStatusVocab rdfs:label "Object Status Vocabulary"@en-US ; owl:equivalentClass [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; owl:oneOf ( "Draft"^^core:ObjectStatusVocab "Final"^^core:ObjectStatusVocab From 54ea2226c7e540fd29f8cea0a12b3809fa0d900c Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 17 Oct 2024 16:41:33 -0400 Subject: [PATCH 43/61] Revise vocabulary pattern for core:ObjectStatusVocab A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/549 * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 28 +++++++++++++------------- tests/examples/object_status_PASS.json | 5 +---- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index a9010464..9ac562ef 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -323,9 +323,9 @@ core:ObjectStatusVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Draft"^^core:ObjectStatusVocab - "Final"^^core:ObjectStatusVocab - "Deprecated"^^core:ObjectStatusVocab + "Draft" + "Final" + "Deprecated" ) ; ] ; . @@ -443,6 +443,17 @@ core:UcoObject sh:nodeKind sh:Literal ; sh:path core:modifiedTime ; ] , + [ + sh:datatype xsd:string ; + sh:in ( + "Draft" + "Final" + "Deprecated" + ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; + sh:path core:objectStatus ; + ] , [ sh:datatype xsd:string ; sh:maxCount "1"^^xsd:integer ; @@ -464,17 +475,6 @@ core:UcoObject sh:datatype xsd:string ; sh:nodeKind sh:Literal ; sh:path core:tag ; - ] , - [ - sh:datatype core:ObjectStatusVocab ; - sh:in ( - "Draft"^^core:ObjectStatusVocab - "Final"^^core:ObjectStatusVocab - "Deprecated"^^core:ObjectStatusVocab - ) ; - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:path core:objectStatus ; ] ; sh:targetClass core:UcoObject ; diff --git a/tests/examples/object_status_PASS.json b/tests/examples/object_status_PASS.json index 2d10dc40..3f4d1165 100644 --- a/tests/examples/object_status_PASS.json +++ b/tests/examples/object_status_PASS.json @@ -7,10 +7,7 @@ { "@id": "kb:UcoObject-f86c567d-374a-4873-b9bc-a746ca2bf360", "@type": "core:UcoObject", - "core:objectStatus": { - "@type": "core:ObjectStatusVocab", - "@value": "Draft" - } + "core:objectStatus": "Draft" } ] } From 12855bf2b49d3cfd12ea4c04a2f075763dcfe406 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 17 Oct 2024 16:41:49 -0400 Subject: [PATCH 44/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/549 * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- .../object_status_XFAIL_validation.ttl | 30 ++++--------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/tests/examples/object_status_XFAIL_validation.ttl b/tests/examples/object_status_XFAIL_validation.ttl index b84dd57b..57a35e5f 100644 --- a/tests/examples/object_status_XFAIL_validation.ttl +++ b/tests/examples/object_status_XFAIL_validation.ttl @@ -21,36 +21,16 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage "Value Literal(\"Initial draft\") not in list ['Literal(\"Draft\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Final\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Deprecated\" = None, datatype=core:ObjectStatusVocab)']" ; + sh:resultMessage "Value Literal(\"Initial draft\") not in list ['Literal(\"Draft\")', 'Literal(\"Final\")', 'Literal(\"Deprecated\")']" ; sh:resultPath core:objectStatus ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:InConstraintComponent ; sh:sourceShape [ - sh:datatype core:ObjectStatusVocab ; + sh:datatype xsd:string ; sh:in ( - "Draft"^^core:ObjectStatusVocab - "Final"^^core:ObjectStatusVocab - "Deprecated"^^core:ObjectStatusVocab - ) ; - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:path core:objectStatus ; - ] ; - sh:value "Initial draft" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is not Literal with datatype core:ObjectStatusVocab" ; - sh:resultPath core:objectStatus ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - sh:datatype core:ObjectStatusVocab ; - sh:in ( - "Draft"^^core:ObjectStatusVocab - "Final"^^core:ObjectStatusVocab - "Deprecated"^^core:ObjectStatusVocab + "Draft" + "Final" + "Deprecated" ) ; sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; From 688d9437dc331f0b1b389852931febb63a11caa8 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 25 Oct 2024 16:35:43 -0400 Subject: [PATCH 45/61] Regenerate Make-managed files Signed-off-by: Alex Nelson --- tests/examples/co_XFAIL_validation.ttl | 2 +- tests/examples/configuration_setting_XFAIL_validation.ttl | 2 +- tests/examples/database_records_XFAIL_validation.ttl | 4 ++-- tests/examples/hash_XFAIL_validation.ttl | 2 +- tests/examples/object_status_XFAIL_validation.ttl | 2 +- tests/examples/rdf_list_XFAIL_validation.ttl | 6 +++--- tests/examples/thread_XFAIL_validation.ttl | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/examples/co_XFAIL_validation.ttl b/tests/examples/co_XFAIL_validation.ttl index e243322f..9888889d 100644 --- a/tests/examples/co_XFAIL_validation.ttl +++ b/tests/examples/co_XFAIL_validation.ttl @@ -78,7 +78,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:list-item-4361eb9c-a1c2-40e7-ba83-92802554392a conforms to shape [ rdf:type sh:PropertyShape ; sh:class co:Item ; sh:description Literal("This shape encodes in SHACL that the range of co:itemContent is the complement of co:Item.", lang=en) ; sh:path co:itemContent ]' ; + sh:resultMessage 'Node kb:list-item-4361eb9c-a1c2-40e7-ba83-92802554392a must not conform to shape [ rdf:type sh:PropertyShape ; sh:class co:Item ; sh:description Literal("This shape encodes in SHACL that the range of co:itemContent is the complement of co:Item.", lang=en) ; sh:path co:itemContent ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:NotConstraintComponent ; sh:sourceShape uco-co:itemContent-subjects-shape ; diff --git a/tests/examples/configuration_setting_XFAIL_validation.ttl b/tests/examples/configuration_setting_XFAIL_validation.ttl index fdd76c5b..866e84ae 100644 --- a/tests/examples/configuration_setting_XFAIL_validation.ttl +++ b/tests/examples/configuration_setting_XFAIL_validation.ttl @@ -13,7 +13,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:configuration-entry-5f0fc3ea-e763-4b6d-997a-be0d1ceffc8c does not conform to exactly one shape in [ sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path configuration:itemObject ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path configuration:itemValue ] ] , [ sh:property [ sh:minCount Literal("1", datatype=xsd:integer) ; sh:path configuration:itemObject ] ] , [ sh:property [ sh:minCount Literal("1", datatype=xsd:integer) ; sh:path configuration:itemValue ] ]' ; + sh:resultMessage 'Node kb:configuration-entry-5f0fc3ea-e763-4b6d-997a-be0d1ceffc8c must conform to exactly one shape in [ sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path configuration:itemObject ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path configuration:itemValue ] ] , [ sh:property [ sh:minCount Literal("1", datatype=xsd:integer) ; sh:path configuration:itemObject ] ] , [ sh:property [ sh:minCount Literal("1", datatype=xsd:integer) ; sh:path configuration:itemValue ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape configuration:ConfigurationEntry ; diff --git a/tests/examples/database_records_XFAIL_validation.ttl b/tests/examples/database_records_XFAIL_validation.ttl index 2e76cf72..30d9ec99 100644 --- a/tests/examples/database_records_XFAIL_validation.ttl +++ b/tests/examples/database_records_XFAIL_validation.ttl @@ -12,7 +12,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:table-field-facet-37182dba-4dbd-4b97-b49e-8038b7fbfd29 does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("false" = False, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldValue ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldIsNull ] ]' ; + sh:resultMessage 'Node kb:table-field-facet-37182dba-4dbd-4b97-b49e-8038b7fbfd29 must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("false" = False, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldValue ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldIsNull ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape observable:TableFieldFacet ; @@ -35,7 +35,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:table-field-facet-46aafb6e-0be4-4412-a938-16c4b5ae5314 does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("false" = False, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldValue ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldIsNull ] ]' ; + sh:resultMessage 'Node kb:table-field-facet-46aafb6e-0be4-4412-a938-16c4b5ae5314 must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("false" = False, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldValue ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldIsNull ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape observable:TableFieldFacet ; diff --git a/tests/examples/hash_XFAIL_validation.ttl b/tests/examples/hash_XFAIL_validation.ttl index e05552df..ea350416 100644 --- a/tests/examples/hash_XFAIL_validation.ttl +++ b/tests/examples/hash_XFAIL_validation.ttl @@ -78,7 +78,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node Literal("1", datatype=xsd:integer) does not conform to one or more shapes in [ sh:datatype vocabulary:HashNameVocab ] , [ sh:datatype xsd:string ]' ; + sh:resultMessage 'Node Literal("1", datatype=xsd:integer) must conform to one or more shapes in [ sh:datatype vocabulary:HashNameVocab ] , [ sh:datatype xsd:string ]' ; sh:resultPath types:hashMethod ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:OrConstraintComponent ; diff --git a/tests/examples/object_status_XFAIL_validation.ttl b/tests/examples/object_status_XFAIL_validation.ttl index b84dd57b..819bbf85 100644 --- a/tests/examples/object_status_XFAIL_validation.ttl +++ b/tests/examples/object_status_XFAIL_validation.ttl @@ -21,7 +21,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage "Value Literal(\"Initial draft\") not in list ['Literal(\"Draft\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Final\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Deprecated\" = None, datatype=core:ObjectStatusVocab)']" ; + sh:resultMessage "Value Literal(\"Initial draft\") not in list ['Literal(\"Draft\", datatype=core:ObjectStatusVocab)', 'Literal(\"Final\", datatype=core:ObjectStatusVocab)', 'Literal(\"Deprecated\", datatype=core:ObjectStatusVocab)']" ; sh:resultPath core:objectStatus ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:InConstraintComponent ; diff --git a/tests/examples/rdf_list_XFAIL_validation.ttl b/tests/examples/rdf_list_XFAIL_validation.ttl index 65ab509a..d8646eda 100644 --- a/tests/examples/rdf_list_XFAIL_validation.ttl +++ b/tests/examples/rdf_list_XFAIL_validation.ttl @@ -14,7 +14,7 @@ sh:detail [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:list-1 does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; + sh:resultMessage 'Node kb:list-1 must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape uco-owl:Sequence-shape ; @@ -40,7 +40,7 @@ sh:detail [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node ex:someDatatypeProperty does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; + sh:resultMessage 'Node ex:someDatatypeProperty must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape uco-owl:Sequence-shape ; @@ -66,7 +66,7 @@ ) ; - sh:resultMessage 'Node ( kb:concept-7 kb:concept-8 ) does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; + sh:resultMessage 'Node ( kb:concept-7 kb:concept-8 ) must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape uco-owl:Sequence-shape ; diff --git a/tests/examples/thread_XFAIL_validation.ttl b/tests/examples/thread_XFAIL_validation.ttl index 8991af7f..7e86377f 100644 --- a/tests/examples/thread_XFAIL_validation.ttl +++ b/tests/examples/thread_XFAIL_validation.ttl @@ -48,7 +48,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:thread-item-2bd09467-d413-4a03-af5d-f0e428f7d987 conforms to shape [ rdf:type sh:PropertyShape ; sh:class co:Item ; sh:description Literal("This shape encodes in SHACL that the range of co:itemContent is the complement of co:Item.", lang=en) ; sh:path co:itemContent ]' ; + sh:resultMessage 'Node kb:thread-item-2bd09467-d413-4a03-af5d-f0e428f7d987 must not conform to shape [ rdf:type sh:PropertyShape ; sh:class co:Item ; sh:description Literal("This shape encodes in SHACL that the range of co:itemContent is the complement of co:Item.", lang=en) ; sh:path co:itemContent ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:NotConstraintComponent ; sh:sourceShape uco-co:itemContent-subjects-shape ; From 7d0278345cebcdfd22d499314c26ef58c605d303 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 25 Oct 2024 16:43:43 -0400 Subject: [PATCH 46/61] Bump GitHub Action versions Signed-off-by: Alex Nelson --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f50c298f..290e2cbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,13 +26,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '11' - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Start from clean state From 904db371b775eaf78d40ea16d95ac97d083fb293 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 28 Oct 2024 09:33:04 -0400 Subject: [PATCH 47/61] Add core:informalType and link as parent of type-describing properties References: * https://github.com/ucoProject/UCO/issues/640 Signed-off-by: Alex Nelson --- ontology/uco/configuration/configuration.ttl | 2 ++ ontology/uco/core/core.ttl | 7 ++++ ontology/uco/location/location.ttl | 1 + ontology/uco/marking/marking.ttl | 1 + ontology/uco/observable/observable.ttl | 34 ++++++++++++++++++++ ontology/uco/tool/tool.ttl | 1 + 6 files changed, 46 insertions(+) diff --git a/ontology/uco/configuration/configuration.ttl b/ontology/uco/configuration/configuration.ttl index 91d24a74..ed856de6 100644 --- a/ontology/uco/configuration/configuration.ttl +++ b/ontology/uco/configuration/configuration.ttl @@ -163,6 +163,7 @@ configuration:dependencyDescription configuration:dependencyType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "dependencyType"@en ; rdfs:comment "The type of a tool or other software dependency."@en ; rdfs:range xsd:string ; @@ -201,6 +202,7 @@ configuration:itemObject configuration:itemType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "itemType"@en ; rdfs:comment "The type of a configuration setting entry item."@en ; rdfs:range xsd:string ; diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index a9010464..7c3438ad 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -613,6 +613,7 @@ core:eventContext core:eventType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "Event Type"@en ; rdfs:comment "An event type specifies a classification type for the event."@en ; rdfs:range xsd:string ; @@ -665,6 +666,12 @@ core:hasFacet-shape sh:targetObjectsOf core:hasFacet ; . +core:informalType + a owl:DatatypeProperty ; + rdfs:label "informalType"@en ; + rdfs:comment "Informal Type serves as a parent property for string-valued properties meant to describe a type without implementing a class design. This property hierarchy supports a balancing point between semantic specificity and operational agility. The known benefits of describing types rather than implementing them include swift extensibility of some existing, or possibly non-existing, subclass hierarchy in UCO without requiring training in ontological development, taxonomic specification, or OWL, SHACL, or RDF maintenance logistics. The known detractions of using string-literals for type descriptions include that used vocabularies may require careful maintenance among data-sharing parties; that vocabularies require independent logistics (external to UCO) for providing definitions (i.e., dictionary-style semantics) to string-literals chosen; and that string-literals cannot by themselves encode hierarchical structure or entailments, such as the informal device type string 'ExamplePhone 8 P4321' entailing 'ExamplePhone 8', 'ExamplePhone', or 'ExamplePhone models discontinued in 2020'. Usage of Informal Type to house strings should be weighed against usage of classes when classes are available, and should periodically be reviewed for potential additions to UCO's class hierarchy or downstream extensions thereof."@en ; + . + core:isDirectional a owl:DatatypeProperty ; rdfs:label "isDirectional"@en ; diff --git a/ontology/uco/location/location.ttl b/ontology/uco/location/location.ttl index a7ce761b..5ea94b37 100644 --- a/ontology/uco/location/location.ttl +++ b/ontology/uco/location/location.ttl @@ -147,6 +147,7 @@ location:SimpleAddressFacet location:addressType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "addressType"@en ; rdfs:comment "The type of the address, for instance home or work."@en ; rdfs:range xsd:string ; diff --git a/ontology/uco/marking/marking.ttl b/ontology/uco/marking/marking.ttl index b4b880fd..58f28559 100644 --- a/ontology/uco/marking/marking.ttl +++ b/ontology/uco/marking/marking.ttl @@ -204,6 +204,7 @@ marking:definition marking:definitionType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "definitionType"@en ; rdfs:comment "Specifies the Marking Model for a Marking Definition."@en ; rdfs:range xsd:string ; diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 6dc75195..873de029 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -4036,6 +4036,7 @@ observable:MSISDN observable:MSISDNType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "MSISDNType"@en ; rdfs:comment "???."@en ; rdfs:range xsd:string ; @@ -9443,6 +9444,7 @@ observable:accountLogin observable:accountLogonType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "accountLogonType"@en ; rdfs:comment "Specifies the security logon method required to run the tasks associated with the account. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383013(v=vs.85).aspx."@en ; rdfs:range xsd:string ; @@ -9457,6 +9459,7 @@ observable:accountRunLevel observable:accountType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "accountType"@en ; rdfs:comment "The type of account, for instance bank, phone, application, service, etc."@en ; rdfs:range [ @@ -9484,6 +9487,7 @@ observable:actionList observable:actionType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "actionType"@en ; rdfs:comment "Specifies the type of the action. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa380596(v=vs.85).aspx."@en ; rdfs:range [ @@ -9592,6 +9596,7 @@ observable:applicationIdentifier observable:archiveType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "archiveType"@en ; rdfs:comment "The type of a file archive, e.g. ZIP, GZIP or RAR."@en ; rdfs:range xsd:string ; @@ -9625,6 +9630,7 @@ observable:attendant observable:audioType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "audioType"@en ; rdfs:comment "The type of a audio. For example: music or speech."@en ; rdfs:range xsd:string ; @@ -9739,6 +9745,7 @@ observable:bitsPerPixel observable:blockType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "blockType"@en ; rdfs:comment "The blockType property specifies the block type of a particular memory object."@en ; rdfs:range [ @@ -9818,6 +9825,7 @@ observable:byteStringValue observable:callType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "callType"@en ; rdfs:comment "The type of a phone call,for example incoming, outgoing, missed."@en ; rdfs:range xsd:string ; @@ -9893,6 +9901,7 @@ observable:cellSiteNetworkCode observable:cellSiteType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "cellSiteType"@en ; rdfs:comment "Specifies the technology used by the Cell Site (e.g., GSM, CDMA, or LTE)."@en ; rdfs:range xsd:string ; @@ -10182,6 +10191,7 @@ observable:contentRecoveredStatus observable:contentType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "contentType"@en ; rdfs:range xsd:string ; . @@ -10335,6 +10345,7 @@ observable:dataPayloadReferenceURL observable:dataType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "dataType"@en ; rdfs:range xsd:string ; . @@ -10374,6 +10385,7 @@ observable:destinationPort observable:deviceType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "deviceType"@en ; rdfs:range xsd:string ; . @@ -10401,6 +10413,7 @@ observable:dhcpServer observable:diskPartitionType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "diskPartitionType"@en ; rdfs:comment "Specifies the type of partition being characterized."@en ; rdfs:range xsd:string ; @@ -10415,6 +10428,7 @@ observable:diskSize observable:diskType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "diskType"@en ; rdfs:comment "The type of disk being characterized, e.g., removable."@en ; rdfs:range xsd:string ; @@ -10477,6 +10491,7 @@ observable:driveLetter observable:driveType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "driveType"@en ; rdfs:comment "Specifies the drive type of a windows volume."@en ; rdfs:range [ @@ -10670,6 +10685,7 @@ observable:eventStatus observable:eventType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "eventType"@en ; rdfs:comment "The type of the event, for example 'information', 'warning' or 'error'."@en ; rdfs:range xsd:string ; @@ -10753,6 +10769,7 @@ observable:extDeletionTime observable:extFileType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "extFileType"@en ; rdfs:comment "Specifies the EXT file type (FIFO, Directory, Regular file, Symbolic link, etc) for the Inode."@en ; rdfs:range xsd:integer ; @@ -10857,6 +10874,7 @@ observable:filePath observable:fileSystemType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "fileSystemType"@en ; rdfs:comment "The specific type of a file system."@en ; rdfs:range xsd:string ; @@ -11052,6 +11070,7 @@ observable:hexadecimalValue observable:hiveType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "hiveType"@en ; rdfs:comment "The type of a registry hive."@en ; rdfs:range xsd:string ; @@ -11142,6 +11161,7 @@ observable:icmpCode observable:icmpType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "icmpType"@en ; rdfs:comment "Specifies the ICMP type byte."@en ; rdfs:range xsd:hexBinary ; @@ -11169,6 +11189,7 @@ observable:imageName observable:imageType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "imageType"@en ; rdfs:comment "The type of the image, e.g. EnCase, RAW or LocalFolder."@en ; rdfs:range xsd:string ; @@ -11520,6 +11541,7 @@ observable:length observable:libraryType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "libraryType"@en ; rdfs:comment "Specifies the type of library being characterized."@en ; rdfs:range xsd:string ; @@ -11671,6 +11693,7 @@ observable:messageThread observable:messageType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "messageType"@en ; rdfs:comment "Message type specifies what sort of message (email, chat, SMS, etc) a Message is."@en ; rdfs:range xsd:string ; @@ -11781,6 +11804,7 @@ observable:mimeClass observable:mimeType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "mimeType"@en ; rdfs:comment "MIME type of the data. For example 'text/html' or 'audio/mp3'."@en ; rdfs:range xsd:string ; @@ -12204,6 +12228,7 @@ observable:passwordLastChanged observable:passwordType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "passwordType"@en ; rdfs:comment "The type of password, for instance plain-text or encrypted."@en ; rdfs:range xsd:string ; @@ -12244,6 +12269,7 @@ observable:pdfModDate observable:peType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "peType"@en ; rdfs:comment "Specifies the type of the PE binary."@en ; rdfs:range xsd:string ; @@ -12271,6 +12297,7 @@ observable:pictureHeight observable:pictureType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "pictureType"@en ; rdfs:comment "The type of a picture, for example a thumbnail."@en ; rdfs:range xsd:string ; @@ -12498,6 +12525,7 @@ observable:rangeOffset observable:rangeOffsetType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "rangeOffsetType"@en ; rdfs:comment "The type of offset defined for the range (e.g., image, file, address)."@en ; rdfs:range xsd:string ; @@ -12854,6 +12882,7 @@ observable:serviceStatus observable:serviceType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "serviceType"@en ; rdfs:range xsd:string ; . @@ -13128,6 +13157,7 @@ observable:startTime observable:startType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "startType"@en ; rdfs:range xsd:string ; . @@ -13428,6 +13458,7 @@ observable:triggerMaxRunTime observable:triggerSessionChangeType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "triggerSessionChangeType"@en ; rdfs:comment "Specifies the type of Terminal Server session change that would trigger a task launch. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa381298(v=vs.85).aspx."@en ; rdfs:range xsd:string ; @@ -13435,6 +13466,7 @@ observable:triggerSessionChangeType observable:triggerType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "triggerType"@en ; rdfs:comment "Specifies the type of the task trigger."@en ; rdfs:range [ @@ -13504,6 +13536,7 @@ observable:urlTargeted observable:urlTransitionType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "Transition Type"@en ; rdfs:comment "Specifies how a browser navigated to a particular URL on a particular visit."@en ; rdfs:range [ @@ -13603,6 +13636,7 @@ observable:volumeID observable:whoisContactType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "whoisContactType"@en ; rdfs:comment "Specifies what type of WHOIS contact this is."@en ; rdfs:range [ diff --git a/ontology/uco/tool/tool.ttl b/ontology/uco/tool/tool.ttl index c690fdc8..c5da6bd4 100644 --- a/ontology/uco/tool/tool.ttl +++ b/ontology/uco/tool/tool.ttl @@ -453,6 +453,7 @@ tool:swid tool:toolType a owl:DatatypeProperty ; + rdfs:subPropertyOf core:informalType ; rdfs:label "toolType"@en ; rdfs:comment "The type of tool."@en ; rdfs:range xsd:string ; From da7df82c6515cb7edd37046761afb784b6e88e8b Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 29 Oct 2024 13:47:19 -0400 Subject: [PATCH 48/61] Update NIST licensing text No effects were observed on Make-managed files. Signed-off-by: Alex Nelson --- .github/workflows/ci.yml | 15 +++++++++------ Makefile | 15 +++++++++------ lib/Makefile | 15 +++++++++------ ontology/Makefile | 15 +++++++++------ ontology/co/Makefile | 15 +++++++++------ ontology/owl/Makefile | 15 +++++++++------ ontology/uco/Makefile | 15 +++++++++------ src/create-catalog-v001.xml.py | 16 ++++++++-------- src/populate_node_kind.py | 15 +++++++++------ src/review.mk | 15 +++++++++------ tests/Makefile | 15 +++++++++------ tests/dependencies/Makefile | 15 +++++++++------ tests/examples/Makefile | 15 +++++++++------ tests/examples/test_validation.py | 15 +++++++++------ tests/shapes/Makefile | 15 +++++++++------ tests/shapes/examples_uco_owl/Makefile | 15 +++++++++------ tests/shapes/examples_uco_qc/Makefile | 15 +++++++++------ tests/shapes/test_qc_shapes.py | 15 +++++++++------ tests/test_uco_monolithic.py | 15 +++++++++------ 19 files changed, 170 insertions(+), 116 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 290e2cbe..4c03a900 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,14 @@ +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/Makefile b/Makefile index de556a38..76cca627 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/lib/Makefile b/lib/Makefile index 70a60eeb..f5184778 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/ontology/Makefile b/ontology/Makefile index c7b8c30c..85afe27f 100644 --- a/ontology/Makefile +++ b/ontology/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/ontology/co/Makefile b/ontology/co/Makefile index f4ba8dea..930d4c20 100644 --- a/ontology/co/Makefile +++ b/ontology/co/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/ontology/owl/Makefile b/ontology/owl/Makefile index 5955ce9a..ae090552 100644 --- a/ontology/owl/Makefile +++ b/ontology/owl/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/ontology/uco/Makefile b/ontology/uco/Makefile index 64c63e2b..9c9e6c77 100644 --- a/ontology/uco/Makefile +++ b/ontology/uco/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/src/create-catalog-v001.xml.py b/src/create-catalog-v001.xml.py index a3b0be5b..9af141a7 100644 --- a/src/create-catalog-v001.xml.py +++ b/src/create-catalog-v001.xml.py @@ -1,16 +1,16 @@ #!/usr/bin/env python3 -# Portions of this file contributed by NIST are governed by the following -# statement: +# Portions of this file contributed by NIST are governed by the +# following statement: # # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/src/populate_node_kind.py b/src/populate_node_kind.py index a31ba279..69e28e35 100644 --- a/src/populate_node_kind.py +++ b/src/populate_node_kind.py @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/src/review.mk b/src/review.mk index 999c7c26..ecb60a54 100644 --- a/src/review.mk +++ b/src/review.mk @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/Makefile b/tests/Makefile index e9c9b51f..09edfca0 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/dependencies/Makefile b/tests/dependencies/Makefile index 7028d375..c062ef15 100644 --- a/tests/dependencies/Makefile +++ b/tests/dependencies/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 552c0b89..1d174372 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 609c1b77..d88b2a5d 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -1,13 +1,16 @@ #!/usr/bin/env python3 +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/shapes/Makefile b/tests/shapes/Makefile index 3fbe92de..82391f92 100644 --- a/tests/shapes/Makefile +++ b/tests/shapes/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/shapes/examples_uco_owl/Makefile b/tests/shapes/examples_uco_owl/Makefile index 4f1a014e..e9a81117 100644 --- a/tests/shapes/examples_uco_owl/Makefile +++ b/tests/shapes/examples_uco_owl/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/shapes/examples_uco_qc/Makefile b/tests/shapes/examples_uco_qc/Makefile index 6e61d1c2..da3a15f2 100644 --- a/tests/shapes/examples_uco_qc/Makefile +++ b/tests/shapes/examples_uco_qc/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/shapes/test_qc_shapes.py b/tests/shapes/test_qc_shapes.py index 1d795e16..ab7cc461 100644 --- a/tests/shapes/test_qc_shapes.py +++ b/tests/shapes/test_qc_shapes.py @@ -1,13 +1,16 @@ #!/usr/bin/env python3 +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/test_uco_monolithic.py b/tests/test_uco_monolithic.py index 45d28d3b..3c465fa8 100644 --- a/tests/test_uco_monolithic.py +++ b/tests/test_uco_monolithic.py @@ -1,13 +1,16 @@ #!/usr/bin/env python3 +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. From 50ce7eedbd07831ff5bb9993e3e5474bcb285c70 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 22 Nov 2024 09:22:31 -0500 Subject: [PATCH 49/61] Revert "Warn of coming constraints on observable:cpeid" This reverts commit 03779926984b43278217a33c18c95400a6a2446c. The effects of Issue 626 are not ready for Issue 624. This patch's effects will move into 626's development. References: * https://github.com/ucoProject/UCO/issues/626 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 27 --------- tests/examples/Makefile | 2 - tests/examples/cpe_PASS.json | 84 -------------------------- tests/examples/test_validation.py | 11 ---- 4 files changed, 124 deletions(-) delete mode 100644 tests/examples/cpe_PASS.json diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 0c9feee3..c8963d59 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -2265,12 +2265,6 @@ observable:DeviceFacet sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; sh:path observable:serialNumber ; - ] , - [ - sh:message "In UCO 2.0.0, cpeid in DeviceFacet will be constrained to be a CPE version 2.3 hardware name."@en ; - sh:path observable:cpeid ; - sh:pattern "^cpe:2.3:h:.+" ; - sh:severity sh:Warning ; ] ; sh:targetClass observable:DeviceFacet ; @@ -5162,15 +5156,6 @@ observable:OperatingSystem rdfs:subClassOf observable:ObservableObject ; rdfs:label "OperatingSystem"@en ; rdfs:comment "An operating system is the software that manages computer hardware, software resources, and provides common services for computer programs. [based on https://en.wikipedia.org/wiki/Operating_system]"@en ; - sh:property [ - sh:message "In UCO 2.0.0, cpeid in any Facet attached to an OperatingSystem will be constrained to be a CPE version 2.3 operating system name."@en ; - sh:path ( - core:hasFacet - observable:cpeid - ) ; - sh:pattern "^cpe:2.3:o:.+" ; - sh:severity sh:Warning ; - ] ; sh:targetClass observable:OperatingSystem ; . @@ -5223,12 +5208,6 @@ observable:OperatingSystemFacet sh:datatype xsd:string ; sh:nodeKind sh:Literal ; sh:path observable:advertisingID ; - ] , - [ - sh:maxCount "0"^^xsd:integer ; - sh:message "observable:cpeid should appear on a SoftwareFacet instead of an OperatingSystemFacet."@en ; - sh:path observable:cpeid ; - sh:severity sh:Warning ; ] ; sh:targetClass observable:OperatingSystemFacet ; @@ -6234,12 +6213,6 @@ observable:SoftwareFacet sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; sh:path observable:version ; - ] , - [ - sh:message "In UCO 2.0.0, cpeid in SoftwareFacet will be constrained to be a CPE version 2.3 application or operating system name."@en ; - sh:path observable:cpeid ; - sh:pattern "^cpe:2.3:[a,o]:.+" ; - sh:severity sh:Warning ; ] ; sh:targetClass observable:SoftwareFacet ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 2ccd0c04..66b33e05 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -26,7 +26,6 @@ all: \ co_XFAIL_validation.ttl \ configuration_setting_PASS_validation.ttl \ configuration_setting_XFAIL_validation.ttl \ - cpe_PASS_validation.ttl \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ dictionary_PASS_validation.ttl \ @@ -102,7 +101,6 @@ check: \ co_XFAIL_validation.ttl \ configuration_setting_PASS_validation.ttl \ configuration_setting_XFAIL_validation.ttl \ - cpe_PASS_validation.ttl \ database_records_PASS_validation.ttl \ database_records_XFAIL_validation.ttl \ dictionary_PASS_validation.ttl \ diff --git a/tests/examples/cpe_PASS.json b/tests/examples/cpe_PASS.json deleted file mode 100644 index 56555ab5..00000000 --- a/tests/examples/cpe_PASS.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "@context": { - "core": "https://ontology.unifiedcyberontology.org/uco/core/", - "ex": "http://example.org/ontology/", - "kb": "http://example.org/kb/", - "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", - "rdfs": "http://www.w3.org/2000/01/rdf-schema#" - }, - "@graph": [ - { - "@id": "kb:Device-3b8fde6f-0f0b-4472-b9c8-31380eb80dc3", - "@type": "observable:Tablet", - "core:hasFacet": { - "@id": "kb:DeviceFacet-4a1cdff8-be81-46e3-8502-0f488d353ca0", - "@type": "observable:DeviceFacet", - "rdfs:comment": "This node will trigger a warning for assigning an operating system CPE to a device. This will be an error in UCO 2.0.0.", - "observable:cpeid": "cpe:2.3:o:exampleco:exampletabletos:-:*:*:*:*:*:*:*" - } - }, - { - "@id": "ex:hadInventoryNumber", - "@type": "owl:DatatypeProperty", - "rdfs:domain": "observable:Tablet", - "rdfs:range": "xsd:string" - }, - { - "@id": "kb:Device-b1432774-082d-4eda-ad2e-fcdbe159d37c", - "@type": "observable:Tablet", - "core:hasFacet": { - "@id": "kb:DeviceFacet-57721427-8a91-4b2a-a685-8de72cabdebc", - "@type": "observable:DeviceFacet", - "observable:cpeid": "cpe:2.3:h:exampleco:exampletablet:-:*:*:*:*:*:*:*", - "observable:serialNumber": "XYZ56780000000002" - }, - "ex:hadInventoryNumber": "TAB-1234" - }, - { - "@id": "kb:OperatingSystem-628d531f-254c-4efb-aaa0-0874306afa01", - "@type": "observable:OperatingSystem", - "core:name": "ExampleTabletOS", - "core:hasFacet": { - "@id": "kb:SoftwareFacet-ff426a44-65eb-4940-b61a-d70357273a8c", - "@type": "observable:SoftwareFacet", - "rdfs:comment": "This node will trigger a warning for assigning an Application CPE for an OperatingSystem. This will be an error in UCO 2.0.0.", - "observable:cpeid": "cpe:2.3:a:exampleco:exampletabletos:2024.06:*:*:*:*:*:*:*", - "observable:version": "2024.06" - } - }, - { - "@id": "kb:OperatingSystem-7f06e899-2dbb-4847-9956-5c4a68723c49", - "@type": "observable:OperatingSystem", - "core:name": "ExampleTabletOS", - "core:hasFacet": { - "@id": "kb:OperatingSystemFacet-872c1ba2-e1b4-4bc6-8267-6dbed687d0be", - "@type": "observable:OperatingSystemFacet", - "rdfs:comment": "This node will trigger a warning for assigning a CPE with an OperatingSystemFacet. This will be an error in UCO 2.0.0.", - "observable:cpeid": "cpe:2.3:o:exampleco:exampletabletos:2024.07:*:*:*:*:*:*:*", - "observable:version": "2024.07" - } - }, - { - "@id": "kb:OperatingSystem-cbbaf178-ccc0-495e-a068-65085d499d7f", - "@type": "observable:OperatingSystem", - "core:name": "ExampleTabletOS", - "core:hasFacet": { - "@id": "kb:SoftwareFacet-b2b8ed66-f681-4eda-b013-b8861843420c", - "@type": "observable:SoftwareFacet", - "observable:cpeid": "cpe:2.3:o:exampleco:exampletabletos:2024.08:*:*:*:*:*:*:*", - "observable:version": "2024.08" - } - }, - { - "@id": "kb:Software-687a7648-6902-4233-a37d-f31bb2245a15", - "@type": "observable:Software", - "core:name": "ExampleCalculator", - "core:hasFacet": { - "@id": "kb:SoftwareFacet-cd6d68ae-9248-4657-86d4-a4fe398f1004", - "@type": "observable:SoftwareFacet", - "observable:cpeid": "cpe:2.3:a:exampleco:examplecalculator:5.5:*:*:*:*:*:*:*", - "observable:version": "5.5" - } - } - ] -} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 95d80d8d..6c4fc658 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -200,17 +200,6 @@ def test_configuration_setting_XFAIL_validation() -> None: } ) -def test_cpe_PASS_validation() -> None: - confirm_validation_results( - "cpe_PASS_validation.ttl", - True, - expected_focus_node_severities={ - ("http://example.org/kb/DeviceFacet-4a1cdff8-be81-46e3-8502-0f488d353ca0", str(NS_SH.Warning)), - ("http://example.org/kb/OperatingSystem-628d531f-254c-4efb-aaa0-0874306afa01", str(NS_SH.Warning)), - ("http://example.org/kb/OperatingSystemFacet-872c1ba2-e1b4-4bc6-8267-6dbed687d0be", str(NS_SH.Warning)), - } - ) - def test_database_records_PASS() -> None: confirm_validation_results( "database_records_PASS_validation.ttl", From dc6b8627db2601425939208f0542de014b888adb Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 18 Feb 2025 16:19:01 -0500 Subject: [PATCH 50/61] Revert addition of types:hashMethod-objects-in-shape This partially undoes commit `aea0c04`, because of the introduction of `sh:targetObjectsOf` usage that would have a broad impact. This will return for review later. A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- ontology/uco/types/types.ttl | 41 ++++++++++++++----------------- tests/examples/test_validation.py | 8 +++--- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index 2b366e0e..3eb7f9ce 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -135,7 +135,6 @@ types:Hash rdfs:subClassOf core:UcoInherentCharacterizationThing ; rdfs:label "Hash"@en ; rdfs:comment "A hash is a grouping of characteristics unique to the result of applying a mathematical algorithm that maps data of arbitrary size to a bit string (the 'hash') and is a one-way function, that is, a function which is practically infeasible to invert. This is commonly used for integrity checking of data. [based on https://en.wikipedia.org/wiki/Cryptographic_hash_function]"@en ; - rdfs:seeAlso types:hashMethod-objects-in-shape ; sh:property [ sh:datatype xsd:hexBinary ; @@ -150,6 +149,25 @@ types:Hash sh:path types:hashMethod ; sh:severity sh:Warning ; ] , + [ + sh:in ( + "MD5" + "MD6" + "SHA1" + "SHA224" + "SHA256" + "SHA3-224" + "SHA3-256" + "SHA3-384" + "SHA3-512" + "SHA384" + "SHA512" + "SSDEEP" + ) ; + sh:message "Value is not member of the vocabulary HashNameVocab." ; + sh:path types:hashMethod ; + sh:severity sh:Info ; + ] , [ sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; @@ -306,27 +324,6 @@ types:hashMethod ] ; . -types:hashMethod-objects-in-shape - a sh:NodeShape ; - sh:in ( - "MD5" - "MD6" - "SHA1" - "SHA224" - "SHA256" - "SHA3-224" - "SHA3-256" - "SHA3-384" - "SHA3-512" - "SHA384" - "SHA512" - "SSDEEP" - ) ; - sh:message "Value is not member of the vocabulary HashNameVocab." ; - sh:severity sh:Info ; - sh:targetObjectsOf types:hashMethod ; - . - types:hashValue a owl:DatatypeProperty ; rdfs:label "hashValue"@en ; diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index ba7a3693..6d93ed8a 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -290,11 +290,11 @@ def test_hash_PASS() -> None: "hash_PASS_validation.ttl", True, expected_focus_node_severities={ - ("1", str(NS_SH.Info)), - ("CUSTOM_hash", str(NS_SH.Info)), - ("SHA-1", str(NS_SH.Info)), - ("SHA1", str(NS_SH.Info)), + ('http://example.org/kb/hash-04dcd1dc-6920-4977-a898-e242870249a4', str(NS_SH.Info)), + ('http://example.org/kb/hash-af4b0c85-b042-4e2d-a213-210b3d7f115c', str(NS_SH.Info)), + ('http://example.org/kb/hash-b7eca8de-142d-4aa9-b546-0796a268afa4', str(NS_SH.Info)), ("http://example.org/kb/hash-b7eca8de-142d-4aa9-b546-0796a268afa4", str(NS_SH.Warning)), + ('http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771', str(NS_SH.Info)), ("http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771", str(NS_SH.Warning)), } ) From 70371235ed057178fc8a86c997da7416fd28112c Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 18 Feb 2025 16:30:53 -0500 Subject: [PATCH 51/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- tests/examples/hash_PASS_validation.ttl | 120 +++++++++++++++++++----- 1 file changed, 98 insertions(+), 22 deletions(-) diff --git a/tests/examples/hash_PASS_validation.ttl b/tests/examples/hash_PASS_validation.ttl index 56044fea..193a7ada 100644 --- a/tests/examples/hash_PASS_validation.ttl +++ b/tests/examples/hash_PASS_validation.ttl @@ -12,40 +12,60 @@ sh:result [ a sh:ValidationResult ; - sh:focusNode "1"^^xsd:integer ; - sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; - sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:InConstraintComponent ; - sh:sourceShape types:hashMethod-objects-in-shape ; - sh:value "1"^^xsd:integer ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode "CUSTOM_hash" ; + sh:focusNode ; sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; + sh:resultPath types:hashMethod ; sh:resultSeverity sh:Info ; sh:sourceConstraintComponent sh:InConstraintComponent ; - sh:sourceShape types:hashMethod-objects-in-shape ; + sh:sourceShape [ + sh:in ( + "MD5" + "MD6" + "SHA1" + "SHA224" + "SHA256" + "SHA3-224" + "SHA3-256" + "SHA3-384" + "SHA3-512" + "SHA384" + "SHA512" + "SSDEEP" + ) ; + sh:message "Value is not member of the vocabulary HashNameVocab." ; + sh:path types:hashMethod ; + sh:severity sh:Info ; + ] ; sh:value "CUSTOM_hash" ; ] , [ a sh:ValidationResult ; - sh:focusNode "SHA-1" ; + sh:focusNode ; sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; + sh:resultPath types:hashMethod ; sh:resultSeverity sh:Info ; sh:sourceConstraintComponent sh:InConstraintComponent ; - sh:sourceShape types:hashMethod-objects-in-shape ; + sh:sourceShape [ + sh:in ( + "MD5" + "MD6" + "SHA1" + "SHA224" + "SHA256" + "SHA3-224" + "SHA3-256" + "SHA3-384" + "SHA3-512" + "SHA384" + "SHA512" + "SSDEEP" + ) ; + sh:message "Value is not member of the vocabulary HashNameVocab." ; + sh:path types:hashMethod ; + sh:severity sh:Info ; + ] ; sh:value "SHA-1" ; ] , - [ - a sh:ValidationResult ; - sh:focusNode "SHA1"^^vocabulary:HashNameVocab ; - sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; - sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:InConstraintComponent ; - sh:sourceShape types:hashMethod-objects-in-shape ; - sh:value "SHA1"^^vocabulary:HashNameVocab ; - ] , [ a sh:ValidationResult ; sh:focusNode ; @@ -61,6 +81,34 @@ ] ; sh:value "SHA1"^^vocabulary:HashNameVocab ; ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; + sh:resultPath types:hashMethod ; + sh:resultSeverity sh:Info ; + sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceShape [ + sh:in ( + "MD5" + "MD6" + "SHA1" + "SHA224" + "SHA256" + "SHA3-224" + "SHA3-256" + "SHA3-384" + "SHA3-512" + "SHA384" + "SHA512" + "SSDEEP" + ) ; + sh:message "Value is not member of the vocabulary HashNameVocab." ; + sh:path types:hashMethod ; + sh:severity sh:Info ; + ] ; + sh:value "SHA1"^^vocabulary:HashNameVocab ; + ] , [ a sh:ValidationResult ; sh:focusNode ; @@ -75,6 +123,34 @@ sh:severity sh:Warning ; ] ; sh:value "1"^^xsd:integer ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ; + sh:resultPath types:hashMethod ; + sh:resultSeverity sh:Info ; + sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceShape [ + sh:in ( + "MD5" + "MD6" + "SHA1" + "SHA224" + "SHA256" + "SHA3-224" + "SHA3-256" + "SHA3-384" + "SHA3-512" + "SHA384" + "SHA512" + "SSDEEP" + ) ; + sh:message "Value is not member of the vocabulary HashNameVocab." ; + sh:path types:hashMethod ; + sh:severity sh:Info ; + ] ; + sh:value "1"^^xsd:integer ; ] ; . From d7ea496abb0859d2d715622479e153de481f79d6 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 18 Feb 2025 16:35:03 -0500 Subject: [PATCH 52/61] Revise test to use new vocabulary pattern References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- tests/test_uco_monolithic.py | 97 ++++++++++++++++++++++++------------ 1 file changed, 65 insertions(+), 32 deletions(-) diff --git a/tests/test_uco_monolithic.py b/tests/test_uco_monolithic.py index 3c465fa8..583b42e8 100644 --- a/tests/test_uco_monolithic.py +++ b/tests/test_uco_monolithic.py @@ -171,69 +171,102 @@ def rdf_list_to_member_list(graph: Graph, n_list: IdentifiedNode) -> List[Node]: def test_semi_open_vocabulary_owl_shacl_alignment(graph: Graph) -> None: """ - This test enforces that when a DatatypeProperty following the "Semi-open vocabulary" design of UCO 0.8.0 is used, that its SHACL shape's enumerant list matches the rdfs:Datatype's enumerant list. + This test enforces that when a DatatypeProperty following the "Semi-open vocabulary" design of UCO 1.4.0 is used, that its SHACL shape's enumerant list matches the rdfs:Datatype's (OWL Sequence's) enumerant list. """ - # A member of these sets is a class's IRI, its semi-open vocabulary's IRI, the list in the SHACL shape, and the list in the Datatype. - # (The type of the lists is a Tuple because a Set in Python cannot contain a List.) + # A member of these sets is: + # * a class's IRI, + # * a property's IRI, and + # * the semi-open vocabulary's IRI. # The expected set intentionally has length 0. - expected: Set[Tuple[URIRef, URIRef, Tuple[Node, ...], Tuple[Node, ...]]] = set() - computed: Set[Tuple[URIRef, URIRef, Tuple[Node, ...], Tuple[Node, ...]]] = set() + expected: Set[Tuple[URIRef, URIRef, URIRef]] = set() + computed: Set[Tuple[URIRef, URIRef, URIRef]] = set() + + # First, assemble all pairs of properties and vocabulary-value + # tuples. This is needed because some properties are overloaded + # (e.g., observable:status) to use multiple vocabularies. + # (The type of the list is a Tuple because a Set in Python cannot + # contain a List.) + property_value_tuples: Set[Tuple[URIRef, tuple[str, ...]]] = set() + query = """\ +SELECT ?nProperty ?nOwlSequence +WHERE { + ?nProperty + rdfs:range / owl:unionOf / rdf:rest* / rdf:first ?nDatatype ; + . + ?nDatatype + a rdfs:Datatype ; + owl:equivalentClass ?nLexicalSpace ; + . + ?nLexicalSpace + owl:oneOf ?nOwlSequence ; + . +} +""" + result_tally = 0 + for result in graph.query(query): + result_tally += 1 + assert isinstance(result[0], URIRef) + assert isinstance(result[1], BNode) + n_property = result[0] + n_owl_sequence = result[1] + value_list = rdf_list_to_member_list(graph, n_owl_sequence) + property_value_tuples.add((n_property, tuple(value_list))) + assert result_tally > 0, "Pattern for semi-open vocabularies is no longer aligned with test." query = """ -SELECT ?nClass ?nDatatype ?nShaclList ?nRdfsList +SELECT ?nClass ?nProperty ?nDatatype ?nShaclList WHERE { ?nClass - sh:property / sh:or / rdf:rest* / rdf:first ?nMemberCheckShape ; + sh:property ?nMemberCheckShape ; . ?nMemberCheckShape - sh:datatype ?nDatatype ; sh:in ?nShaclList ; + sh:path ?nProperty ; + . + ?nProperty + rdfs:range / owl:unionOf / rdf:rest* / rdf:first ?nDatatype ; . ?nDatatype a rdfs:Datatype ; owl:equivalentClass ?nLexicalSpace ; . - - ?nLexicalSpace - owl:oneOf ?nRdfsList ; - . } """ result_tally = 0 - test_cases: Set[Tuple[URIRef, URIRef, IdentifiedNode, IdentifiedNode]] = set() + test_cases: Set[Tuple[URIRef, URIRef, URIRef, IdentifiedNode]] = set() for (result_no, result) in enumerate(graph.query(query)): result_tally = result_no + 1 assert isinstance(result[0], URIRef) assert isinstance(result[1], URIRef) - if isinstance(result[2], URIRef) and isinstance(result[3], URIRef): - assert result[2] == result[3] - else: - assert isinstance(result[2], (BNode, URIRef)) - assert isinstance(result[3], (BNode, URIRef)) + assert isinstance(result[2], URIRef) + assert isinstance(result[3], (BNode, URIRef)) test_cases.add(result) assert result_tally > 0, "Pattern for semi-open vocabularies is no longer aligned with test." for test_case in test_cases: - n_shacl_list = test_case[2] - n_rdfs_list = test_case[3] - - if n_shacl_list is n_rdfs_list: - # No point in doing any comparison work. - continue - + n_property = test_case[1] + n_shacl_list = test_case[3] shacl_list = rdf_list_to_member_list(graph, n_shacl_list) - rdfs_list = rdf_list_to_member_list(graph, n_rdfs_list) - if rdfs_list != shacl_list: - shacl_tuple = tuple(shacl_list) - rdfs_tuple = tuple(rdfs_list) - computed.add((test_case[0], test_case[1], shacl_tuple, rdfs_tuple)) + shacl_tuple = tuple(shacl_list) + + # property_value_tuples is not mutated on finding a match, due + # to some vocabularies being used by multiple properties. + if (n_property, shacl_tuple) not in property_value_tuples: + computed.add((test_case[0], test_case[1], test_case[2])) try: assert expected == computed except AssertionError: logging.error("Semi-open vocabulary lists are out of sync. See:") - for computed_result in computed: - logging.error("* %s", str(computed_result[0])) + for (n_class, n_property, n_vocabulary) in computed: + logging.error( + "* %s and %s, used in %s", + ( + str(n_property), + str(n_vocabulary), + str(n_class), + ) + ) raise From ed274b16745e65ba0058c0d313dac8253f51a98f Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 18 Feb 2025 16:36:20 -0500 Subject: [PATCH 53/61] Apply revised vocabulary pattern A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- ontology/uco/action/action.ttl | 82 +- ontology/uco/observable/observable.ttl | 1062 +++++-------- ontology/uco/vocabulary/vocabulary.ttl | 1532 +++++++++---------- tests/examples/action_inheritance_PASS.json | 10 +- tests/examples/hash_PASS.json | 4 +- tests/examples/test_validation.py | 8 +- 6 files changed, 1166 insertions(+), 1532 deletions(-) diff --git a/ontology/uco/action/action.ttl b/ontology/uco/action/action.ttl index 17698eec..7f868aae 100644 --- a/ontology/uco/action/action.ttl +++ b/ontology/uco/action/action.ttl @@ -108,43 +108,28 @@ action:Action sh:path action:actionCount ; ] , [ - sh:datatype vocabulary:ActionStatusTypeVocab ; - sh:message "Value is outside the default vocabulary ActionStatusTypeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for action:actionStatus should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path action:actionStatus ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:ActionStatusTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "Complete/Finish" + "Error" + "Fail" + "Ongoing" + "Pending" + "Success" + "Unknown" ) ; + sh:message "Value is not member of the vocabulary ActionStatusTypeVocab." ; sh:path action:actionStatus ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary ActionStatusTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:ActionStatusTypeVocab ; - sh:in ( - "Complete/Finish"^^vocabulary:ActionStatusTypeVocab - "Error"^^vocabulary:ActionStatusTypeVocab - "Fail"^^vocabulary:ActionStatusTypeVocab - "Ongoing"^^vocabulary:ActionStatusTypeVocab - "Pending"^^vocabulary:ActionStatusTypeVocab - "Success"^^vocabulary:ActionStatusTypeVocab - "Unknown"^^vocabulary:ActionStatusTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path action:actionStatus ; ] ; @@ -256,8 +241,17 @@ action:ActionFrequencyFacet sh:path action:units ; ] , [ - sh:datatype vocabulary:TrendVocab ; - sh:message "Value is outside the default vocabulary TrendVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for action:trend should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:path action:trend ; + sh:severity sh:Warning ; + ] , + [ + sh:in ( + "Decreasing" + "Increasing" + ) ; + sh:message "Value is not member of the vocabulary TrendVocab." ; sh:path action:trend ; sh:severity sh:Info ; ] , @@ -265,30 +259,6 @@ action:ActionFrequencyFacet sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:TrendVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path action:trend ; - ] , - [ - sh:message "Value is not member of the vocabulary TrendVocab." ; - sh:or ( - [ - sh:datatype vocabulary:TrendVocab ; - sh:in ( - "Decreasing"^^vocabulary:TrendVocab - "Increasing"^^vocabulary:TrendVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; sh:path action:trend ; ] ; diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 8081908a..0aa8be12 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -165,44 +165,29 @@ observable:AccountFacet sh:path observable:accountIdentifier ; ] , [ - sh:datatype vocabulary:AccountTypeVocab ; - sh:message "Value is outside the default vocabulary AccountTypeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:accountType should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:accountType ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:AccountTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "ldap" + "nis" + "openid" + "radius" + "tacacs" + "unix" + "windows_domain" + "windows_local" ) ; + sh:message "Value is not member of the vocabulary AccountTypeVocab." ; sh:path observable:accountType ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary AccountTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:AccountTypeVocab ; - sh:in ( - "ldap"^^vocabulary:AccountTypeVocab - "nis"^^vocabulary:AccountTypeVocab - "openid"^^vocabulary:AccountTypeVocab - "radius"^^vocabulary:AccountTypeVocab - "tacacs"^^vocabulary:AccountTypeVocab - "unix"^^vocabulary:AccountTypeVocab - "windows_domain"^^vocabulary:AccountTypeVocab - "windows_local"^^vocabulary:AccountTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:accountType ; ] ; @@ -656,17 +641,15 @@ observable:AutonomousSystemFacet sh:nodeKind sh:Literal ; sh:path observable:asHandle ; ] , + [ + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:regionalInternetRegistry should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:path observable:regionalInternetRegistry ; + sh:severity sh:Warning ; + ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:RegionalRegistryTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; sh:path observable:regionalInternetRegistry ; ] ; @@ -1438,39 +1421,24 @@ observable:ContactAddress sh:path observable:geolocationAddress ; ] , [ - sh:datatype vocabulary:ContactAddressScopeVocab ; - sh:message "Value is outside the default vocabulary ContactAddressScopeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:contactAddressScope should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:contactAddressScope ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:ContactAddressScopeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "home" + "work" + "school" ) ; + sh:message "Value is not member of the vocabulary ContactAddressScopeVocab." ; sh:path observable:contactAddressScope ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary ContactAddressScopeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:ContactAddressScopeVocab ; - sh:in ( - "home"^^vocabulary:ContactAddressScopeVocab - "work"^^vocabulary:ContactAddressScopeVocab - "school"^^vocabulary:ContactAddressScopeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:contactAddressScope ; ] ; @@ -1560,40 +1528,25 @@ observable:ContactEmail sh:path observable:emailAddress ; ] , [ - sh:datatype vocabulary:ContactEmailScopeVocab ; - sh:message "Value is outside the default vocabulary ContactEmailScopeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:contactEmailScope should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:contactEmailScope ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:ContactEmailScopeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "home" + "work" + "school" + "cloud" ) ; + sh:message "Value is not member of the vocabulary ContactEmailScopeVocab." ; sh:path observable:contactEmailScope ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary ContactEmailScopeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:ContactEmailScopeVocab ; - sh:in ( - "home"^^vocabulary:ContactEmailScopeVocab - "work"^^vocabulary:ContactEmailScopeVocab - "school"^^vocabulary:ContactEmailScopeVocab - "cloud"^^vocabulary:ContactEmailScopeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:contactEmailScope ; ] ; @@ -1827,44 +1780,29 @@ observable:ContactPhone sh:path observable:contactPhoneNumber ; ] , [ - sh:datatype vocabulary:ContactPhoneScopeVocab ; - sh:message "Value is outside the default vocabulary ContactPhoneScopeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:contactPhoneScope in UCO 2.0.0." ; sh:path observable:contactPhoneScope ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:ContactPhoneScopeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "home" + "work" + "school" + "mobile" + "main" + "home fax" + "work fax" + "pager" ) ; + sh:message "Value is not member of the vocabulary ContactPhoneScopeVocab." ; sh:path observable:contactPhoneScope ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary ContactPhoneScopeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:ContactPhoneScopeVocab ; - sh:in ( - "home"^^vocabulary:ContactPhoneScopeVocab - "work"^^vocabulary:ContactPhoneScopeVocab - "school"^^vocabulary:ContactPhoneScopeVocab - "mobile"^^vocabulary:ContactPhoneScopeVocab - "main"^^vocabulary:ContactPhoneScopeVocab - "home fax"^^vocabulary:ContactPhoneScopeVocab - "work fax"^^vocabulary:ContactPhoneScopeVocab - "pager"^^vocabulary:ContactPhoneScopeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:contactPhoneScope ; ] ; @@ -1912,39 +1850,24 @@ observable:ContactSIP sh:path observable:sipAddress ; ] , [ - sh:datatype vocabulary:ContactSIPScopeVocab ; - sh:message "Value is outside the default vocabulary ContactSIPScopeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:contactSIPScope should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:contactSIPScope ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:ContactSIPScopeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "home" + "work" + "school" ) ; + sh:message "Value is not member of the vocabulary ContactSIPScopeVocab." ; sh:path observable:contactSIPScope ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary ContactSIPScopeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:ContactSIPScopeVocab ; - sh:in ( - "home"^^vocabulary:ContactSIPScopeVocab - "work"^^vocabulary:ContactSIPScopeVocab - "school"^^vocabulary:ContactSIPScopeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:contactSIPScope ; ] ; @@ -1967,40 +1890,25 @@ observable:ContactURL sh:path observable:url ; ] , [ - sh:datatype vocabulary:ContactURLScopeVocab ; - sh:message "Value is outside the default vocabulary ContactURLScopeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:contactURLScope should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:contactURLScope ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:ContactURLScopeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "home" + "work" + "school" + "homepage" ) ; + sh:message "Value is not member of the vocabulary ContactURLScopeVocab." ; sh:path observable:contactURLScope ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary ContactURLScopeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:ContactURLScopeVocab ; - sh:in ( - "home"^^vocabulary:ContactURLScopeVocab - "work"^^vocabulary:ContactURLScopeVocab - "school"^^vocabulary:ContactURLScopeVocab - "homepage"^^vocabulary:ContactURLScopeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:contactURLScope ; ] ; @@ -2074,45 +1982,30 @@ observable:ContentDataFacet sh:nodeKind sh:Literal ; sh:path observable:mimeClass ; ] , + [ + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:byteOrder should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:path observable:byteOrder ; + sh:severity sh:Warning ; + ] , [ sh:datatype xsd:string ; sh:nodeKind sh:Literal ; sh:path observable:mimeType ; ] , [ - sh:datatype vocabulary:EndiannessTypeVocab ; - sh:message "Value is outside the default vocabulary EndiannessTypeVocab." ; + sh:in ( + "Big-endian" + "Little-endian" + "Middle-endian" + ) ; + sh:message "Value is not member of the vocabulary EndiannessTypeVocab." ; sh:path observable:byteOrder ; sh:severity sh:Info ; ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:EndiannessTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path observable:byteOrder ; - ] , - [ - sh:message "Value is not member of the vocabulary EndiannessTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:EndiannessTypeVocab ; - sh:in ( - "Big-endian"^^vocabulary:EndiannessTypeVocab - "Little-endian"^^vocabulary:EndiannessTypeVocab - "Middle-endian"^^vocabulary:EndiannessTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; sh:path observable:byteOrder ; ] ; @@ -4109,41 +4002,26 @@ observable:MemoryFacet sh:path observable:regionSize ; ] , [ - sh:datatype vocabulary:MemoryBlockTypeVocab ; - sh:message "Value is outside the default vocabulary MemoryBlockTypeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:blockType should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:blockType ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:MemoryBlockTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "Bit-mapped" + "Byte-mapped" + "Initialized" + "Overlay" + "Uninitialized" ) ; + sh:message "Value is not member of the vocabulary MemoryBlockTypeVocab." ; sh:path observable:blockType ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary MemoryBlockTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:MemoryBlockTypeVocab ; - sh:in ( - "Bit-mapped"^^vocabulary:MemoryBlockTypeVocab - "Byte-mapped"^^vocabulary:MemoryBlockTypeVocab - "Initialized"^^vocabulary:MemoryBlockTypeVocab - "Overlay"^^vocabulary:MemoryBlockTypeVocab - "Uninitialized"^^vocabulary:MemoryBlockTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:blockType ; ] ; @@ -5743,115 +5621,70 @@ observable:RecoveredObjectFacet rdfs:comment "Recoverability status of name, metadata, and content."@en ; sh:property [ - sh:datatype vocabulary:RecoveredObjectStatusVocab ; - sh:message "Value is outside the default vocabulary RecoveredObjectStatusVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:contentRecoveredStatus should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:contentRecoveredStatus ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:datatype vocabulary:RecoveredObjectStatusVocab ; - sh:message "Value is outside the default vocabulary RecoveredObjectStatusVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:metadataRecoveredStatus should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:metadataRecoveredStatus ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:datatype vocabulary:RecoveredObjectStatusVocab ; - sh:message "Value is outside the default vocabulary RecoveredObjectStatusVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:nameRecoveredStatus should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:nameRecoveredStatus ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:RecoveredObjectStatusVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "recovered" + "partially recovered" + "overwritten" + "unknown" ) ; + sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; sh:path observable:nameRecoveredStatus ; + sh:severity sh:Info ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:RecoveredObjectStatusVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "recovered" + "partially recovered" + "overwritten" + "unknown" ) ; + sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; sh:path observable:metadataRecoveredStatus ; + sh:severity sh:Info ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:RecoveredObjectStatusVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "recovered" + "partially recovered" + "overwritten" + "unknown" ) ; + sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; sh:path observable:contentRecoveredStatus ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; - sh:or ( - [ - sh:datatype vocabulary:RecoveredObjectStatusVocab ; - sh:in ( - "recovered"^^vocabulary:RecoveredObjectStatusVocab - "partially recovered"^^vocabulary:RecoveredObjectStatusVocab - "overwritten"^^vocabulary:RecoveredObjectStatusVocab - "unknown"^^vocabulary:RecoveredObjectStatusVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path observable:nameRecoveredStatus ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; + sh:path observable:contentRecoveredStatus ; ] , [ - sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; - sh:or ( - [ - sh:datatype vocabulary:RecoveredObjectStatusVocab ; - sh:in ( - "recovered"^^vocabulary:RecoveredObjectStatusVocab - "partially recovered"^^vocabulary:RecoveredObjectStatusVocab - "overwritten"^^vocabulary:RecoveredObjectStatusVocab - "unknown"^^vocabulary:RecoveredObjectStatusVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:metadataRecoveredStatus ; ] , [ - sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; - sh:or ( - [ - sh:datatype vocabulary:RecoveredObjectStatusVocab ; - sh:in ( - "recovered"^^vocabulary:RecoveredObjectStatusVocab - "partially recovered"^^vocabulary:RecoveredObjectStatusVocab - "overwritten"^^vocabulary:RecoveredObjectStatusVocab - "unknown"^^vocabulary:RecoveredObjectStatusVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path observable:contentRecoveredStatus ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; + sh:path observable:nameRecoveredStatus ; ] ; sh:targetClass observable:RecoveredObjectFacet ; @@ -6526,40 +6359,25 @@ observable:TaskActionType sh:path observable:actionID ; ] , [ - sh:datatype vocabulary:TaskActionTypeVocab ; - sh:message "Value is outside the default vocabulary TaskActionTypeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:actionType should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:actionType ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:TaskActionTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "TASK_ACTION_COM_HANDLER" + "TASK_ACTION_EXEC" + "TASK_ACTION_SEND_EMAIL" + "TASK_ACTION_SHOW_MESSAGE" ) ; + sh:message "Value is not member of the vocabulary TaskActionTypeVocab." ; sh:path observable:actionType ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary TaskActionTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:TaskActionTypeVocab ; - sh:in ( - "TASK_ACTION_COM_HANDLER"^^vocabulary:TaskActionTypeVocab - "TASK_ACTION_EXEC"^^vocabulary:TaskActionTypeVocab - "TASK_ACTION_SEND_EMAIL"^^vocabulary:TaskActionTypeVocab - "TASK_ACTION_SHOW_MESSAGE"^^vocabulary:TaskActionTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:actionType ; ] ; @@ -6612,84 +6430,54 @@ observable:TriggerType sh:path observable:triggerSessionChangeType ; ] , [ - sh:datatype vocabulary:TriggerFrequencyVocab ; - sh:message "Value is outside the default vocabulary TriggerFrequencyVocab." ; - sh:path observable:triggerFrequency ; - sh:severity sh:Info ; - ] , - [ - sh:datatype vocabulary:TriggerTypeVocab ; - sh:message "Value is outside the default vocabulary TriggerTypeVocab." ; - sh:path observable:triggerType ; - sh:severity sh:Info ; - ] , - [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:TriggerFrequencyVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:triggerFrequency should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:triggerFrequency ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:TriggerTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:triggerType should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:triggerType ; + sh:severity sh:Warning ; ] , [ - sh:message "Value is not member of the vocabulary TriggerFrequencyVocab." ; - sh:or ( - [ - sh:datatype vocabulary:TriggerFrequencyVocab ; - sh:in ( - "TASK_EVENT_TRIGGER_AT_LOGON"^^vocabulary:TriggerFrequencyVocab - "TASK_EVENT_TRIGGER_AT_SYSTEMSTART"^^vocabulary:TriggerFrequencyVocab - "TASK_EVENT_TRIGGER_ON_IDLE"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_DAILY"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_MONTHLYDATE"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_MONTHLYDOW"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_ONCE"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_WEEKLY"^^vocabulary:TriggerFrequencyVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "TASK_EVENT_TRIGGER_AT_LOGON" + "TASK_EVENT_TRIGGER_AT_SYSTEMSTART" + "TASK_EVENT_TRIGGER_ON_IDLE" + "TASK_TIME_TRIGGER_DAILY" + "TASK_TIME_TRIGGER_MONTHLYDATE" + "TASK_TIME_TRIGGER_MONTHLYDOW" + "TASK_TIME_TRIGGER_ONCE" + "TASK_TIME_TRIGGER_WEEKLY" ) ; + sh:message "Value is not member of the vocabulary TriggerFrequencyVocab." ; sh:path observable:triggerFrequency ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary TriggerTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:TriggerTypeVocab ; - sh:in ( - "TASK_TRIGGER_BOOT"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_EVENT"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_IDLE"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_LOGON"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_REGISTRATION"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_SESSION_STATE_CHANGE"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_TIME"^^vocabulary:TriggerTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "TASK_TRIGGER_BOOT" + "TASK_TRIGGER_EVENT" + "TASK_TRIGGER_IDLE" + "TASK_TRIGGER_LOGON" + "TASK_TRIGGER_REGISTRATION" + "TASK_TRIGGER_SESSION_STATE_CHANGE" + "TASK_TRIGGER_TIME" ) ; + sh:message "Value is not member of the vocabulary TriggerTypeVocab." ; + sh:path observable:triggerType ; + sh:severity sh:Info ; + ] , + [ + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; + sh:path observable:triggerFrequency ; + ] , + [ + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:triggerType ; ] ; @@ -7176,47 +6964,32 @@ observable:URLVisitFacet sh:path observable:visitDuration ; ] , [ - sh:datatype vocabulary:URLTransitionTypeVocab ; - sh:message "Value is outside the default vocabulary URLTransitionTypeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:urlTransitionType should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:urlTransitionType ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:URLTransitionTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "link" + "typed" + "auto_bookmark" + "auto_subframe" + "manual_subframe" + "generated" + "auto_toplevel" + "form_submit" + "reload" + "keyword" + "keyword_generated" ) ; + sh:message "Value is not member of the vocabulary URLTransitionTypeVocab." ; sh:path observable:urlTransitionType ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary URLTransitionTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:URLTransitionTypeVocab ; - sh:in ( - "link"^^vocabulary:URLTransitionTypeVocab - "typed"^^vocabulary:URLTransitionTypeVocab - "auto_bookmark"^^vocabulary:URLTransitionTypeVocab - "auto_subframe"^^vocabulary:URLTransitionTypeVocab - "manual_subframe"^^vocabulary:URLTransitionTypeVocab - "generated"^^vocabulary:URLTransitionTypeVocab - "auto_toplevel"^^vocabulary:URLTransitionTypeVocab - "form_submit"^^vocabulary:URLTransitionTypeVocab - "reload"^^vocabulary:URLTransitionTypeVocab - "keyword"^^vocabulary:URLTransitionTypeVocab - "keyword_generated"^^vocabulary:URLTransitionTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:urlTransitionType ; ] ; @@ -7499,6 +7272,18 @@ observable:WhoIsFacet sh:nodeKind sh:Literal ; sh:path observable:sponsoringRegistrar ; ] , + [ + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:regionalInternetRegistry should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:path observable:regionalInternetRegistry ; + sh:severity sh:Warning ; + ] , + [ + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:status should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:path observable:status ; + sh:severity sh:Warning ; + ] , [ sh:datatype xsd:string ; sh:nodeKind sh:Literal ; @@ -7511,68 +7296,39 @@ observable:WhoIsFacet sh:path observable:dnssec ; ] , [ - sh:datatype vocabulary:WhoisStatusTypeVocab ; - sh:message "Value is outside the default vocabulary WhoisStatusTypeVocab." ; + sh:in ( + "ADD_PERIOD" + "AUTO_RENEW_PERIOD" + "CLIENT_DELETE_PROHIBITED" + "CLIENT_HOLD" + "CLIENT_RENEW_PROHIBITED" + "CLIENT_TRANSFER_PROHIBITED" + "CLIENT_UPDATE_PROHIBITED" + "DELETE_PROHIBITED" + "HOLD" + "INACTIVE" + "OK" + "PENDING_DELETE_RESTORABLE" + "PENDING_DELETE_SCHEDULED_FOR_RELEASE" + "PENDING_RESTORE" + "RENEW_PERIOD" + "RENEW_PROHIBITED" + "TRANSFER_PERIOD" + "TRANSFER_PROHIBITED" + "UPDATE_PROHIBITED" + ) ; + sh:message "Value is not member of the vocabulary WhoisStatusTypeVocab." ; sh:path observable:status ; sh:severity sh:Info ; ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:RegionalRegistryTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; sh:path observable:regionalInternetRegistry ; ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:WhoisStatusTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path observable:status ; - ] , - [ - sh:message "Value is not member of the vocabulary WhoisStatusTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:WhoisStatusTypeVocab ; - sh:in ( - "ADD_PERIOD"^^vocabulary:WhoisStatusTypeVocab - "AUTO_RENEW_PERIOD"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_DELETE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_HOLD"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_RENEW_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_TRANSFER_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_UPDATE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "DELETE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "HOLD"^^vocabulary:WhoisStatusTypeVocab - "INACTIVE"^^vocabulary:WhoisStatusTypeVocab - "OK"^^vocabulary:WhoisStatusTypeVocab - "PENDING_DELETE_RESTORABLE"^^vocabulary:WhoisStatusTypeVocab - "PENDING_DELETE_SCHEDULED_FOR_RELEASE"^^vocabulary:WhoisStatusTypeVocab - "PENDING_RESTORE"^^vocabulary:WhoisStatusTypeVocab - "RENEW_PERIOD"^^vocabulary:WhoisStatusTypeVocab - "RENEW_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "TRANSFER_PERIOD"^^vocabulary:WhoisStatusTypeVocab - "TRANSFER_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "UPDATE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; sh:path observable:status ; ] ; @@ -7589,39 +7345,24 @@ observable:WhoisContactFacet rdfs:comment "A Whois contact type is a grouping of characteristics unique to contact-related information present in a response record conformant to the WHOIS protocol standard (RFC 3912). [based on https://en.wikipedia.org/wiki/WHOIS]"@en ; sh:property [ - sh:datatype vocabulary:WhoisContactTypeVocab ; - sh:message "Value is outside the default vocabulary WhoisContactTypeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:whoisContactType should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:whoisContactType ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:WhoisContactTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "ADMIN" + "BILLING" + "TECHNICAL" ) ; + sh:message "Value is not member of the vocabulary WhoisContactTypeVocab." ; sh:path observable:whoisContactType ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary WhoisContactTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:WhoisContactTypeVocab ; - sh:in ( - "ADMIN"^^vocabulary:WhoisContactTypeVocab - "BILLING"^^vocabulary:WhoisContactTypeVocab - "TECHNICAL"^^vocabulary:WhoisContactTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:whoisContactType ; ] ; @@ -8774,150 +8515,112 @@ observable:WindowsTaskFacet sh:path observable:taskCreator ; ] , [ - sh:datatype vocabulary:TaskFlagVocab ; - sh:message "Value is outside the default vocabulary TaskFlagVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:flags should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:flags ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ - sh:datatype vocabulary:TaskPriorityVocab ; - sh:message "Value is outside the default vocabulary TaskPriorityVocab." ; - sh:path observable:priority ; - sh:severity sh:Info ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:status should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; + sh:path observable:status ; + sh:severity sh:Warning ; ] , [ - sh:datatype vocabulary:TaskStatusVocab ; - sh:message "Value is outside the default vocabulary TaskStatusVocab." ; + sh:in ( + "SCHED_E_ACCOUNT_DBASE_CORRUPT" + "SCHED_E_ACCOUNT_INFORMATION_NOT_SET" + "SCHED_E_ACCOUNT_NAME_NOT_FOUND" + "SCHED_E_CANNOT_OPEN_TASK" + "SCHED_E_INVALID_TASK" + "SCHED_E_NO_SECURITY_SERVICES" + "SCHED_E_SERVICE_NOT_INSTALLED" + "SCHED_E_SERVICE_NOT_RUNNING" + "SCHED_E_TASK_NOT_READY" + "SCHED_E_TASK_NOT_RUNNING" + "SCHED_E_TRIGGER_NOT_FOUND" + "SCHED_E_UNKNOWN_OBJECT_VERSION" + "SCHED_E_UNSUPPORTED_ACCOUNT_OPTION" + "SCHED_S_EVENT_TRIGGER" + "SCHED_S_TASK_DISABLED" + "SCHED_S_TASK_HAS_NOT_RUN" + "SCHED_S_TASK_NOT_SCHEDULED" + "SCHED_S_TASK_NO_MORE_RUNS" + "SCHED_S_TASK_NO_VALID_TRIGGERS" + "SCHED_S_TASK_READY" + "SCHED_S_TASK_RUNNING" + "SCHED_S_TASK_TERMINATED" + "TASK_STATE_QUEUED" + "TASK_STATE_UNKNOWN" + ) ; + sh:message "Value is not member of the vocabulary TaskStatusVocab." ; sh:path observable:status ; + ] , + [ + sh:in ( + "TASK_FLAG_DELETE_WHEN_DONE" + "TASK_FLAG_DISABLED" + "TASK_FLAG_DONT_START_IF_ON_BATTERIES" + "TASK_FLAG_HIDDEN" + "TASK_FLAG_INTERACTIVE" + "TASK_FLAG_KILL_IF_GOING_ON_BATTERIES" + "TASK_FLAG_KILL_ON_IDLE_END" + "TASK_FLAG_RESTART_ON_IDLE_RESUME" + "TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET" + "TASK_FLAG_RUN_ONLY_IF_LOGGED_ON" + "TASK_FLAG_START_ONLY_IF_IDLE" + "TASK_FLAG_SYSTEM_REQUIRED" + "TASK_FLAG_ZERO" + ) ; + sh:message "Value is not member of the vocabulary TaskFlagVocab." ; + sh:path observable:flags ; sh:severity sh:Info ; ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:TaskPriorityVocab ; - ] - [ - sh:datatype xsd:integer ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; sh:path observable:priority ; ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:TaskStatusVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; sh:path observable:status ; ] , [ - sh:message "Value is not member of the vocabulary TaskFlagVocab." ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:priority should be xsd:string or xsd:integer. Not using xsd:string or xsd:integer will be an error in UCO 2.0.0." ; sh:or ( [ - sh:datatype vocabulary:TaskFlagVocab ; - sh:in ( - "TASK_FLAG_DELETE_WHEN_DONE"^^vocabulary:TaskFlagVocab - "TASK_FLAG_DISABLED"^^vocabulary:TaskFlagVocab - "TASK_FLAG_DONT_START_IF_ON_BATTERIES"^^vocabulary:TaskFlagVocab - "TASK_FLAG_HIDDEN"^^vocabulary:TaskFlagVocab - "TASK_FLAG_INTERACTIVE"^^vocabulary:TaskFlagVocab - "TASK_FLAG_KILL_IF_GOING_ON_BATTERIES"^^vocabulary:TaskFlagVocab - "TASK_FLAG_KILL_ON_IDLE_END"^^vocabulary:TaskFlagVocab - "TASK_FLAG_RESTART_ON_IDLE_RESUME"^^vocabulary:TaskFlagVocab - "TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET"^^vocabulary:TaskFlagVocab - "TASK_FLAG_RUN_ONLY_IF_LOGGED_ON"^^vocabulary:TaskFlagVocab - "TASK_FLAG_START_ONLY_IF_IDLE"^^vocabulary:TaskFlagVocab - "TASK_FLAG_SYSTEM_REQUIRED"^^vocabulary:TaskFlagVocab - "TASK_FLAG_ZERO"^^vocabulary:TaskFlagVocab - ) ; + sh:datatype xsd:integer ; ] [ sh:datatype xsd:string ; ] ) ; - sh:path observable:flags ; + sh:path observable:priority ; + sh:severity sh:Warning ; ] , [ sh:message "Value is not member of the vocabulary TaskPriorityVocab." ; sh:or ( [ - sh:datatype vocabulary:TaskPriorityVocab ; sh:in ( - "ABOVE_NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "BELOW_NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "HIGH_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "IDLE_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "REALTIME_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab + "ABOVE_NORMAL_PRIORITY_CLASS" + "BELOW_NORMAL_PRIORITY_CLASS" + "HIGH_PRIORITY_CLASS" + "IDLE_PRIORITY_CLASS" + "NORMAL_PRIORITY_CLASS" + "REALTIME_PRIORITY_CLASS" ) ; ] [ sh:datatype xsd:integer ; ] - [ - sh:datatype xsd:string ; - ] ) ; sh:path observable:priority ; - ] , - [ - sh:message "Value is not member of the vocabulary TaskStatusVocab." ; - sh:or ( - [ - sh:datatype vocabulary:TaskStatusVocab ; - sh:in ( - "SCHED_E_ACCOUNT_DBASE_CORRUPT"^^vocabulary:TaskStatusVocab - "SCHED_E_ACCOUNT_INFORMATION_NOT_SET"^^vocabulary:TaskStatusVocab - "SCHED_E_ACCOUNT_NAME_NOT_FOUND"^^vocabulary:TaskStatusVocab - "SCHED_E_CANNOT_OPEN_TASK"^^vocabulary:TaskStatusVocab - "SCHED_E_INVALID_TASK"^^vocabulary:TaskStatusVocab - "SCHED_E_NO_SECURITY_SERVICES"^^vocabulary:TaskStatusVocab - "SCHED_E_SERVICE_NOT_INSTALLED"^^vocabulary:TaskStatusVocab - "SCHED_E_SERVICE_NOT_RUNNING"^^vocabulary:TaskStatusVocab - "SCHED_E_TASK_NOT_READY"^^vocabulary:TaskStatusVocab - "SCHED_E_TASK_NOT_RUNNING"^^vocabulary:TaskStatusVocab - "SCHED_E_TRIGGER_NOT_FOUND"^^vocabulary:TaskStatusVocab - "SCHED_E_UNKNOWN_OBJECT_VERSION"^^vocabulary:TaskStatusVocab - "SCHED_E_UNSUPPORTED_ACCOUNT_OPTION"^^vocabulary:TaskStatusVocab - "SCHED_S_EVENT_TRIGGER"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_DISABLED"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_HAS_NOT_RUN"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_NOT_SCHEDULED"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_NO_MORE_RUNS"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_NO_VALID_TRIGGERS"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_READY"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_RUNNING"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_TERMINATED"^^vocabulary:TaskStatusVocab - "TASK_STATE_QUEUED"^^vocabulary:TaskStatusVocab - "TASK_STATE_UNKNOWN"^^vocabulary:TaskStatusVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; - sh:path observable:status ; + sh:severity sh:Info ; ] , [ sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:TaskFlagVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; sh:path observable:flags ; ] ; @@ -9025,10 +8728,10 @@ observable:WindowsVolumeFacet sh:path observable:driveLetter ; ] , [ - sh:datatype vocabulary:WindowsDriveTypeVocab ; - sh:message "Value is outside the default vocabulary WindowsDriveTypeVocab." ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:driveType should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:driveType ; - sh:severity sh:Info ; + sh:severity sh:Warning ; ] , [ sh:datatype vocabulary:WindowsVolumeAttributeVocab ; @@ -9037,37 +8740,22 @@ observable:WindowsVolumeFacet sh:path observable:windowsVolumeAttributes ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:WindowsDriveTypeVocab ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "DRIVE_CDROM" + "DRIVE_FIXED" + "DRIVE_NO_ROOT_DIR" + "DRIVE_RAMDISK" + "DRIVE_REMOTE" + "DRIVE_REMOVABLE" + "DRIVE_UNKNOWN" ) ; + sh:message "Value is not member of the vocabulary WindowsDriveTypeVocab." ; sh:path observable:driveType ; + sh:severity sh:Info ; ] , [ - sh:message "Value is not member of the vocabulary WindowsDriveTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:WindowsDriveTypeVocab ; - sh:in ( - "DRIVE_CDROM"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_FIXED"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_NO_ROOT_DIR"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_RAMDISK"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_REMOTE"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_REMOVABLE"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_UNKNOWN"^^vocabulary:WindowsDriveTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:driveType ; ] ; @@ -9124,37 +8812,28 @@ observable:WirelessNetworkConnectionFacet sh:path observable:ssid ; ] , [ - sh:maxCount "1"^^xsd:integer ; - sh:nodeKind sh:Literal ; - sh:or ( - [ - sh:datatype vocabulary:WirelessNetworkSecurityModeVocab ; - ] - [ - sh:datatype xsd:string ; - ] - ) ; + sh:datatype xsd:string ; + sh:message "As of UCO 1.4.0, the datatype to use for observable:wirelessNetworkSecurityMode should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:wirelessNetworkSecurityMode ; + sh:severity sh:Warning ; ] , [ - sh:message "Value is not member of the vocabulary WirelessNetworkSecurityModeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:WirelessNetworkSecurityModeVocab ; - sh:in ( - "None"^^vocabulary:WirelessNetworkSecurityModeVocab - "WEP"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA2-PSK"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA2-Enterprise"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA3-PSK"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA3-Enterprise"^^vocabulary:WirelessNetworkSecurityModeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "None" + "WEP" + "WPA" + "WPA2-PSK" + "WPA2-Enterprise" + "WPA3-PSK" + "WPA3-Enterprise" ) ; + sh:message "Value is not member of the vocabulary WirelessNetworkSecurityModeVocab." ; + sh:path observable:wirelessNetworkSecurityMode ; + sh:severity sh:Info ; + ] , + [ + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:Literal ; sh:path observable:wirelessNetworkSecurityMode ; ] ; @@ -12684,31 +12363,22 @@ observable:regionalInternetRegistry observable:regionalInternetRegistry-shape-value-not-vocabulary-member a sh:PropertyShape ; - sh:message "Value is not member of the vocabulary RegionalRegistryTypeVocab." ; - sh:or ( - [ - sh:datatype vocabulary:RegionalRegistryTypeVocab ; - sh:in ( - "APNIC"^^vocabulary:RegionalRegistryTypeVocab - "ARIN"^^vocabulary:RegionalRegistryTypeVocab - "AfriNIC"^^vocabulary:RegionalRegistryTypeVocab - "LACNIC"^^vocabulary:RegionalRegistryTypeVocab - "RIPE NCC"^^vocabulary:RegionalRegistryTypeVocab - ) ; - ] - [ - sh:datatype xsd:string ; - ] + sh:in ( + "APNIC" + "ARIN" + "AfriNIC" + "LACNIC" + "RIPE NCC" ) ; + sh:message "Value is not member of the vocabulary RegionalRegistryTypeVocab." ; sh:path observable:regionalInternetRegistry ; + sh:severity sh:Info ; . observable:regionalInternetRegistry-shape-value-outside-default-vocabulary a sh:PropertyShape ; - sh:datatype vocabulary:RegionalRegistryTypeVocab ; - sh:message "Value is outside the default vocabulary RegionalRegistryTypeVocab." ; + sh:deactivated "true"^^xsd:boolean ; sh:path observable:regionalInternetRegistry ; - sh:severity sh:Info ; . observable:registeredOrganization diff --git a/ontology/uco/vocabulary/vocabulary.ttl b/ontology/uco/vocabulary/vocabulary.ttl index 8ba2b864..2ad3ac08 100644 --- a/ontology/uco/vocabulary/vocabulary.ttl +++ b/ontology/uco/vocabulary/vocabulary.ttl @@ -18,14 +18,14 @@ vocabulary:AccountTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "ldap"^^vocabulary:AccountTypeVocab - "nis"^^vocabulary:AccountTypeVocab - "openid"^^vocabulary:AccountTypeVocab - "radius"^^vocabulary:AccountTypeVocab - "tacacs"^^vocabulary:AccountTypeVocab - "unix"^^vocabulary:AccountTypeVocab - "windows_domain"^^vocabulary:AccountTypeVocab - "windows_local"^^vocabulary:AccountTypeVocab + "ldap" + "nis" + "openid" + "radius" + "tacacs" + "unix" + "windows_domain" + "windows_local" ) ; ] ; . @@ -37,57 +37,57 @@ vocabulary:ActionArgumentNameVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "APC Address"^^vocabulary:ActionArgumentNameVocab - "APC Mode"^^vocabulary:ActionArgumentNameVocab - "API"^^vocabulary:ActionArgumentNameVocab - "Access Mode"^^vocabulary:ActionArgumentNameVocab - "Application Name"^^vocabulary:ActionArgumentNameVocab - "Base Address"^^vocabulary:ActionArgumentNameVocab - "Callback Address"^^vocabulary:ActionArgumentNameVocab - "Code Address"^^vocabulary:ActionArgumentNameVocab - "Command"^^vocabulary:ActionArgumentNameVocab - "Control Code"^^vocabulary:ActionArgumentNameVocab - "Control Parameter"^^vocabulary:ActionArgumentNameVocab - "Creation Flags"^^vocabulary:ActionArgumentNameVocab - "Database Name"^^vocabulary:ActionArgumentNameVocab - "Delay Time (ms)"^^vocabulary:ActionArgumentNameVocab - "Destination Address"^^vocabulary:ActionArgumentNameVocab - "Error Control"^^vocabulary:ActionArgumentNameVocab - "File Information Class"^^vocabulary:ActionArgumentNameVocab - "Flags"^^vocabulary:ActionArgumentNameVocab - "Function Address"^^vocabulary:ActionArgumentNameVocab - "Function Name"^^vocabulary:ActionArgumentNameVocab - "Function Ordinal"^^vocabulary:ActionArgumentNameVocab - "Hook Type"^^vocabulary:ActionArgumentNameVocab - "Host Name"^^vocabulary:ActionArgumentNameVocab - "Hostname"^^vocabulary:ActionArgumentNameVocab - "Initial Owner"^^vocabulary:ActionArgumentNameVocab - "Mapping Offset"^^vocabulary:ActionArgumentNameVocab - "Number of Bytes Per Send"^^vocabulary:ActionArgumentNameVocab - "Options"^^vocabulary:ActionArgumentNameVocab - "Parameter Address"^^vocabulary:ActionArgumentNameVocab - "Password"^^vocabulary:ActionArgumentNameVocab - "Privilege Name"^^vocabulary:ActionArgumentNameVocab - "Protection"^^vocabulary:ActionArgumentNameVocab - "Proxy Bypass"^^vocabulary:ActionArgumentNameVocab - "Proxy Name"^^vocabulary:ActionArgumentNameVocab - "Reason"^^vocabulary:ActionArgumentNameVocab - "Request Size"^^vocabulary:ActionArgumentNameVocab - "Requested Version"^^vocabulary:ActionArgumentNameVocab - "Server"^^vocabulary:ActionArgumentNameVocab - "Service Name"^^vocabulary:ActionArgumentNameVocab - "Service State"^^vocabulary:ActionArgumentNameVocab - "Service Type"^^vocabulary:ActionArgumentNameVocab - "Share Mode"^^vocabulary:ActionArgumentNameVocab - "Shutdown Flag"^^vocabulary:ActionArgumentNameVocab - "Size (bytes)"^^vocabulary:ActionArgumentNameVocab - "Sleep Time (ms)"^^vocabulary:ActionArgumentNameVocab - "Source Address"^^vocabulary:ActionArgumentNameVocab - "Starting Address"^^vocabulary:ActionArgumentNameVocab - "System Metric Index"^^vocabulary:ActionArgumentNameVocab - "Target PID"^^vocabulary:ActionArgumentNameVocab - "Transfer Flags"^^vocabulary:ActionArgumentNameVocab - "Username"^^vocabulary:ActionArgumentNameVocab + "APC Address" + "APC Mode" + "API" + "Access Mode" + "Application Name" + "Base Address" + "Callback Address" + "Code Address" + "Command" + "Control Code" + "Control Parameter" + "Creation Flags" + "Database Name" + "Delay Time (ms)" + "Destination Address" + "Error Control" + "File Information Class" + "Flags" + "Function Address" + "Function Name" + "Function Ordinal" + "Hook Type" + "Host Name" + "Hostname" + "Initial Owner" + "Mapping Offset" + "Number of Bytes Per Send" + "Options" + "Parameter Address" + "Password" + "Privilege Name" + "Protection" + "Proxy Bypass" + "Proxy Name" + "Reason" + "Request Size" + "Requested Version" + "Server" + "Service Name" + "Service State" + "Service Type" + "Share Mode" + "Shutdown Flag" + "Size (bytes)" + "Sleep Time (ms)" + "Source Address" + "Starting Address" + "System Metric Index" + "Target PID" + "Transfer Flags" + "Username" ) ; ] ; . @@ -99,187 +99,187 @@ vocabulary:ActionNameVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Accept Socket Connection"^^vocabulary:ActionNameVocab - "Add Connection to Network Share"^^vocabulary:ActionNameVocab - "Add Network Share"^^vocabulary:ActionNameVocab - "Add Scheduled Task"^^vocabulary:ActionNameVocab - "Add System Call Hook"^^vocabulary:ActionNameVocab - "Add User"^^vocabulary:ActionNameVocab - "Add Windows Hook"^^vocabulary:ActionNameVocab - "Allocate Virtual Memory in Process"^^vocabulary:ActionNameVocab - "Bind Address to Socket"^^vocabulary:ActionNameVocab - "Change Service Configuration"^^vocabulary:ActionNameVocab - "Check for Remote Debugger"^^vocabulary:ActionNameVocab - "Close Port"^^vocabulary:ActionNameVocab - "Close Registry Key"^^vocabulary:ActionNameVocab - "Close Socket"^^vocabulary:ActionNameVocab - "Configure Service"^^vocabulary:ActionNameVocab - "Connect to IP"^^vocabulary:ActionNameVocab - "Connect to Named Pipe"^^vocabulary:ActionNameVocab - "Connect to Network Share"^^vocabulary:ActionNameVocab - "Connect to Socket"^^vocabulary:ActionNameVocab - "Connect to URL"^^vocabulary:ActionNameVocab - "Control Driver"^^vocabulary:ActionNameVocab - "Control Service"^^vocabulary:ActionNameVocab - "Copy File"^^vocabulary:ActionNameVocab - "Create Dialog Box"^^vocabulary:ActionNameVocab - "Create Directory"^^vocabulary:ActionNameVocab - "Create Event"^^vocabulary:ActionNameVocab - "Create File"^^vocabulary:ActionNameVocab - "Create File Alternate Data Stream"^^vocabulary:ActionNameVocab - "Create File Mapping"^^vocabulary:ActionNameVocab - "Create File Symbolic Link"^^vocabulary:ActionNameVocab - "Create Hidden File"^^vocabulary:ActionNameVocab - "Create Mailslot"^^vocabulary:ActionNameVocab - "Create Module"^^vocabulary:ActionNameVocab - "Create Mutex"^^vocabulary:ActionNameVocab - "Create Named Pipe"^^vocabulary:ActionNameVocab - "Create Process"^^vocabulary:ActionNameVocab - "Create Process as User"^^vocabulary:ActionNameVocab - "Create Registry Key"^^vocabulary:ActionNameVocab - "Create Registry Key Value"^^vocabulary:ActionNameVocab - "Create Remote Thread in Process"^^vocabulary:ActionNameVocab - "Create Service"^^vocabulary:ActionNameVocab - "Create Socket"^^vocabulary:ActionNameVocab - "Create Symbolic Link"^^vocabulary:ActionNameVocab - "Create Thread"^^vocabulary:ActionNameVocab - "Create Window"^^vocabulary:ActionNameVocab - "Delete Directory"^^vocabulary:ActionNameVocab - "Delete File"^^vocabulary:ActionNameVocab - "Delete Named Pipe"^^vocabulary:ActionNameVocab - "Delete Network Share"^^vocabulary:ActionNameVocab - "Delete Registry Key"^^vocabulary:ActionNameVocab - "Delete Registry Key Value"^^vocabulary:ActionNameVocab - "Delete Service"^^vocabulary:ActionNameVocab - "Delete User"^^vocabulary:ActionNameVocab - "Disconnect from Named Pipe"^^vocabulary:ActionNameVocab - "Disconnect from Network Share"^^vocabulary:ActionNameVocab - "Disconnect from Socket"^^vocabulary:ActionNameVocab - "Download File"^^vocabulary:ActionNameVocab - "Enumerate DLLs"^^vocabulary:ActionNameVocab - "Enumerate Network Shares"^^vocabulary:ActionNameVocab - "Enumerate Processes"^^vocabulary:ActionNameVocab - "Enumerate Protocols"^^vocabulary:ActionNameVocab - "Enumerate Registry Key Subkeys"^^vocabulary:ActionNameVocab - "Enumerate Registry Key Values"^^vocabulary:ActionNameVocab - "Enumerate Services"^^vocabulary:ActionNameVocab - "Enumerate System Handles"^^vocabulary:ActionNameVocab - "Enumerate Threads"^^vocabulary:ActionNameVocab - "Enumerate Threads in Process"^^vocabulary:ActionNameVocab - "Enumerate Users"^^vocabulary:ActionNameVocab - "Enumerate Windows"^^vocabulary:ActionNameVocab - "Find File"^^vocabulary:ActionNameVocab - "Find Window"^^vocabulary:ActionNameVocab - "Flush Process Instruction Cache"^^vocabulary:ActionNameVocab - "Free Library"^^vocabulary:ActionNameVocab - "Free Process Virtual Memory"^^vocabulary:ActionNameVocab - "Get Disk Free Space"^^vocabulary:ActionNameVocab - "Get Disk Type"^^vocabulary:ActionNameVocab - "Get Elapsed System Up Time"^^vocabulary:ActionNameVocab - "Get File Attributes"^^vocabulary:ActionNameVocab - "Get Function Address"^^vocabulary:ActionNameVocab - "Get Host By Address"^^vocabulary:ActionNameVocab - "Get Host By Name"^^vocabulary:ActionNameVocab - "Get Host Name"^^vocabulary:ActionNameVocab - "Get Library File Name"^^vocabulary:ActionNameVocab - "Get Library Handle"^^vocabulary:ActionNameVocab - "Get NetBIOS Name"^^vocabulary:ActionNameVocab - "Get Process Current Directory"^^vocabulary:ActionNameVocab - "Get Process Environment Variable"^^vocabulary:ActionNameVocab - "Get Process Startup Information"^^vocabulary:ActionNameVocab - "Get Processes Snapshot"^^vocabulary:ActionNameVocab - "Get Registry Key Attributes"^^vocabulary:ActionNameVocab - "Get Service Status"^^vocabulary:ActionNameVocab - "Get System Global Flags"^^vocabulary:ActionNameVocab - "Get System Host Name"^^vocabulary:ActionNameVocab - "Get System Local Time"^^vocabulary:ActionNameVocab - "Get System NetBIOS Name"^^vocabulary:ActionNameVocab - "Get System Network Parameters"^^vocabulary:ActionNameVocab - "Get System Time"^^vocabulary:ActionNameVocab - "Get Thread Context"^^vocabulary:ActionNameVocab - "Get Thread Username"^^vocabulary:ActionNameVocab - "Get User Attributes"^^vocabulary:ActionNameVocab - "Get Username"^^vocabulary:ActionNameVocab - "Get Windows Directory"^^vocabulary:ActionNameVocab - "Get Windows System Directory"^^vocabulary:ActionNameVocab - "Get Windows Temporary Files Directory"^^vocabulary:ActionNameVocab - "Hide Window"^^vocabulary:ActionNameVocab - "Impersonate Process"^^vocabulary:ActionNameVocab - "Impersonate Thread"^^vocabulary:ActionNameVocab - "Inject Memory Page"^^vocabulary:ActionNameVocab - "Kill Process"^^vocabulary:ActionNameVocab - "Kill Thread"^^vocabulary:ActionNameVocab - "Kill Window"^^vocabulary:ActionNameVocab - "Listen on Port"^^vocabulary:ActionNameVocab - "Listen on Socket"^^vocabulary:ActionNameVocab - "Load Driver"^^vocabulary:ActionNameVocab - "Load Library"^^vocabulary:ActionNameVocab - "Load Module"^^vocabulary:ActionNameVocab - "Load and Call Driver"^^vocabulary:ActionNameVocab - "Lock File"^^vocabulary:ActionNameVocab - "Logon as User"^^vocabulary:ActionNameVocab - "Map File"^^vocabulary:ActionNameVocab - "Map Library"^^vocabulary:ActionNameVocab - "Map View of File"^^vocabulary:ActionNameVocab - "Modify File"^^vocabulary:ActionNameVocab - "Modify Named Pipe"^^vocabulary:ActionNameVocab - "Modify Process"^^vocabulary:ActionNameVocab - "Modify Registry Key"^^vocabulary:ActionNameVocab - "Modify Registry Key Value"^^vocabulary:ActionNameVocab - "Modify Service"^^vocabulary:ActionNameVocab - "Monitor Registry Key"^^vocabulary:ActionNameVocab - "Move File"^^vocabulary:ActionNameVocab - "Open File"^^vocabulary:ActionNameVocab - "Open File Mapping"^^vocabulary:ActionNameVocab - "Open Mutex"^^vocabulary:ActionNameVocab - "Open Port"^^vocabulary:ActionNameVocab - "Open Process"^^vocabulary:ActionNameVocab - "Open Registry Key"^^vocabulary:ActionNameVocab - "Open Service"^^vocabulary:ActionNameVocab - "Open Service Control Manager"^^vocabulary:ActionNameVocab - "Protect Virtual Memory"^^vocabulary:ActionNameVocab - "Query DNS"^^vocabulary:ActionNameVocab - "Query Disk Attributes"^^vocabulary:ActionNameVocab - "Query Process Virtual Memory"^^vocabulary:ActionNameVocab - "Queue APC in Thread"^^vocabulary:ActionNameVocab - "Read File"^^vocabulary:ActionNameVocab - "Read From Named Pipe"^^vocabulary:ActionNameVocab - "Read From Process Memory"^^vocabulary:ActionNameVocab - "Read Registry Key Value"^^vocabulary:ActionNameVocab - "Receive Data on Socket"^^vocabulary:ActionNameVocab - "Receive Email Message"^^vocabulary:ActionNameVocab - "Release Mutex"^^vocabulary:ActionNameVocab - "Rename File"^^vocabulary:ActionNameVocab - "Revert Thread to Self"^^vocabulary:ActionNameVocab - "Send Control Code to File"^^vocabulary:ActionNameVocab - "Send Control Code to Pipe"^^vocabulary:ActionNameVocab - "Send Control Code to Service"^^vocabulary:ActionNameVocab - "Send DNS Query"^^vocabulary:ActionNameVocab - "Send Data on Socket"^^vocabulary:ActionNameVocab - "Send Data to Address on Socket"^^vocabulary:ActionNameVocab - "Send Email Message"^^vocabulary:ActionNameVocab - "Send ICMP Request"^^vocabulary:ActionNameVocab - "Send Reverse DNS Query"^^vocabulary:ActionNameVocab - "Set File Attributes"^^vocabulary:ActionNameVocab - "Set NetBIOS Name"^^vocabulary:ActionNameVocab - "Set Process Current Directory"^^vocabulary:ActionNameVocab - "Set Process Environment Variable"^^vocabulary:ActionNameVocab - "Set System Global Flags"^^vocabulary:ActionNameVocab - "Set System Host Name"^^vocabulary:ActionNameVocab - "Set System Time"^^vocabulary:ActionNameVocab - "Set Thread Context"^^vocabulary:ActionNameVocab - "Show Window"^^vocabulary:ActionNameVocab - "Shutdown System"^^vocabulary:ActionNameVocab - "Sleep Process"^^vocabulary:ActionNameVocab - "Sleep System"^^vocabulary:ActionNameVocab - "Start Service"^^vocabulary:ActionNameVocab - "Unload Driver"^^vocabulary:ActionNameVocab - "Unload Module"^^vocabulary:ActionNameVocab - "Unlock File"^^vocabulary:ActionNameVocab - "Unmap File"^^vocabulary:ActionNameVocab - "Upload File"^^vocabulary:ActionNameVocab - "Write to File"^^vocabulary:ActionNameVocab - "Write to Process Virtual Memory"^^vocabulary:ActionNameVocab + "Accept Socket Connection" + "Add Connection to Network Share" + "Add Network Share" + "Add Scheduled Task" + "Add System Call Hook" + "Add User" + "Add Windows Hook" + "Allocate Virtual Memory in Process" + "Bind Address to Socket" + "Change Service Configuration" + "Check for Remote Debugger" + "Close Port" + "Close Registry Key" + "Close Socket" + "Configure Service" + "Connect to IP" + "Connect to Named Pipe" + "Connect to Network Share" + "Connect to Socket" + "Connect to URL" + "Control Driver" + "Control Service" + "Copy File" + "Create Dialog Box" + "Create Directory" + "Create Event" + "Create File" + "Create File Alternate Data Stream" + "Create File Mapping" + "Create File Symbolic Link" + "Create Hidden File" + "Create Mailslot" + "Create Module" + "Create Mutex" + "Create Named Pipe" + "Create Process" + "Create Process as User" + "Create Registry Key" + "Create Registry Key Value" + "Create Remote Thread in Process" + "Create Service" + "Create Socket" + "Create Symbolic Link" + "Create Thread" + "Create Window" + "Delete Directory" + "Delete File" + "Delete Named Pipe" + "Delete Network Share" + "Delete Registry Key" + "Delete Registry Key Value" + "Delete Service" + "Delete User" + "Disconnect from Named Pipe" + "Disconnect from Network Share" + "Disconnect from Socket" + "Download File" + "Enumerate DLLs" + "Enumerate Network Shares" + "Enumerate Processes" + "Enumerate Protocols" + "Enumerate Registry Key Subkeys" + "Enumerate Registry Key Values" + "Enumerate Services" + "Enumerate System Handles" + "Enumerate Threads" + "Enumerate Threads in Process" + "Enumerate Users" + "Enumerate Windows" + "Find File" + "Find Window" + "Flush Process Instruction Cache" + "Free Library" + "Free Process Virtual Memory" + "Get Disk Free Space" + "Get Disk Type" + "Get Elapsed System Up Time" + "Get File Attributes" + "Get Function Address" + "Get Host By Address" + "Get Host By Name" + "Get Host Name" + "Get Library File Name" + "Get Library Handle" + "Get NetBIOS Name" + "Get Process Current Directory" + "Get Process Environment Variable" + "Get Process Startup Information" + "Get Processes Snapshot" + "Get Registry Key Attributes" + "Get Service Status" + "Get System Global Flags" + "Get System Host Name" + "Get System Local Time" + "Get System NetBIOS Name" + "Get System Network Parameters" + "Get System Time" + "Get Thread Context" + "Get Thread Username" + "Get User Attributes" + "Get Username" + "Get Windows Directory" + "Get Windows System Directory" + "Get Windows Temporary Files Directory" + "Hide Window" + "Impersonate Process" + "Impersonate Thread" + "Inject Memory Page" + "Kill Process" + "Kill Thread" + "Kill Window" + "Listen on Port" + "Listen on Socket" + "Load Driver" + "Load Library" + "Load Module" + "Load and Call Driver" + "Lock File" + "Logon as User" + "Map File" + "Map Library" + "Map View of File" + "Modify File" + "Modify Named Pipe" + "Modify Process" + "Modify Registry Key" + "Modify Registry Key Value" + "Modify Service" + "Monitor Registry Key" + "Move File" + "Open File" + "Open File Mapping" + "Open Mutex" + "Open Port" + "Open Process" + "Open Registry Key" + "Open Service" + "Open Service Control Manager" + "Protect Virtual Memory" + "Query DNS" + "Query Disk Attributes" + "Query Process Virtual Memory" + "Queue APC in Thread" + "Read File" + "Read From Named Pipe" + "Read From Process Memory" + "Read Registry Key Value" + "Receive Data on Socket" + "Receive Email Message" + "Release Mutex" + "Rename File" + "Revert Thread to Self" + "Send Control Code to File" + "Send Control Code to Pipe" + "Send Control Code to Service" + "Send DNS Query" + "Send Data on Socket" + "Send Data to Address on Socket" + "Send Email Message" + "Send ICMP Request" + "Send Reverse DNS Query" + "Set File Attributes" + "Set NetBIOS Name" + "Set Process Current Directory" + "Set Process Environment Variable" + "Set System Global Flags" + "Set System Host Name" + "Set System Time" + "Set Thread Context" + "Show Window" + "Shutdown System" + "Sleep Process" + "Sleep System" + "Start Service" + "Unload Driver" + "Unload Module" + "Unlock File" + "Unmap File" + "Upload File" + "Write to File" + "Write to Process Virtual Memory" ) ; ] ; . @@ -291,13 +291,13 @@ vocabulary:ActionRelationshipTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Dependent_On"^^vocabulary:ActionRelationshipTypeVocab - "Equivalent_To"^^vocabulary:ActionRelationshipTypeVocab - "Followed_By"^^vocabulary:ActionRelationshipTypeVocab - "Initiated"^^vocabulary:ActionRelationshipTypeVocab - "Initiated_By"^^vocabulary:ActionRelationshipTypeVocab - "Preceded_By"^^vocabulary:ActionRelationshipTypeVocab - "Related_To"^^vocabulary:ActionRelationshipTypeVocab + "Dependent_On" + "Equivalent_To" + "Followed_By" + "Initiated" + "Initiated_By" + "Preceded_By" + "Related_To" ) ; ] ; . @@ -309,13 +309,13 @@ vocabulary:ActionStatusTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Complete/Finish"^^vocabulary:ActionStatusTypeVocab - "Error"^^vocabulary:ActionStatusTypeVocab - "Fail"^^vocabulary:ActionStatusTypeVocab - "Ongoing"^^vocabulary:ActionStatusTypeVocab - "Pending"^^vocabulary:ActionStatusTypeVocab - "Success"^^vocabulary:ActionStatusTypeVocab - "Unknown"^^vocabulary:ActionStatusTypeVocab + "Complete/Finish" + "Error" + "Fail" + "Ongoing" + "Pending" + "Success" + "Unknown" ) ; ] ; . @@ -327,117 +327,117 @@ vocabulary:ActionTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Accept"^^vocabulary:ActionTypeVocab - "Access"^^vocabulary:ActionTypeVocab - "Add"^^vocabulary:ActionTypeVocab - "Alert"^^vocabulary:ActionTypeVocab - "Allocate"^^vocabulary:ActionTypeVocab - "Archive"^^vocabulary:ActionTypeVocab - "Assign"^^vocabulary:ActionTypeVocab - "Audit"^^vocabulary:ActionTypeVocab - "Backup"^^vocabulary:ActionTypeVocab - "Bind"^^vocabulary:ActionTypeVocab - "Block"^^vocabulary:ActionTypeVocab - "Call"^^vocabulary:ActionTypeVocab - "Change"^^vocabulary:ActionTypeVocab - "Check"^^vocabulary:ActionTypeVocab - "Clean"^^vocabulary:ActionTypeVocab - "Click"^^vocabulary:ActionTypeVocab - "Close"^^vocabulary:ActionTypeVocab - "Compare"^^vocabulary:ActionTypeVocab - "Compress"^^vocabulary:ActionTypeVocab - "Configure"^^vocabulary:ActionTypeVocab - "Connect"^^vocabulary:ActionTypeVocab - "Control"^^vocabulary:ActionTypeVocab - "Copy/Duplicate"^^vocabulary:ActionTypeVocab - "Create"^^vocabulary:ActionTypeVocab - "Decode"^^vocabulary:ActionTypeVocab - "Decompress"^^vocabulary:ActionTypeVocab - "Decrypt"^^vocabulary:ActionTypeVocab - "Deny"^^vocabulary:ActionTypeVocab - "Depress"^^vocabulary:ActionTypeVocab - "Detect"^^vocabulary:ActionTypeVocab - "Disconnect"^^vocabulary:ActionTypeVocab - "Download"^^vocabulary:ActionTypeVocab - "Draw"^^vocabulary:ActionTypeVocab - "Drop"^^vocabulary:ActionTypeVocab - "Encode"^^vocabulary:ActionTypeVocab - "Encrypt"^^vocabulary:ActionTypeVocab - "Enumerate"^^vocabulary:ActionTypeVocab - "Execute"^^vocabulary:ActionTypeVocab - "Extract"^^vocabulary:ActionTypeVocab - "Filter"^^vocabulary:ActionTypeVocab - "Find"^^vocabulary:ActionTypeVocab - "Flush"^^vocabulary:ActionTypeVocab - "Fork"^^vocabulary:ActionTypeVocab - "Free"^^vocabulary:ActionTypeVocab - "Get"^^vocabulary:ActionTypeVocab - "Hide"^^vocabulary:ActionTypeVocab - "Hook"^^vocabulary:ActionTypeVocab - "Impersonate"^^vocabulary:ActionTypeVocab - "Initialize"^^vocabulary:ActionTypeVocab - "Inject"^^vocabulary:ActionTypeVocab - "Install"^^vocabulary:ActionTypeVocab - "Interleave"^^vocabulary:ActionTypeVocab - "Join"^^vocabulary:ActionTypeVocab - "Kill"^^vocabulary:ActionTypeVocab - "Listen"^^vocabulary:ActionTypeVocab - "Load"^^vocabulary:ActionTypeVocab - "Lock"^^vocabulary:ActionTypeVocab - "Login/Logon"^^vocabulary:ActionTypeVocab - "Logout/Logoff"^^vocabulary:ActionTypeVocab - "Map"^^vocabulary:ActionTypeVocab - "Merge"^^vocabulary:ActionTypeVocab - "Modify"^^vocabulary:ActionTypeVocab - "Monitor"^^vocabulary:ActionTypeVocab - "Move"^^vocabulary:ActionTypeVocab - "Open"^^vocabulary:ActionTypeVocab - "Pack"^^vocabulary:ActionTypeVocab - "Pause"^^vocabulary:ActionTypeVocab - "Press"^^vocabulary:ActionTypeVocab - "Protect"^^vocabulary:ActionTypeVocab - "Quarantine"^^vocabulary:ActionTypeVocab - "Query"^^vocabulary:ActionTypeVocab - "Queue"^^vocabulary:ActionTypeVocab - "Raise"^^vocabulary:ActionTypeVocab - "Read"^^vocabulary:ActionTypeVocab - "Receive"^^vocabulary:ActionTypeVocab - "Release"^^vocabulary:ActionTypeVocab - "Remove/Delete"^^vocabulary:ActionTypeVocab - "Rename"^^vocabulary:ActionTypeVocab - "Replicate"^^vocabulary:ActionTypeVocab - "Restore"^^vocabulary:ActionTypeVocab - "Resume"^^vocabulary:ActionTypeVocab - "Revert"^^vocabulary:ActionTypeVocab - "Run"^^vocabulary:ActionTypeVocab - "Save"^^vocabulary:ActionTypeVocab - "Scan"^^vocabulary:ActionTypeVocab - "Schedule"^^vocabulary:ActionTypeVocab - "Search"^^vocabulary:ActionTypeVocab - "Send"^^vocabulary:ActionTypeVocab - "Set"^^vocabulary:ActionTypeVocab - "Shutdown"^^vocabulary:ActionTypeVocab - "Sleep"^^vocabulary:ActionTypeVocab - "Snapshot"^^vocabulary:ActionTypeVocab - "Start"^^vocabulary:ActionTypeVocab - "Stop"^^vocabulary:ActionTypeVocab - "Suspend"^^vocabulary:ActionTypeVocab - "Synchronize"^^vocabulary:ActionTypeVocab - "Throw"^^vocabulary:ActionTypeVocab - "Transmit"^^vocabulary:ActionTypeVocab - "Unblock"^^vocabulary:ActionTypeVocab - "Unhide"^^vocabulary:ActionTypeVocab - "Unhook"^^vocabulary:ActionTypeVocab - "Uninstall"^^vocabulary:ActionTypeVocab - "Unload"^^vocabulary:ActionTypeVocab - "Unlock"^^vocabulary:ActionTypeVocab - "Unmap"^^vocabulary:ActionTypeVocab - "Unpack"^^vocabulary:ActionTypeVocab - "Update"^^vocabulary:ActionTypeVocab - "Upgrade"^^vocabulary:ActionTypeVocab - "Upload"^^vocabulary:ActionTypeVocab - "Wipe/Destroy/Purge"^^vocabulary:ActionTypeVocab - "Write"^^vocabulary:ActionTypeVocab + "Accept" + "Access" + "Add" + "Alert" + "Allocate" + "Archive" + "Assign" + "Audit" + "Backup" + "Bind" + "Block" + "Call" + "Change" + "Check" + "Clean" + "Click" + "Close" + "Compare" + "Compress" + "Configure" + "Connect" + "Control" + "Copy/Duplicate" + "Create" + "Decode" + "Decompress" + "Decrypt" + "Deny" + "Depress" + "Detect" + "Disconnect" + "Download" + "Draw" + "Drop" + "Encode" + "Encrypt" + "Enumerate" + "Execute" + "Extract" + "Filter" + "Find" + "Flush" + "Fork" + "Free" + "Get" + "Hide" + "Hook" + "Impersonate" + "Initialize" + "Inject" + "Install" + "Interleave" + "Join" + "Kill" + "Listen" + "Load" + "Lock" + "Login/Logon" + "Logout/Logoff" + "Map" + "Merge" + "Modify" + "Monitor" + "Move" + "Open" + "Pack" + "Pause" + "Press" + "Protect" + "Quarantine" + "Query" + "Queue" + "Raise" + "Read" + "Receive" + "Release" + "Remove/Delete" + "Rename" + "Replicate" + "Restore" + "Resume" + "Revert" + "Run" + "Save" + "Scan" + "Schedule" + "Search" + "Send" + "Set" + "Shutdown" + "Sleep" + "Snapshot" + "Start" + "Stop" + "Suspend" + "Synchronize" + "Throw" + "Transmit" + "Unblock" + "Unhide" + "Unhook" + "Uninstall" + "Unload" + "Unlock" + "Unmap" + "Unpack" + "Update" + "Upgrade" + "Upload" + "Wipe/Destroy/Purge" + "Write" ) ; ] ; . @@ -449,8 +449,8 @@ vocabulary:BitnessVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "32"^^vocabulary:BitnessVocab - "64"^^vocabulary:BitnessVocab + "32" + "64" ) ; ] ; . @@ -462,19 +462,19 @@ vocabulary:CharacterEncodingVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "ASCII"^^vocabulary:CharacterEncodingVocab - "UTF-16"^^vocabulary:CharacterEncodingVocab - "UTF-32"^^vocabulary:CharacterEncodingVocab - "UTF-8"^^vocabulary:CharacterEncodingVocab - "Windows-1250"^^vocabulary:CharacterEncodingVocab - "Windows-1251"^^vocabulary:CharacterEncodingVocab - "Windows-1252"^^vocabulary:CharacterEncodingVocab - "Windows-1253"^^vocabulary:CharacterEncodingVocab - "Windows-1254"^^vocabulary:CharacterEncodingVocab - "Windows-1255"^^vocabulary:CharacterEncodingVocab - "Windows-1256"^^vocabulary:CharacterEncodingVocab - "Windows-1257"^^vocabulary:CharacterEncodingVocab - "Windows-1258"^^vocabulary:CharacterEncodingVocab + "ASCII" + "UTF-16" + "UTF-32" + "UTF-8" + "Windows-1250" + "Windows-1251" + "Windows-1252" + "Windows-1253" + "Windows-1254" + "Windows-1255" + "Windows-1256" + "Windows-1257" + "Windows-1258" ) ; ] ; . @@ -486,9 +486,9 @@ vocabulary:ContactAddressScopeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "home"^^vocabulary:ContactAddressScopeVocab - "work"^^vocabulary:ContactAddressScopeVocab - "school"^^vocabulary:ContactAddressScopeVocab + "home" + "work" + "school" ) ; ] ; . @@ -500,10 +500,10 @@ vocabulary:ContactEmailScopeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "home"^^vocabulary:ContactEmailScopeVocab - "work"^^vocabulary:ContactEmailScopeVocab - "school"^^vocabulary:ContactEmailScopeVocab - "cloud"^^vocabulary:ContactEmailScopeVocab + "home" + "work" + "school" + "cloud" ) ; ] ; . @@ -515,14 +515,14 @@ vocabulary:ContactPhoneScopeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "home"^^vocabulary:ContactPhoneScopeVocab - "work"^^vocabulary:ContactPhoneScopeVocab - "school"^^vocabulary:ContactPhoneScopeVocab - "mobile"^^vocabulary:ContactPhoneScopeVocab - "main"^^vocabulary:ContactPhoneScopeVocab - "home fax"^^vocabulary:ContactPhoneScopeVocab - "work fax"^^vocabulary:ContactPhoneScopeVocab - "pager"^^vocabulary:ContactPhoneScopeVocab + "home" + "work" + "school" + "mobile" + "main" + "home fax" + "work fax" + "pager" ) ; ] ; . @@ -534,9 +534,9 @@ vocabulary:ContactSIPScopeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "home"^^vocabulary:ContactSIPScopeVocab - "work"^^vocabulary:ContactSIPScopeVocab - "school"^^vocabulary:ContactSIPScopeVocab + "home" + "work" + "school" ) ; ] ; . @@ -548,10 +548,10 @@ vocabulary:ContactURLScopeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "home"^^vocabulary:ContactURLScopeVocab - "work"^^vocabulary:ContactURLScopeVocab - "school"^^vocabulary:ContactURLScopeVocab - "homepage"^^vocabulary:ContactURLScopeVocab + "home" + "work" + "school" + "homepage" ) ; ] ; . @@ -563,11 +563,11 @@ vocabulary:DiskTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "CDRom"^^vocabulary:DiskTypeVocab - "Fixed"^^vocabulary:DiskTypeVocab - "RAMDisk"^^vocabulary:DiskTypeVocab - "Remote"^^vocabulary:DiskTypeVocab - "Removable"^^vocabulary:DiskTypeVocab + "CDRom" + "Fixed" + "RAMDisk" + "Remote" + "Removable" ) ; ] ; . @@ -579,9 +579,9 @@ vocabulary:EndiannessTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Big-endian"^^vocabulary:EndiannessTypeVocab - "Little-endian"^^vocabulary:EndiannessTypeVocab - "Middle-endian"^^vocabulary:EndiannessTypeVocab + "Big-endian" + "Little-endian" + "Middle-endian" ) ; ] ; . @@ -616,11 +616,11 @@ vocabulary:LibraryTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Dynamic"^^vocabulary:LibraryTypeVocab - "Other"^^vocabulary:LibraryTypeVocab - "Remote"^^vocabulary:LibraryTypeVocab - "Shared"^^vocabulary:LibraryTypeVocab - "Static"^^vocabulary:LibraryTypeVocab + "Dynamic" + "Other" + "Remote" + "Shared" + "Static" ) ; ] ; . @@ -632,11 +632,11 @@ vocabulary:MemoryBlockTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Bit-mapped"^^vocabulary:MemoryBlockTypeVocab - "Byte-mapped"^^vocabulary:MemoryBlockTypeVocab - "Initialized"^^vocabulary:MemoryBlockTypeVocab - "Overlay"^^vocabulary:MemoryBlockTypeVocab - "Uninitialized"^^vocabulary:MemoryBlockTypeVocab + "Bit-mapped" + "Byte-mapped" + "Initialized" + "Overlay" + "Uninitialized" ) ; ] ; . @@ -648,145 +648,145 @@ vocabulary:ObservableObjectRelationshipVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Allocated"^^vocabulary:ObservableObjectRelationshipVocab - "Allocated_By"^^vocabulary:ObservableObjectRelationshipVocab - "Attachment_Of"^^vocabulary:ObservableObjectRelationshipVocab - "Bound"^^vocabulary:ObservableObjectRelationshipVocab - "Bound_By"^^vocabulary:ObservableObjectRelationshipVocab - "Characterized_By"^^vocabulary:ObservableObjectRelationshipVocab - "Characterizes"^^vocabulary:ObservableObjectRelationshipVocab - "Child_Of"^^vocabulary:ObservableObjectRelationshipVocab - "Closed"^^vocabulary:ObservableObjectRelationshipVocab - "Closed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Compressed"^^vocabulary:ObservableObjectRelationshipVocab - "Compressed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Compressed_From"^^vocabulary:ObservableObjectRelationshipVocab - "Compressed_Into"^^vocabulary:ObservableObjectRelationshipVocab - "Connected_From"^^vocabulary:ObservableObjectRelationshipVocab - "Connected_To"^^vocabulary:ObservableObjectRelationshipVocab - "Contained_Within"^^vocabulary:ObservableObjectRelationshipVocab - "Contains"^^vocabulary:ObservableObjectRelationshipVocab - "Copied"^^vocabulary:ObservableObjectRelationshipVocab - "Copied_By"^^vocabulary:ObservableObjectRelationshipVocab - "Copied_From"^^vocabulary:ObservableObjectRelationshipVocab - "Copied_To"^^vocabulary:ObservableObjectRelationshipVocab - "Created"^^vocabulary:ObservableObjectRelationshipVocab - "Created_By"^^vocabulary:ObservableObjectRelationshipVocab - "Decoded"^^vocabulary:ObservableObjectRelationshipVocab - "Decoded_By"^^vocabulary:ObservableObjectRelationshipVocab - "Decompressed"^^vocabulary:ObservableObjectRelationshipVocab - "Decompressed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Decrypted"^^vocabulary:ObservableObjectRelationshipVocab - "Decrypted_By"^^vocabulary:ObservableObjectRelationshipVocab - "Deleted"^^vocabulary:ObservableObjectRelationshipVocab - "Deleted_By"^^vocabulary:ObservableObjectRelationshipVocab - "Deleted_From"^^vocabulary:ObservableObjectRelationshipVocab - "Downloaded"^^vocabulary:ObservableObjectRelationshipVocab - "Downloaded_By"^^vocabulary:ObservableObjectRelationshipVocab - "Downloaded_From"^^vocabulary:ObservableObjectRelationshipVocab - "Downloaded_To"^^vocabulary:ObservableObjectRelationshipVocab - "Dropped"^^vocabulary:ObservableObjectRelationshipVocab - "Dropped_By"^^vocabulary:ObservableObjectRelationshipVocab - "Encoded"^^vocabulary:ObservableObjectRelationshipVocab - "Encoded_By"^^vocabulary:ObservableObjectRelationshipVocab - "Encrypted"^^vocabulary:ObservableObjectRelationshipVocab - "Encrypted_By"^^vocabulary:ObservableObjectRelationshipVocab - "Encrypted_From"^^vocabulary:ObservableObjectRelationshipVocab - "Encrypted_To"^^vocabulary:ObservableObjectRelationshipVocab - "Extracted_From"^^vocabulary:ObservableObjectRelationshipVocab - "FQDN_Of"^^vocabulary:ObservableObjectRelationshipVocab - "Freed"^^vocabulary:ObservableObjectRelationshipVocab - "Freed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Had_Attachment"^^vocabulary:ObservableObjectRelationshipVocab - "Hooked"^^vocabulary:ObservableObjectRelationshipVocab - "Hooked_By"^^vocabulary:ObservableObjectRelationshipVocab - "Initialized_By"^^vocabulary:ObservableObjectRelationshipVocab - "Initialized_To"^^vocabulary:ObservableObjectRelationshipVocab - "Injected"^^vocabulary:ObservableObjectRelationshipVocab - "Injected_As"^^vocabulary:ObservableObjectRelationshipVocab - "Injected_By"^^vocabulary:ObservableObjectRelationshipVocab - "Injected_Into"^^vocabulary:ObservableObjectRelationshipVocab - "Installed"^^vocabulary:ObservableObjectRelationshipVocab - "Installed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Joined"^^vocabulary:ObservableObjectRelationshipVocab - "Joined_By"^^vocabulary:ObservableObjectRelationshipVocab - "Killed"^^vocabulary:ObservableObjectRelationshipVocab - "Killed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Listened_On"^^vocabulary:ObservableObjectRelationshipVocab - "Listened_On_By"^^vocabulary:ObservableObjectRelationshipVocab - "Loaded_From"^^vocabulary:ObservableObjectRelationshipVocab - "Loaded_Into"^^vocabulary:ObservableObjectRelationshipVocab - "Locked"^^vocabulary:ObservableObjectRelationshipVocab - "Locked_By"^^vocabulary:ObservableObjectRelationshipVocab - "Mapped_By"^^vocabulary:ObservableObjectRelationshipVocab - "Mapped_Into"^^vocabulary:ObservableObjectRelationshipVocab - "Merged"^^vocabulary:ObservableObjectRelationshipVocab - "Merged_By"^^vocabulary:ObservableObjectRelationshipVocab - "Modified_Properties_Of"^^vocabulary:ObservableObjectRelationshipVocab - "Monitored"^^vocabulary:ObservableObjectRelationshipVocab - "Monitored_By"^^vocabulary:ObservableObjectRelationshipVocab - "Moved"^^vocabulary:ObservableObjectRelationshipVocab - "Moved_By"^^vocabulary:ObservableObjectRelationshipVocab - "Moved_From"^^vocabulary:ObservableObjectRelationshipVocab - "Moved_To"^^vocabulary:ObservableObjectRelationshipVocab - "Opened"^^vocabulary:ObservableObjectRelationshipVocab - "Opened_By"^^vocabulary:ObservableObjectRelationshipVocab - "Packed"^^vocabulary:ObservableObjectRelationshipVocab - "Packed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Packed_From"^^vocabulary:ObservableObjectRelationshipVocab - "Packed_Into"^^vocabulary:ObservableObjectRelationshipVocab - "Parent_Of"^^vocabulary:ObservableObjectRelationshipVocab - "Paused"^^vocabulary:ObservableObjectRelationshipVocab - "Paused_By"^^vocabulary:ObservableObjectRelationshipVocab - "Previously_Contained"^^vocabulary:ObservableObjectRelationshipVocab - "Properties_Modified_By"^^vocabulary:ObservableObjectRelationshipVocab - "Properties_Queried"^^vocabulary:ObservableObjectRelationshipVocab - "Properties_Queried_By"^^vocabulary:ObservableObjectRelationshipVocab - "Read_From"^^vocabulary:ObservableObjectRelationshipVocab - "Read_From_By"^^vocabulary:ObservableObjectRelationshipVocab - "Received"^^vocabulary:ObservableObjectRelationshipVocab - "Received_By"^^vocabulary:ObservableObjectRelationshipVocab - "Received_From"^^vocabulary:ObservableObjectRelationshipVocab - "Received_Via_Upload"^^vocabulary:ObservableObjectRelationshipVocab - "Redirects_To"^^vocabulary:ObservableObjectRelationshipVocab - "Related_To"^^vocabulary:ObservableObjectRelationshipVocab - "Renamed"^^vocabulary:ObservableObjectRelationshipVocab - "Renamed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Renamed_From"^^vocabulary:ObservableObjectRelationshipVocab - "Renamed_To"^^vocabulary:ObservableObjectRelationshipVocab - "Resolved_To"^^vocabulary:ObservableObjectRelationshipVocab - "Resumed"^^vocabulary:ObservableObjectRelationshipVocab - "Resumed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Root_Domain_Of"^^vocabulary:ObservableObjectRelationshipVocab - "Searched_For"^^vocabulary:ObservableObjectRelationshipVocab - "Searched_For_By"^^vocabulary:ObservableObjectRelationshipVocab - "Sent"^^vocabulary:ObservableObjectRelationshipVocab - "Sent_By"^^vocabulary:ObservableObjectRelationshipVocab - "Sent_To"^^vocabulary:ObservableObjectRelationshipVocab - "Sent_Via_Upload"^^vocabulary:ObservableObjectRelationshipVocab - "Set_From"^^vocabulary:ObservableObjectRelationshipVocab - "Set_To"^^vocabulary:ObservableObjectRelationshipVocab - "Signed_By"^^vocabulary:ObservableObjectRelationshipVocab - "Sub-domain_Of"^^vocabulary:ObservableObjectRelationshipVocab - "Supra-domain_Of"^^vocabulary:ObservableObjectRelationshipVocab - "Suspended"^^vocabulary:ObservableObjectRelationshipVocab - "Suspended_By"^^vocabulary:ObservableObjectRelationshipVocab - "Unhooked"^^vocabulary:ObservableObjectRelationshipVocab - "Unhooked_By"^^vocabulary:ObservableObjectRelationshipVocab - "Unlocked"^^vocabulary:ObservableObjectRelationshipVocab - "Unlocked_By"^^vocabulary:ObservableObjectRelationshipVocab - "Unpacked"^^vocabulary:ObservableObjectRelationshipVocab - "Unpacked_By"^^vocabulary:ObservableObjectRelationshipVocab - "Uploaded"^^vocabulary:ObservableObjectRelationshipVocab - "Uploaded_By"^^vocabulary:ObservableObjectRelationshipVocab - "Uploaded_From"^^vocabulary:ObservableObjectRelationshipVocab - "Uploaded_To"^^vocabulary:ObservableObjectRelationshipVocab - "Used"^^vocabulary:ObservableObjectRelationshipVocab - "Used_By"^^vocabulary:ObservableObjectRelationshipVocab - "Values_Enumerated"^^vocabulary:ObservableObjectRelationshipVocab - "Values_Enumerated_By"^^vocabulary:ObservableObjectRelationshipVocab - "Written_To_By"^^vocabulary:ObservableObjectRelationshipVocab - "Wrote_To"^^vocabulary:ObservableObjectRelationshipVocab + "Allocated" + "Allocated_By" + "Attachment_Of" + "Bound" + "Bound_By" + "Characterized_By" + "Characterizes" + "Child_Of" + "Closed" + "Closed_By" + "Compressed" + "Compressed_By" + "Compressed_From" + "Compressed_Into" + "Connected_From" + "Connected_To" + "Contained_Within" + "Contains" + "Copied" + "Copied_By" + "Copied_From" + "Copied_To" + "Created" + "Created_By" + "Decoded" + "Decoded_By" + "Decompressed" + "Decompressed_By" + "Decrypted" + "Decrypted_By" + "Deleted" + "Deleted_By" + "Deleted_From" + "Downloaded" + "Downloaded_By" + "Downloaded_From" + "Downloaded_To" + "Dropped" + "Dropped_By" + "Encoded" + "Encoded_By" + "Encrypted" + "Encrypted_By" + "Encrypted_From" + "Encrypted_To" + "Extracted_From" + "FQDN_Of" + "Freed" + "Freed_By" + "Had_Attachment" + "Hooked" + "Hooked_By" + "Initialized_By" + "Initialized_To" + "Injected" + "Injected_As" + "Injected_By" + "Injected_Into" + "Installed" + "Installed_By" + "Joined" + "Joined_By" + "Killed" + "Killed_By" + "Listened_On" + "Listened_On_By" + "Loaded_From" + "Loaded_Into" + "Locked" + "Locked_By" + "Mapped_By" + "Mapped_Into" + "Merged" + "Merged_By" + "Modified_Properties_Of" + "Monitored" + "Monitored_By" + "Moved" + "Moved_By" + "Moved_From" + "Moved_To" + "Opened" + "Opened_By" + "Packed" + "Packed_By" + "Packed_From" + "Packed_Into" + "Parent_Of" + "Paused" + "Paused_By" + "Previously_Contained" + "Properties_Modified_By" + "Properties_Queried" + "Properties_Queried_By" + "Read_From" + "Read_From_By" + "Received" + "Received_By" + "Received_From" + "Received_Via_Upload" + "Redirects_To" + "Related_To" + "Renamed" + "Renamed_By" + "Renamed_From" + "Renamed_To" + "Resolved_To" + "Resumed" + "Resumed_By" + "Root_Domain_Of" + "Searched_For" + "Searched_For_By" + "Sent" + "Sent_By" + "Sent_To" + "Sent_Via_Upload" + "Set_From" + "Set_To" + "Signed_By" + "Sub-domain_Of" + "Supra-domain_Of" + "Suspended" + "Suspended_By" + "Unhooked" + "Unhooked_By" + "Unlocked" + "Unlocked_By" + "Unpacked" + "Unpacked_By" + "Uploaded" + "Uploaded_By" + "Uploaded_From" + "Uploaded_To" + "Used" + "Used_By" + "Values_Enumerated" + "Values_Enumerated_By" + "Written_To_By" + "Wrote_To" ) ; ] ; . @@ -798,16 +798,16 @@ vocabulary:ObservableObjectStateVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Active"^^vocabulary:ObservableObjectStateVocab - "Closed"^^vocabulary:ObservableObjectStateVocab - "Does Not Exist"^^vocabulary:ObservableObjectStateVocab - "Exists"^^vocabulary:ObservableObjectStateVocab - "Inactive"^^vocabulary:ObservableObjectStateVocab - "Locked"^^vocabulary:ObservableObjectStateVocab - "Open"^^vocabulary:ObservableObjectStateVocab - "Started"^^vocabulary:ObservableObjectStateVocab - "Stopped"^^vocabulary:ObservableObjectStateVocab - "Unlocked"^^vocabulary:ObservableObjectStateVocab + "Active" + "Closed" + "Does Not Exist" + "Exists" + "Inactive" + "Locked" + "Open" + "Started" + "Stopped" + "Unlocked" ) ; ] ; . @@ -819,25 +819,25 @@ vocabulary:PartitionTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "PARTITION_ENTRY_UNUSED"^^vocabulary:PartitionTypeVocab - "PARTITION_EXTENDED"^^vocabulary:PartitionTypeVocab - "PARTITION_FAT32"^^vocabulary:PartitionTypeVocab - "PARTITION_FAT32_XINT13"^^vocabulary:PartitionTypeVocab - "PARTITION_FAT_12"^^vocabulary:PartitionTypeVocab - "PARTITION_FAT_16"^^vocabulary:PartitionTypeVocab - "PARTITION_HUGE"^^vocabulary:PartitionTypeVocab - "PARTITION_IFS"^^vocabulary:PartitionTypeVocab - "PARTITION_LDM"^^vocabulary:PartitionTypeVocab - "PARTITION_NTFT"^^vocabulary:PartitionTypeVocab - "PARTITION_OS2BOOTMGR"^^vocabulary:PartitionTypeVocab - "PARTITION_PREP"^^vocabulary:PartitionTypeVocab - "PARTITION_UNIX"^^vocabulary:PartitionTypeVocab - "PARTITION_XENIX_1"^^vocabulary:PartitionTypeVocab - "PARTITION_XENIX_2"^^vocabulary:PartitionTypeVocab - "PARTITION_XINT13"^^vocabulary:PartitionTypeVocab - "PARTITION_XINT13_EXTENDED"^^vocabulary:PartitionTypeVocab - "UNKNOWN"^^vocabulary:PartitionTypeVocab - "VALID_NTFT"^^vocabulary:PartitionTypeVocab + "PARTITION_ENTRY_UNUSED" + "PARTITION_EXTENDED" + "PARTITION_FAT32" + "PARTITION_FAT32_XINT13" + "PARTITION_FAT_12" + "PARTITION_FAT_16" + "PARTITION_HUGE" + "PARTITION_IFS" + "PARTITION_LDM" + "PARTITION_NTFT" + "PARTITION_OS2BOOTMGR" + "PARTITION_PREP" + "PARTITION_UNIX" + "PARTITION_XENIX_1" + "PARTITION_XENIX_2" + "PARTITION_XINT13" + "PARTITION_XINT13_EXTENDED" + "UNKNOWN" + "VALID_NTFT" ) ; ] ; . @@ -849,18 +849,18 @@ vocabulary:ProcessorArchVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "ARM"^^vocabulary:ProcessorArchVocab - "Alpha"^^vocabulary:ProcessorArchVocab - "IA-64"^^vocabulary:ProcessorArchVocab - "MIPS"^^vocabulary:ProcessorArchVocab - "Motorola 68k"^^vocabulary:ProcessorArchVocab - "Other"^^vocabulary:ProcessorArchVocab - "PowerPC"^^vocabulary:ProcessorArchVocab - "SPARC"^^vocabulary:ProcessorArchVocab - "eSi-RISC"^^vocabulary:ProcessorArchVocab - "x86-32"^^vocabulary:ProcessorArchVocab - "x86-64"^^vocabulary:ProcessorArchVocab - "z/Architecture"^^vocabulary:ProcessorArchVocab + "ARM" + "Alpha" + "IA-64" + "MIPS" + "Motorola 68k" + "Other" + "PowerPC" + "SPARC" + "eSi-RISC" + "x86-32" + "x86-64" + "z/Architecture" ) ; ] ; . @@ -872,10 +872,10 @@ vocabulary:RecoveredObjectStatusVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "recovered"^^vocabulary:RecoveredObjectStatusVocab - "partially recovered"^^vocabulary:RecoveredObjectStatusVocab - "overwritten"^^vocabulary:RecoveredObjectStatusVocab - "unknown"^^vocabulary:RecoveredObjectStatusVocab + "recovered" + "partially recovered" + "overwritten" + "unknown" ) ; ] ; . @@ -887,11 +887,11 @@ vocabulary:RegionalRegistryTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "APNIC"^^vocabulary:RegionalRegistryTypeVocab - "ARIN"^^vocabulary:RegionalRegistryTypeVocab - "AfriNIC"^^vocabulary:RegionalRegistryTypeVocab - "LACNIC"^^vocabulary:RegionalRegistryTypeVocab - "RIPE NCC"^^vocabulary:RegionalRegistryTypeVocab + "APNIC" + "ARIN" + "AfriNIC" + "LACNIC" + "RIPE NCC" ) ; ] ; . @@ -902,19 +902,19 @@ vocabulary:RegistryDatatypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "reg_binary"^^vocabulary:RegistryDatatypeVocab - "reg_dword"^^vocabulary:RegistryDatatypeVocab - "reg_dword_big_endian"^^vocabulary:RegistryDatatypeVocab - "reg_expand_sz"^^vocabulary:RegistryDatatypeVocab - "reg_full_resource_descriptor"^^vocabulary:RegistryDatatypeVocab - "reg_invalid_type"^^vocabulary:RegistryDatatypeVocab - "reg_link"^^vocabulary:RegistryDatatypeVocab - "reg_multi_sz"^^vocabulary:RegistryDatatypeVocab - "reg_none"^^vocabulary:RegistryDatatypeVocab - "reg_qword"^^vocabulary:RegistryDatatypeVocab - "reg_resource_list"^^vocabulary:RegistryDatatypeVocab - "reg_resource_requirements_list"^^vocabulary:RegistryDatatypeVocab - "reg_sz"^^vocabulary:RegistryDatatypeVocab + "reg_binary" + "reg_dword" + "reg_dword_big_endian" + "reg_expand_sz" + "reg_full_resource_descriptor" + "reg_invalid_type" + "reg_link" + "reg_multi_sz" + "reg_none" + "reg_qword" + "reg_resource_list" + "reg_resource_requirements_list" + "reg_sz" ) ; ] ; . @@ -926,9 +926,9 @@ vocabulary:SIMFormVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Full-size SIM"^^vocabulary:SIMFormVocab - "Micro SIM"^^vocabulary:SIMFormVocab - "Nano SIM"^^vocabulary:SIMFormVocab + "Full-size SIM" + "Micro SIM" + "Nano SIM" ) ; ] ; . @@ -940,9 +940,9 @@ vocabulary:SIMTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "SIM"^^vocabulary:SIMTypeVocab - "UICC"^^vocabulary:SIMTypeVocab - "USIM"^^vocabulary:SIMTypeVocab + "SIM" + "UICC" + "USIM" ) ; ] ; . @@ -954,10 +954,10 @@ vocabulary:TaskActionTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "TASK_ACTION_COM_HANDLER"^^vocabulary:TaskActionTypeVocab - "TASK_ACTION_EXEC"^^vocabulary:TaskActionTypeVocab - "TASK_ACTION_SEND_EMAIL"^^vocabulary:TaskActionTypeVocab - "TASK_ACTION_SHOW_MESSAGE"^^vocabulary:TaskActionTypeVocab + "TASK_ACTION_COM_HANDLER" + "TASK_ACTION_EXEC" + "TASK_ACTION_SEND_EMAIL" + "TASK_ACTION_SHOW_MESSAGE" ) ; ] ; . @@ -969,19 +969,19 @@ vocabulary:TaskFlagVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "TASK_FLAG_DELETE_WHEN_DONE"^^vocabulary:TaskFlagVocab - "TASK_FLAG_DISABLED"^^vocabulary:TaskFlagVocab - "TASK_FLAG_DONT_START_IF_ON_BATTERIES"^^vocabulary:TaskFlagVocab - "TASK_FLAG_HIDDEN"^^vocabulary:TaskFlagVocab - "TASK_FLAG_INTERACTIVE"^^vocabulary:TaskFlagVocab - "TASK_FLAG_KILL_IF_GOING_ON_BATTERIES"^^vocabulary:TaskFlagVocab - "TASK_FLAG_KILL_ON_IDLE_END"^^vocabulary:TaskFlagVocab - "TASK_FLAG_RESTART_ON_IDLE_RESUME"^^vocabulary:TaskFlagVocab - "TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET"^^vocabulary:TaskFlagVocab - "TASK_FLAG_RUN_ONLY_IF_LOGGED_ON"^^vocabulary:TaskFlagVocab - "TASK_FLAG_START_ONLY_IF_IDLE"^^vocabulary:TaskFlagVocab - "TASK_FLAG_SYSTEM_REQUIRED"^^vocabulary:TaskFlagVocab - "TASK_FLAG_ZERO"^^vocabulary:TaskFlagVocab + "TASK_FLAG_DELETE_WHEN_DONE" + "TASK_FLAG_DISABLED" + "TASK_FLAG_DONT_START_IF_ON_BATTERIES" + "TASK_FLAG_HIDDEN" + "TASK_FLAG_INTERACTIVE" + "TASK_FLAG_KILL_IF_GOING_ON_BATTERIES" + "TASK_FLAG_KILL_ON_IDLE_END" + "TASK_FLAG_RESTART_ON_IDLE_RESUME" + "TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET" + "TASK_FLAG_RUN_ONLY_IF_LOGGED_ON" + "TASK_FLAG_START_ONLY_IF_IDLE" + "TASK_FLAG_SYSTEM_REQUIRED" + "TASK_FLAG_ZERO" ) ; ] ; . @@ -993,12 +993,12 @@ vocabulary:TaskPriorityVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "ABOVE_NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "BELOW_NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "HIGH_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "IDLE_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab - "REALTIME_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab + "ABOVE_NORMAL_PRIORITY_CLASS" + "BELOW_NORMAL_PRIORITY_CLASS" + "HIGH_PRIORITY_CLASS" + "IDLE_PRIORITY_CLASS" + "NORMAL_PRIORITY_CLASS" + "REALTIME_PRIORITY_CLASS" ) ; ] ; . @@ -1010,30 +1010,30 @@ vocabulary:TaskStatusVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "SCHED_E_ACCOUNT_DBASE_CORRUPT"^^vocabulary:TaskStatusVocab - "SCHED_E_ACCOUNT_INFORMATION_NOT_SET"^^vocabulary:TaskStatusVocab - "SCHED_E_ACCOUNT_NAME_NOT_FOUND"^^vocabulary:TaskStatusVocab - "SCHED_E_CANNOT_OPEN_TASK"^^vocabulary:TaskStatusVocab - "SCHED_E_INVALID_TASK"^^vocabulary:TaskStatusVocab - "SCHED_E_NO_SECURITY_SERVICES"^^vocabulary:TaskStatusVocab - "SCHED_E_SERVICE_NOT_INSTALLED"^^vocabulary:TaskStatusVocab - "SCHED_E_SERVICE_NOT_RUNNING"^^vocabulary:TaskStatusVocab - "SCHED_E_TASK_NOT_READY"^^vocabulary:TaskStatusVocab - "SCHED_E_TASK_NOT_RUNNING"^^vocabulary:TaskStatusVocab - "SCHED_E_TRIGGER_NOT_FOUND"^^vocabulary:TaskStatusVocab - "SCHED_E_UNKNOWN_OBJECT_VERSION"^^vocabulary:TaskStatusVocab - "SCHED_E_UNSUPPORTED_ACCOUNT_OPTION"^^vocabulary:TaskStatusVocab - "SCHED_S_EVENT_TRIGGER"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_DISABLED"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_HAS_NOT_RUN"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_NOT_SCHEDULED"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_NO_MORE_RUNS"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_NO_VALID_TRIGGERS"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_READY"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_RUNNING"^^vocabulary:TaskStatusVocab - "SCHED_S_TASK_TERMINATED"^^vocabulary:TaskStatusVocab - "TASK_STATE_QUEUED"^^vocabulary:TaskStatusVocab - "TASK_STATE_UNKNOWN"^^vocabulary:TaskStatusVocab + "SCHED_E_ACCOUNT_DBASE_CORRUPT" + "SCHED_E_ACCOUNT_INFORMATION_NOT_SET" + "SCHED_E_ACCOUNT_NAME_NOT_FOUND" + "SCHED_E_CANNOT_OPEN_TASK" + "SCHED_E_INVALID_TASK" + "SCHED_E_NO_SECURITY_SERVICES" + "SCHED_E_SERVICE_NOT_INSTALLED" + "SCHED_E_SERVICE_NOT_RUNNING" + "SCHED_E_TASK_NOT_READY" + "SCHED_E_TASK_NOT_RUNNING" + "SCHED_E_TRIGGER_NOT_FOUND" + "SCHED_E_UNKNOWN_OBJECT_VERSION" + "SCHED_E_UNSUPPORTED_ACCOUNT_OPTION" + "SCHED_S_EVENT_TRIGGER" + "SCHED_S_TASK_DISABLED" + "SCHED_S_TASK_HAS_NOT_RUN" + "SCHED_S_TASK_NOT_SCHEDULED" + "SCHED_S_TASK_NO_MORE_RUNS" + "SCHED_S_TASK_NO_VALID_TRIGGERS" + "SCHED_S_TASK_READY" + "SCHED_S_TASK_RUNNING" + "SCHED_S_TASK_TERMINATED" + "TASK_STATE_QUEUED" + "TASK_STATE_UNKNOWN" ) ; ] ; . @@ -1045,14 +1045,14 @@ vocabulary:ThreadRunningStatusVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Initialized"^^vocabulary:ThreadRunningStatusVocab - "Ready"^^vocabulary:ThreadRunningStatusVocab - "Running"^^vocabulary:ThreadRunningStatusVocab - "Standby"^^vocabulary:ThreadRunningStatusVocab - "Terminated"^^vocabulary:ThreadRunningStatusVocab - "Transition"^^vocabulary:ThreadRunningStatusVocab - "Unknown"^^vocabulary:ThreadRunningStatusVocab - "Waiting"^^vocabulary:ThreadRunningStatusVocab + "Initialized" + "Ready" + "Running" + "Standby" + "Terminated" + "Transition" + "Unknown" + "Waiting" ) ; ] ; . @@ -1064,12 +1064,12 @@ vocabulary:TimestampPrecisionVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "day"^^vocabulary:TimestampPrecisionVocab - "hour"^^vocabulary:TimestampPrecisionVocab - "minute"^^vocabulary:TimestampPrecisionVocab - "month"^^vocabulary:TimestampPrecisionVocab - "second"^^vocabulary:TimestampPrecisionVocab - "year"^^vocabulary:TimestampPrecisionVocab + "day" + "hour" + "minute" + "month" + "second" + "year" ) ; ] ; . @@ -1081,8 +1081,8 @@ vocabulary:TrendVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Decreasing"^^vocabulary:TrendVocab - "Increasing"^^vocabulary:TrendVocab + "Decreasing" + "Increasing" ) ; ] ; . @@ -1094,14 +1094,14 @@ vocabulary:TriggerFrequencyVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "TASK_EVENT_TRIGGER_AT_LOGON"^^vocabulary:TriggerFrequencyVocab - "TASK_EVENT_TRIGGER_AT_SYSTEMSTART"^^vocabulary:TriggerFrequencyVocab - "TASK_EVENT_TRIGGER_ON_IDLE"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_DAILY"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_MONTHLYDATE"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_MONTHLYDOW"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_ONCE"^^vocabulary:TriggerFrequencyVocab - "TASK_TIME_TRIGGER_WEEKLY"^^vocabulary:TriggerFrequencyVocab + "TASK_EVENT_TRIGGER_AT_LOGON" + "TASK_EVENT_TRIGGER_AT_SYSTEMSTART" + "TASK_EVENT_TRIGGER_ON_IDLE" + "TASK_TIME_TRIGGER_DAILY" + "TASK_TIME_TRIGGER_MONTHLYDATE" + "TASK_TIME_TRIGGER_MONTHLYDOW" + "TASK_TIME_TRIGGER_ONCE" + "TASK_TIME_TRIGGER_WEEKLY" ) ; ] ; . @@ -1113,13 +1113,13 @@ vocabulary:TriggerTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "TASK_TRIGGER_BOOT"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_EVENT"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_IDLE"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_LOGON"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_REGISTRATION"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_SESSION_STATE_CHANGE"^^vocabulary:TriggerTypeVocab - "TASK_TRIGGER_TIME"^^vocabulary:TriggerTypeVocab + "TASK_TRIGGER_BOOT" + "TASK_TRIGGER_EVENT" + "TASK_TRIGGER_IDLE" + "TASK_TRIGGER_LOGON" + "TASK_TRIGGER_REGISTRATION" + "TASK_TRIGGER_SESSION_STATE_CHANGE" + "TASK_TRIGGER_TIME" ) ; ] ; . @@ -1131,17 +1131,17 @@ vocabulary:URLTransitionTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "link"^^vocabulary:URLTransitionTypeVocab - "typed"^^vocabulary:URLTransitionTypeVocab - "auto_bookmark"^^vocabulary:URLTransitionTypeVocab - "auto_subframe"^^vocabulary:URLTransitionTypeVocab - "manual_subframe"^^vocabulary:URLTransitionTypeVocab - "generated"^^vocabulary:URLTransitionTypeVocab - "auto_toplevel"^^vocabulary:URLTransitionTypeVocab - "form_submit"^^vocabulary:URLTransitionTypeVocab - "reload"^^vocabulary:URLTransitionTypeVocab - "keyword"^^vocabulary:URLTransitionTypeVocab - "keyword_generated"^^vocabulary:URLTransitionTypeVocab + "link" + "typed" + "auto_bookmark" + "auto_subframe" + "manual_subframe" + "generated" + "auto_toplevel" + "form_submit" + "reload" + "keyword" + "keyword_generated" ) ; ] ; . @@ -1153,13 +1153,13 @@ vocabulary:UnixProcessStateVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Dead"^^vocabulary:UnixProcessStateVocab - "InterruptibleSleep"^^vocabulary:UnixProcessStateVocab - "Paging"^^vocabulary:UnixProcessStateVocab - "Running"^^vocabulary:UnixProcessStateVocab - "Stopped"^^vocabulary:UnixProcessStateVocab - "UninterruptibleSleep"^^vocabulary:UnixProcessStateVocab - "Zombie"^^vocabulary:UnixProcessStateVocab + "Dead" + "InterruptibleSleep" + "Paging" + "Running" + "Stopped" + "UninterruptibleSleep" + "Zombie" ) ; ] ; . @@ -1171,9 +1171,9 @@ vocabulary:WhoisContactTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "ADMIN"^^vocabulary:WhoisContactTypeVocab - "BILLING"^^vocabulary:WhoisContactTypeVocab - "TECHNICAL"^^vocabulary:WhoisContactTypeVocab + "ADMIN" + "BILLING" + "TECHNICAL" ) ; ] ; . @@ -1185,8 +1185,8 @@ vocabulary:WhoisDNSSECTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Signed"^^vocabulary:WhoisDNSSECTypeVocab - "Unsigned"^^vocabulary:WhoisDNSSECTypeVocab + "Signed" + "Unsigned" ) ; ] ; . @@ -1198,25 +1198,25 @@ vocabulary:WhoisStatusTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "ADD_PERIOD"^^vocabulary:WhoisStatusTypeVocab - "AUTO_RENEW_PERIOD"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_DELETE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_HOLD"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_RENEW_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_TRANSFER_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "CLIENT_UPDATE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "DELETE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "HOLD"^^vocabulary:WhoisStatusTypeVocab - "INACTIVE"^^vocabulary:WhoisStatusTypeVocab - "OK"^^vocabulary:WhoisStatusTypeVocab - "PENDING_DELETE_RESTORABLE"^^vocabulary:WhoisStatusTypeVocab - "PENDING_DELETE_SCHEDULED_FOR_RELEASE"^^vocabulary:WhoisStatusTypeVocab - "PENDING_RESTORE"^^vocabulary:WhoisStatusTypeVocab - "RENEW_PERIOD"^^vocabulary:WhoisStatusTypeVocab - "RENEW_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "TRANSFER_PERIOD"^^vocabulary:WhoisStatusTypeVocab - "TRANSFER_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab - "UPDATE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab + "ADD_PERIOD" + "AUTO_RENEW_PERIOD" + "CLIENT_DELETE_PROHIBITED" + "CLIENT_HOLD" + "CLIENT_RENEW_PROHIBITED" + "CLIENT_TRANSFER_PROHIBITED" + "CLIENT_UPDATE_PROHIBITED" + "DELETE_PROHIBITED" + "HOLD" + "INACTIVE" + "OK" + "PENDING_DELETE_RESTORABLE" + "PENDING_DELETE_SCHEDULED_FOR_RELEASE" + "PENDING_RESTORE" + "RENEW_PERIOD" + "RENEW_PROHIBITED" + "TRANSFER_PERIOD" + "TRANSFER_PROHIBITED" + "UPDATE_PROHIBITED" ) ; ] ; . @@ -1228,13 +1228,13 @@ vocabulary:WindowsDriveTypeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "DRIVE_CDROM"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_FIXED"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_NO_ROOT_DIR"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_RAMDISK"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_REMOTE"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_REMOVABLE"^^vocabulary:WindowsDriveTypeVocab - "DRIVE_UNKNOWN"^^vocabulary:WindowsDriveTypeVocab + "DRIVE_CDROM" + "DRIVE_FIXED" + "DRIVE_NO_ROOT_DIR" + "DRIVE_RAMDISK" + "DRIVE_REMOTE" + "DRIVE_REMOVABLE" + "DRIVE_UNKNOWN" ) ; ] ; . @@ -1246,10 +1246,10 @@ vocabulary:WindowsVolumeAttributeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "Hidden"^^vocabulary:WindowsVolumeAttributeVocab - "NoDefaultDriveLetter"^^vocabulary:WindowsVolumeAttributeVocab - "ReadOnly"^^vocabulary:WindowsVolumeAttributeVocab - "ShadowCopy"^^vocabulary:WindowsVolumeAttributeVocab + "Hidden" + "NoDefaultDriveLetter" + "ReadOnly" + "ShadowCopy" ) ; ] ; . @@ -1261,13 +1261,13 @@ vocabulary:WirelessNetworkSecurityModeVocab owl:equivalentClass [ a rdfs:Datatype ; owl:oneOf ( - "None"^^vocabulary:WirelessNetworkSecurityModeVocab - "WEP"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA2-PSK"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA2-Enterprise"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA3-PSK"^^vocabulary:WirelessNetworkSecurityModeVocab - "WPA3-Enterprise"^^vocabulary:WirelessNetworkSecurityModeVocab + "None" + "WEP" + "WPA" + "WPA2-PSK" + "WPA2-Enterprise" + "WPA3-PSK" + "WPA3-Enterprise" ) ; ] ; . diff --git a/tests/examples/action_inheritance_PASS.json b/tests/examples/action_inheritance_PASS.json index 2aa82c15..4312558d 100644 --- a/tests/examples/action_inheritance_PASS.json +++ b/tests/examples/action_inheritance_PASS.json @@ -18,19 +18,13 @@ "@id": "kb:action-90d02552-333f-49d0-9ca6-2a7004adffef", "@type": "action:Action", "core:name": "Modify File", - "action:actionStatus": { - "@type": "vocabulary:ActionStatusTypeVocab", - "@value": "Pending" - } + "action:actionStatus": "Pending" }, { "@id": "kb:action-b4bd127d-489a-41b1-8395-95204e12c8c9", "@type": "action:Action", "core:name": "Save File", - "action:actionStatus": { - "@type": "vocabulary:ActionStatusTypeVocab", - "@value": "Pending" - } + "action:actionStatus": "Pending" }, { "@id": "kb:action-lifecycle-63af1a39-22b6-45d6-a591-eede74657b68", diff --git a/tests/examples/hash_PASS.json b/tests/examples/hash_PASS.json index 753470f1..228d3355 100644 --- a/tests/examples/hash_PASS.json +++ b/tests/examples/hash_PASS.json @@ -30,7 +30,7 @@ { "@id": "kb:hash-b7eca8de-142d-4aa9-b546-0796a268afa4", "@type": "types:Hash", - "rdfs:comment": "Should trigger an sh:Info from the hashMethod value not having its (literal-)value in the HashNameVocab vocabulary, and also not being an xsd:string.", + "rdfs:comment": "Should trigger an sh:Info from the hashMethod value not having its (literal-)value in the HashNameVocab vocabulary, and also a sh:Warning from not being an xsd:string.", "types:hashMethod": { "@type": "vocabulary:HashNameVocab", "@value": "SHA1" @@ -43,7 +43,7 @@ { "@id": "kb:hash-f46c714f-559a-4325-bf8a-4ef60c92c771", "@type": "types:Hash", - "rdfs:comment": "This should trigger an sh:Warning from the hashMethod value not being a string, and not being in the HashNameVocab vocabulary.", + "rdfs:comment": "This should trigger an sh:Warning from the hashMethod value not being a string, and an sh:Info from not being in the HashNameVocab vocabulary. (The warning from not being a string is a relaxation from an error, enacted between UCO 1.3.0 and 1.4.0. It will again be an error in UCO 2.0.0.)", "types:hashMethod": 1, "types:hashValue": { "@type": "xsd:hexBinary", diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 6d93ed8a..b8f051e0 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -290,11 +290,11 @@ def test_hash_PASS() -> None: "hash_PASS_validation.ttl", True, expected_focus_node_severities={ - ('http://example.org/kb/hash-04dcd1dc-6920-4977-a898-e242870249a4', str(NS_SH.Info)), - ('http://example.org/kb/hash-af4b0c85-b042-4e2d-a213-210b3d7f115c', str(NS_SH.Info)), - ('http://example.org/kb/hash-b7eca8de-142d-4aa9-b546-0796a268afa4', str(NS_SH.Info)), + ("http://example.org/kb/hash-04dcd1dc-6920-4977-a898-e242870249a4", str(NS_SH.Info)), + ("http://example.org/kb/hash-af4b0c85-b042-4e2d-a213-210b3d7f115c", str(NS_SH.Info)), + ("http://example.org/kb/hash-b7eca8de-142d-4aa9-b546-0796a268afa4", str(NS_SH.Info)), ("http://example.org/kb/hash-b7eca8de-142d-4aa9-b546-0796a268afa4", str(NS_SH.Warning)), - ('http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771', str(NS_SH.Info)), + ("http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771", str(NS_SH.Info)), ("http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771", str(NS_SH.Warning)), } ) From e6decb6f6db604ea106d52365105663df282f0a7 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 18 Feb 2025 17:09:53 -0500 Subject: [PATCH 54/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- .../action_inheritance_PASS_validation.ttl | 17 ++++-- .../action_inheritance_XFAIL_validation.ttl | 61 ------------------- 2 files changed, 12 insertions(+), 66 deletions(-) diff --git a/tests/examples/action_inheritance_PASS_validation.ttl b/tests/examples/action_inheritance_PASS_validation.ttl index 0a2a7b0b..b121487c 100644 --- a/tests/examples/action_inheritance_PASS_validation.ttl +++ b/tests/examples/action_inheritance_PASS_validation.ttl @@ -3,7 +3,6 @@ @prefix rdf: . @prefix rdfs: . @prefix sh: . -@prefix vocabulary: . @prefix xsd: . [] @@ -12,13 +11,21 @@ sh:result [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage "Value is outside the default vocabulary ActionStatusTypeVocab." ; + sh:resultMessage "Value is not member of the vocabulary ActionStatusTypeVocab." ; sh:resultPath action:actionStatus ; sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceConstraintComponent sh:InConstraintComponent ; sh:sourceShape [ - sh:datatype vocabulary:ActionStatusTypeVocab ; - sh:message "Value is outside the default vocabulary ActionStatusTypeVocab." ; + sh:in ( + "Complete/Finish" + "Error" + "Fail" + "Ongoing" + "Pending" + "Success" + "Unknown" + ) ; + sh:message "Value is not member of the vocabulary ActionStatusTypeVocab." ; sh:path action:actionStatus ; sh:severity sh:Info ; ] ; diff --git a/tests/examples/action_inheritance_XFAIL_validation.ttl b/tests/examples/action_inheritance_XFAIL_validation.ttl index fb8277fe..8d239b77 100644 --- a/tests/examples/action_inheritance_XFAIL_validation.ttl +++ b/tests/examples/action_inheritance_XFAIL_validation.ttl @@ -3,58 +3,12 @@ @prefix rdf: . @prefix rdfs: . @prefix sh: . -@prefix vocabulary: . @prefix xsd: . [] a sh:ValidationReport ; sh:conforms "false"^^xsd:boolean ; sh:result - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is outside the default vocabulary ActionStatusTypeVocab." ; - sh:resultPath action:actionStatus ; - sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - sh:datatype vocabulary:ActionStatusTypeVocab ; - sh:message "Value is outside the default vocabulary ActionStatusTypeVocab." ; - sh:path action:actionStatus ; - sh:severity sh:Info ; - ] ; - sh:value "Pending" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is outside the default vocabulary ActionStatusTypeVocab." ; - sh:resultPath action:actionStatus ; - sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - sh:datatype vocabulary:ActionStatusTypeVocab ; - sh:message "Value is outside the default vocabulary ActionStatusTypeVocab." ; - sh:path action:actionStatus ; - sh:severity sh:Info ; - ] ; - sh:value "Pending" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is outside the default vocabulary ActionStatusTypeVocab." ; - sh:resultPath action:actionStatus ; - sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - sh:datatype vocabulary:ActionStatusTypeVocab ; - sh:message "Value is outside the default vocabulary ActionStatusTypeVocab." ; - sh:path action:actionStatus ; - sh:severity sh:Info ; - ] ; - sh:value "Pending" ; - ] , [ a sh:ValidationResult ; sh:focusNode ; @@ -67,21 +21,6 @@ sh:path action:actionStatus ; ] ; ] , - [ - a sh:ValidationResult ; - sh:focusNode ; - sh:resultMessage "Value is outside the default vocabulary ActionStatusTypeVocab." ; - sh:resultPath action:actionStatus ; - sh:resultSeverity sh:Info ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - sh:datatype vocabulary:ActionStatusTypeVocab ; - sh:message "Value is outside the default vocabulary ActionStatusTypeVocab." ; - sh:path action:actionStatus ; - sh:severity sh:Info ; - ] ; - sh:value "Pending" ; - ] , [ a sh:ValidationResult ; sh:focusNode ; From 5ded2590677145b22f06812f2591963bbc842b40 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 26 Feb 2025 10:54:48 -0500 Subject: [PATCH 55/61] Move sh:in review to named PropertyShapes This patch introduces a name scheme that does not align with a previous occurrence of this export, `observable:regionalInternetRegistry-shape-value-not-vocabulary-member`. This patch also does not apply the exporting pattern to `core:objectStatus`, because in that case the vocabulary is closed. A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- ontology/uco/action/action.ttl | 52 +- ontology/uco/observable/observable.ttl | 704 ++++++++++++++----------- ontology/uco/types/types.ttl | 41 +- 3 files changed, 436 insertions(+), 361 deletions(-) diff --git a/ontology/uco/action/action.ttl b/ontology/uco/action/action.ttl index 7f868aae..1d6d4b1e 100644 --- a/ontology/uco/action/action.ttl +++ b/ontology/uco/action/action.ttl @@ -42,6 +42,7 @@ action:Action rdfs:comment "An action is something that may be done or performed."@en ; owl:disjointWith core:Event ; sh:property + action:Action-actionStatus-in-shape , [ sh:class action:Action ; sh:nodeKind sh:IRI ; @@ -113,20 +114,6 @@ action:Action sh:path action:actionStatus ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "Complete/Finish" - "Error" - "Fail" - "Ongoing" - "Pending" - "Success" - "Unknown" - ) ; - sh:message "Value is not member of the vocabulary ActionStatusTypeVocab." ; - sh:path action:actionStatus ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -136,6 +123,22 @@ action:Action sh:targetClass action:Action ; . +action:Action-actionStatus-in-shape + a sh:PropertyShape ; + sh:in ( + "Complete/Finish" + "Error" + "Fail" + "Ongoing" + "Pending" + "Success" + "Unknown" + ) ; + sh:message "Value is not member of the vocabulary ActionStatusTypeVocab." ; + sh:path action:actionStatus ; + sh:severity sh:Info ; + . + action:Action-disjointWith-Event-shape a sh:NodeShape ; sh:message "action:Action and core:Event are disjoint classes."@en ; @@ -219,6 +222,7 @@ action:ActionFrequencyFacet rdfs:label "ActionFrequencyFacet"@en ; rdfs:comment "An action frequency facet is a grouping of characteristics unique to the frequency of occurrence for an action."@en ; sh:property + action:ActionFrequencyFacet-trend-in-shape , [ sh:datatype xsd:decimal ; sh:maxCount "1"^^xsd:integer ; @@ -246,15 +250,6 @@ action:ActionFrequencyFacet sh:path action:trend ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "Decreasing" - "Increasing" - ) ; - sh:message "Value is not member of the vocabulary TrendVocab." ; - sh:path action:trend ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; @@ -265,6 +260,17 @@ action:ActionFrequencyFacet sh:targetClass action:ActionFrequencyFacet ; . +action:ActionFrequencyFacet-trend-in-shape + a sh:PropertyShape ; + sh:in ( + "Decreasing" + "Increasing" + ) ; + sh:message "Value is not member of the vocabulary TrendVocab." ; + sh:path action:trend ; + sh:severity sh:Info ; + . + action:ActionLifecycle a owl:Class , diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 0aa8be12..634b7f6b 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -122,6 +122,7 @@ observable:AccountFacet rdfs:label "AccountFacet"@en ; rdfs:comment "An account facet is a grouping of characteristics unique to an arrangement with an entity to enable and control the provision of some capability or service."@en ; sh:property + observable:AccountFacet-accountType-in-shape , [ sh:class core:UcoObject ; sh:maxCount "1"^^xsd:integer ; @@ -170,21 +171,6 @@ observable:AccountFacet sh:path observable:accountType ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "ldap" - "nis" - "openid" - "radius" - "tacacs" - "unix" - "windows_domain" - "windows_local" - ) ; - sh:message "Value is not member of the vocabulary AccountTypeVocab." ; - sh:path observable:accountType ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -194,6 +180,23 @@ observable:AccountFacet sh:targetClass observable:AccountFacet ; . +observable:AccountFacet-accountType-in-shape + a sh:PropertyShape ; + sh:in ( + "ldap" + "nis" + "openid" + "radius" + "tacacs" + "unix" + "windows_domain" + "windows_local" + ) ; + sh:message "Value is not member of the vocabulary AccountTypeVocab." ; + sh:path observable:accountType ; + sh:severity sh:Info ; + . + observable:Adaptor a owl:Class , @@ -1414,6 +1417,7 @@ observable:ContactAddress rdfs:label "ContactAddress"@en ; rdfs:comment "A contact address is a grouping of characteristics unique to a geolocation address of a contact entity."@en ; sh:property + observable:ContactAddress-contactAddressScope-in-shape , [ sh:class location:Location ; sh:maxCount "1"^^xsd:integer ; @@ -1426,16 +1430,6 @@ observable:ContactAddress sh:path observable:contactAddressScope ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "home" - "work" - "school" - ) ; - sh:message "Value is not member of the vocabulary ContactAddressScopeVocab." ; - sh:path observable:contactAddressScope ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -1445,6 +1439,18 @@ observable:ContactAddress sh:targetClass observable:ContactAddress ; . +observable:ContactAddress-contactAddressScope-in-shape + a sh:PropertyShape ; + sh:in ( + "home" + "work" + "school" + ) ; + sh:message "Value is not member of the vocabulary ContactAddressScopeVocab." ; + sh:path observable:contactAddressScope ; + sh:severity sh:Info ; + . + observable:ContactAffiliation a owl:Class , @@ -1521,6 +1527,7 @@ observable:ContactEmail rdfs:label "ContactEmail"@en ; rdfs:comment "A contact email is a grouping of characteristics unique to details for contacting a contact entity by email."@en ; sh:property + observable:ContactEmail-contactEmailScope-in-shape , [ sh:class observable:ObservableObject ; sh:maxCount "1"^^xsd:integer ; @@ -1533,17 +1540,6 @@ observable:ContactEmail sh:path observable:contactEmailScope ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "home" - "work" - "school" - "cloud" - ) ; - sh:message "Value is not member of the vocabulary ContactEmailScopeVocab." ; - sh:path observable:contactEmailScope ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -1553,6 +1549,19 @@ observable:ContactEmail sh:targetClass observable:ContactEmail ; . +observable:ContactEmail-contactEmailScope-in-shape + a sh:PropertyShape ; + sh:in ( + "home" + "work" + "school" + "cloud" + ) ; + sh:message "Value is not member of the vocabulary ContactEmailScopeVocab." ; + sh:path observable:contactEmailScope ; + sh:severity sh:Info ; + . + observable:ContactFacet a owl:Class , @@ -1773,6 +1782,7 @@ observable:ContactPhone rdfs:label "ContactPhone"@en ; rdfs:comment "A contact phone is a grouping of characteristics unique to details for contacting a contact entity by telephone."@en ; sh:property + observable:ContactPhone-contactPhoneScope-in-shape , [ sh:class observable:ObservableObject ; sh:maxCount "1"^^xsd:integer ; @@ -1785,21 +1795,6 @@ observable:ContactPhone sh:path observable:contactPhoneScope ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "home" - "work" - "school" - "mobile" - "main" - "home fax" - "work fax" - "pager" - ) ; - sh:message "Value is not member of the vocabulary ContactPhoneScopeVocab." ; - sh:path observable:contactPhoneScope ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -1809,6 +1804,23 @@ observable:ContactPhone sh:targetClass observable:ContactPhone ; . +observable:ContactPhone-contactPhoneScope-in-shape + a sh:PropertyShape ; + sh:in ( + "home" + "work" + "school" + "mobile" + "main" + "home fax" + "work fax" + "pager" + ) ; + sh:message "Value is not member of the vocabulary ContactPhoneScopeVocab." ; + sh:path observable:contactPhoneScope ; + sh:severity sh:Info ; + . + observable:ContactProfile a owl:Class , @@ -1843,6 +1855,7 @@ observable:ContactSIP rdfs:label "ContactSIP"@en ; rdfs:comment "A contact SIP is a grouping of characteristics unique to details for contacting a contact entity by Session Initiation Protocol (SIP)."@en ; sh:property + observable:ContactSIP-contactSIPScope-in-shape , [ sh:class observable:ObservableObject ; sh:maxCount "1"^^xsd:integer ; @@ -1855,16 +1868,6 @@ observable:ContactSIP sh:path observable:contactSIPScope ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "home" - "work" - "school" - ) ; - sh:message "Value is not member of the vocabulary ContactSIPScopeVocab." ; - sh:path observable:contactSIPScope ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -1874,6 +1877,18 @@ observable:ContactSIP sh:targetClass observable:ContactSIP ; . +observable:ContactSIP-contactSIPScope-in-shape + a sh:PropertyShape ; + sh:in ( + "home" + "work" + "school" + ) ; + sh:message "Value is not member of the vocabulary ContactSIPScopeVocab." ; + sh:path observable:contactSIPScope ; + sh:severity sh:Info ; + . + observable:ContactURL a owl:Class , @@ -1883,6 +1898,7 @@ observable:ContactURL rdfs:label "ContactURL"@en ; rdfs:comment "A contact URL is a grouping of characteristics unique to details for contacting a contact entity by Uniform Resource Locator (URL)."@en ; sh:property + observable:ContactURL-contactURLScope-in-shape , [ sh:class observable:ObservableObject ; sh:maxCount "1"^^xsd:integer ; @@ -1895,17 +1911,6 @@ observable:ContactURL sh:path observable:contactURLScope ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "home" - "work" - "school" - "homepage" - ) ; - sh:message "Value is not member of the vocabulary ContactURLScopeVocab." ; - sh:path observable:contactURLScope ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -1915,6 +1920,19 @@ observable:ContactURL sh:targetClass observable:ContactURL ; . +observable:ContactURL-contactURLScope-in-shape + a sh:PropertyShape ; + sh:in ( + "home" + "work" + "school" + "homepage" + ) ; + sh:message "Value is not member of the vocabulary ContactURLScopeVocab." ; + sh:path observable:contactURLScope ; + sh:severity sh:Info ; + . + observable:ContentData a owl:Class , @@ -1935,6 +1953,7 @@ observable:ContentDataFacet rdfs:label "ContentDataFacet"@en ; rdfs:comment "A content data facet is a grouping of characteristics unique to a block of digital data."@en ; sh:property + observable:ContentDataFacet-byteOrder-in-shape , [ sh:class observable:ObservableObject ; sh:maxCount "1"^^xsd:integer ; @@ -1993,16 +2012,6 @@ observable:ContentDataFacet sh:nodeKind sh:Literal ; sh:path observable:mimeType ; ] , - [ - sh:in ( - "Big-endian" - "Little-endian" - "Middle-endian" - ) ; - sh:message "Value is not member of the vocabulary EndiannessTypeVocab." ; - sh:path observable:byteOrder ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -2012,6 +2021,18 @@ observable:ContentDataFacet sh:targetClass observable:ContentDataFacet ; . +observable:ContentDataFacet-byteOrder-in-shape + a sh:PropertyShape ; + sh:in ( + "Big-endian" + "Little-endian" + "Middle-endian" + ) ; + sh:message "Value is not member of the vocabulary EndiannessTypeVocab." ; + sh:path observable:byteOrder ; + sh:severity sh:Info ; + . + observable:CookieHistory a owl:Class , @@ -3961,6 +3982,7 @@ observable:MemoryFacet rdfs:label "MemoryFacet"@en ; rdfs:comment "A memory facet is a grouping of characteristics unique to a particular region of temporary information storage (e.g., RAM (random access memory), ROM (read only memory)) on a digital device."@en ; sh:property + observable:MemoryFacet-blockType-in-shape , [ sh:datatype xsd:boolean ; sh:maxCount "1"^^xsd:integer ; @@ -4007,18 +4029,6 @@ observable:MemoryFacet sh:path observable:blockType ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "Bit-mapped" - "Byte-mapped" - "Initialized" - "Overlay" - "Uninitialized" - ) ; - sh:message "Value is not member of the vocabulary MemoryBlockTypeVocab." ; - sh:path observable:blockType ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -4028,6 +4038,20 @@ observable:MemoryFacet sh:targetClass observable:MemoryFacet ; . +observable:MemoryFacet-blockType-in-shape + a sh:PropertyShape ; + sh:in ( + "Bit-mapped" + "Byte-mapped" + "Initialized" + "Overlay" + "Uninitialized" + ) ; + sh:message "Value is not member of the vocabulary MemoryBlockTypeVocab." ; + sh:path observable:blockType ; + sh:severity sh:Info ; + . + observable:Message a owl:Class , @@ -5620,6 +5644,9 @@ observable:RecoveredObjectFacet rdfs:label "RecoveredObjectFacet"@en ; rdfs:comment "Recoverability status of name, metadata, and content."@en ; sh:property + observable:RecoveredObjectFacet-contentRecoveredStatus-in-shape , + observable:RecoveredObjectFacet-metadataRecoveredStatus-in-shape , + observable:RecoveredObjectFacet-nameRecoveredStatus-in-shape , [ sh:datatype xsd:string ; sh:message "As of UCO 1.4.0, the datatype to use for observable:contentRecoveredStatus should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; @@ -5638,39 +5665,6 @@ observable:RecoveredObjectFacet sh:path observable:nameRecoveredStatus ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "recovered" - "partially recovered" - "overwritten" - "unknown" - ) ; - sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; - sh:path observable:nameRecoveredStatus ; - sh:severity sh:Info ; - ] , - [ - sh:in ( - "recovered" - "partially recovered" - "overwritten" - "unknown" - ) ; - sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; - sh:path observable:metadataRecoveredStatus ; - sh:severity sh:Info ; - ] , - [ - sh:in ( - "recovered" - "partially recovered" - "overwritten" - "unknown" - ) ; - sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; - sh:path observable:contentRecoveredStatus ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -5690,6 +5684,45 @@ observable:RecoveredObjectFacet sh:targetClass observable:RecoveredObjectFacet ; . +observable:RecoveredObjectFacet-contentRecoveredStatus-in-shape + a sh:PropertyShape ; + sh:in ( + "recovered" + "partially recovered" + "overwritten" + "unknown" + ) ; + sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; + sh:path observable:contentRecoveredStatus ; + sh:severity sh:Info ; + . + +observable:RecoveredObjectFacet-metadataRecoveredStatus-in-shape + a sh:PropertyShape ; + sh:in ( + "recovered" + "partially recovered" + "overwritten" + "unknown" + ) ; + sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; + sh:path observable:metadataRecoveredStatus ; + sh:severity sh:Info ; + . + +observable:RecoveredObjectFacet-nameRecoveredStatus-in-shape + a sh:PropertyShape ; + sh:in ( + "recovered" + "partially recovered" + "overwritten" + "unknown" + ) ; + sh:message "Value is not member of the vocabulary RecoveredObjectStatusVocab." ; + sh:path observable:nameRecoveredStatus ; + sh:severity sh:Info ; + . + observable:RegistryDatatype a rdfs:Datatype ; owl:equivalentClass [ @@ -6328,6 +6361,7 @@ observable:TaskActionType rdfs:label "TaskActionType"@en ; rdfs:comment "A task action type is a grouping of characteristics for a scheduled action to be completed."@en ; sh:property + observable:TaskActionType-actionType-in-shape , [ sh:class observable:IComHandlerActionType ; sh:maxCount "1"^^xsd:integer ; @@ -6364,17 +6398,6 @@ observable:TaskActionType sh:path observable:actionType ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "TASK_ACTION_COM_HANDLER" - "TASK_ACTION_EXEC" - "TASK_ACTION_SEND_EMAIL" - "TASK_ACTION_SHOW_MESSAGE" - ) ; - sh:message "Value is not member of the vocabulary TaskActionTypeVocab." ; - sh:path observable:actionType ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -6384,6 +6407,19 @@ observable:TaskActionType sh:targetClass observable:TaskActionType ; . +observable:TaskActionType-actionType-in-shape + a sh:PropertyShape ; + sh:in ( + "TASK_ACTION_COM_HANDLER" + "TASK_ACTION_EXEC" + "TASK_ACTION_SEND_EMAIL" + "TASK_ACTION_SHOW_MESSAGE" + ) ; + sh:message "Value is not member of the vocabulary TaskActionTypeVocab." ; + sh:path observable:actionType ; + sh:severity sh:Info ; + . + observable:TriggerType a owl:Class , @@ -6393,6 +6429,8 @@ observable:TriggerType rdfs:label "TriggerType"@en ; rdfs:comment "A trigger type is a grouping of characterizes unique to a set of criteria that, when met, starts the execution of a task within a Windows operating system. [based on https://docs.microsoft.com/en-us/windows/win32/taskschd/task-triggers]"@en ; sh:property + observable:TriggerType-triggerFrequency-in-shape , + observable:TriggerType-triggerType-in-shape , [ sh:datatype xsd:boolean ; sh:maxCount "1"^^xsd:integer ; @@ -6441,35 +6479,6 @@ observable:TriggerType sh:path observable:triggerType ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "TASK_EVENT_TRIGGER_AT_LOGON" - "TASK_EVENT_TRIGGER_AT_SYSTEMSTART" - "TASK_EVENT_TRIGGER_ON_IDLE" - "TASK_TIME_TRIGGER_DAILY" - "TASK_TIME_TRIGGER_MONTHLYDATE" - "TASK_TIME_TRIGGER_MONTHLYDOW" - "TASK_TIME_TRIGGER_ONCE" - "TASK_TIME_TRIGGER_WEEKLY" - ) ; - sh:message "Value is not member of the vocabulary TriggerFrequencyVocab." ; - sh:path observable:triggerFrequency ; - sh:severity sh:Info ; - ] , - [ - sh:in ( - "TASK_TRIGGER_BOOT" - "TASK_TRIGGER_EVENT" - "TASK_TRIGGER_IDLE" - "TASK_TRIGGER_LOGON" - "TASK_TRIGGER_REGISTRATION" - "TASK_TRIGGER_SESSION_STATE_CHANGE" - "TASK_TRIGGER_TIME" - ) ; - sh:message "Value is not member of the vocabulary TriggerTypeVocab." ; - sh:path observable:triggerType ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -6484,6 +6493,39 @@ observable:TriggerType sh:targetClass observable:TriggerType ; . +observable:TriggerType-triggerFrequency-in-shape + a sh:PropertyShape ; + sh:in ( + "TASK_EVENT_TRIGGER_AT_LOGON" + "TASK_EVENT_TRIGGER_AT_SYSTEMSTART" + "TASK_EVENT_TRIGGER_ON_IDLE" + "TASK_TIME_TRIGGER_DAILY" + "TASK_TIME_TRIGGER_MONTHLYDATE" + "TASK_TIME_TRIGGER_MONTHLYDOW" + "TASK_TIME_TRIGGER_ONCE" + "TASK_TIME_TRIGGER_WEEKLY" + ) ; + sh:message "Value is not member of the vocabulary TriggerFrequencyVocab." ; + sh:path observable:triggerFrequency ; + sh:severity sh:Info ; + . + +observable:TriggerType-triggerType-in-shape + a sh:PropertyShape ; + sh:in ( + "TASK_TRIGGER_BOOT" + "TASK_TRIGGER_EVENT" + "TASK_TRIGGER_IDLE" + "TASK_TRIGGER_LOGON" + "TASK_TRIGGER_REGISTRATION" + "TASK_TRIGGER_SESSION_STATE_CHANGE" + "TASK_TRIGGER_TIME" + ) ; + sh:message "Value is not member of the vocabulary TriggerTypeVocab." ; + sh:path observable:triggerType ; + sh:severity sh:Info ; + . + observable:Tweet a owl:Class , @@ -6933,6 +6975,7 @@ observable:URLVisitFacet rdfs:label "URLVisitFacet"@en ; rdfs:comment "A URL visit facet is a grouping of characteristics unique to the properties of a visit of a URL within a particular browser."@en ; sh:property + observable:URLVisitFacet-urlTransitionType-in-shape , [ sh:class observable:ObservableObject ; sh:maxCount "1"^^xsd:integer ; @@ -6969,24 +7012,6 @@ observable:URLVisitFacet sh:path observable:urlTransitionType ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "link" - "typed" - "auto_bookmark" - "auto_subframe" - "manual_subframe" - "generated" - "auto_toplevel" - "form_submit" - "reload" - "keyword" - "keyword_generated" - ) ; - sh:message "Value is not member of the vocabulary URLTransitionTypeVocab." ; - sh:path observable:urlTransitionType ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -6996,6 +7021,26 @@ observable:URLVisitFacet sh:targetClass observable:URLVisitFacet ; . +observable:URLVisitFacet-urlTransitionType-in-shape + a sh:PropertyShape ; + sh:in ( + "link" + "typed" + "auto_bookmark" + "auto_subframe" + "manual_subframe" + "generated" + "auto_toplevel" + "form_submit" + "reload" + "keyword" + "keyword_generated" + ) ; + sh:message "Value is not member of the vocabulary URLTransitionTypeVocab." ; + sh:path observable:urlTransitionType ; + sh:severity sh:Info ; + . + observable:UserAccount a owl:Class , @@ -7193,6 +7238,7 @@ observable:WhoIsFacet rdfs:label "WhoIsFacet"@en ; rdfs:comment "A whois facet is a grouping of characteristics unique to a response record conformant to the WHOIS protocol standard (RFC 3912). [based on https://en.wikipedia.org/wiki/WHOIS]"@en ; sh:property + observable:WhoIsFacet-status-in-shape , observable:regionalInternetRegistry-shape-value-not-vocabulary-member , observable:regionalInternetRegistry-shape-value-outside-default-vocabulary , [ @@ -7295,32 +7341,6 @@ observable:WhoIsFacet sh:nodeKind sh:Literal ; sh:path observable:dnssec ; ] , - [ - sh:in ( - "ADD_PERIOD" - "AUTO_RENEW_PERIOD" - "CLIENT_DELETE_PROHIBITED" - "CLIENT_HOLD" - "CLIENT_RENEW_PROHIBITED" - "CLIENT_TRANSFER_PROHIBITED" - "CLIENT_UPDATE_PROHIBITED" - "DELETE_PROHIBITED" - "HOLD" - "INACTIVE" - "OK" - "PENDING_DELETE_RESTORABLE" - "PENDING_DELETE_SCHEDULED_FOR_RELEASE" - "PENDING_RESTORE" - "RENEW_PERIOD" - "RENEW_PROHIBITED" - "TRANSFER_PERIOD" - "TRANSFER_PROHIBITED" - "UPDATE_PROHIBITED" - ) ; - sh:message "Value is not member of the vocabulary WhoisStatusTypeVocab." ; - sh:path observable:status ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -7335,6 +7355,34 @@ observable:WhoIsFacet sh:targetClass observable:WhoIsFacet ; . +observable:WhoIsFacet-status-in-shape + a sh:PropertyShape ; + sh:in ( + "ADD_PERIOD" + "AUTO_RENEW_PERIOD" + "CLIENT_DELETE_PROHIBITED" + "CLIENT_HOLD" + "CLIENT_RENEW_PROHIBITED" + "CLIENT_TRANSFER_PROHIBITED" + "CLIENT_UPDATE_PROHIBITED" + "DELETE_PROHIBITED" + "HOLD" + "INACTIVE" + "OK" + "PENDING_DELETE_RESTORABLE" + "PENDING_DELETE_SCHEDULED_FOR_RELEASE" + "PENDING_RESTORE" + "RENEW_PERIOD" + "RENEW_PROHIBITED" + "TRANSFER_PERIOD" + "TRANSFER_PROHIBITED" + "UPDATE_PROHIBITED" + ) ; + sh:message "Value is not member of the vocabulary WhoisStatusTypeVocab." ; + sh:path observable:status ; + sh:severity sh:Info ; + . + observable:WhoisContactFacet a owl:Class , @@ -7344,22 +7392,13 @@ observable:WhoisContactFacet rdfs:label "WhoIsContactFacet"@en ; rdfs:comment "A Whois contact type is a grouping of characteristics unique to contact-related information present in a response record conformant to the WHOIS protocol standard (RFC 3912). [based on https://en.wikipedia.org/wiki/WHOIS]"@en ; sh:property + observable:WhoisContactFacet-whoisContactType-in-shape , [ sh:datatype xsd:string ; sh:message "As of UCO 1.4.0, the datatype to use for observable:whoisContactType should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ; sh:path observable:whoisContactType ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "ADMIN" - "BILLING" - "TECHNICAL" - ) ; - sh:message "Value is not member of the vocabulary WhoisContactTypeVocab." ; - sh:path observable:whoisContactType ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -7369,6 +7408,18 @@ observable:WhoisContactFacet sh:targetClass observable:WhoisContactFacet ; . +observable:WhoisContactFacet-whoisContactType-in-shape + a sh:PropertyShape ; + sh:in ( + "ADMIN" + "BILLING" + "TECHNICAL" + ) ; + sh:message "Value is not member of the vocabulary WhoisContactTypeVocab." ; + sh:path observable:whoisContactType ; + sh:severity sh:Info ; + . + observable:WhoisRegistrarInfoType a owl:Class , @@ -8414,6 +8465,9 @@ observable:WindowsTaskFacet rdfs:label "WindowsTaskFacet"@en ; rdfs:comment "A Windows Task facet is a grouping of characteristics unique to a Windows Task (a process that is scheduled to execute on a Windows operating system by the Windows Task Scheduler). [based on http://msdn.microsoft.com/en-us/library/windows/desktop/aa381311(v=vs.85).aspx]"@en ; sh:property + observable:WindowsTaskFacet-flags-in-shape , + observable:WindowsTaskFacet-priority-in-shape , + observable:WindowsTaskFacet-status-in-shape , [ sh:class observable:ObservableObject ; sh:maxCount "1"^^xsd:integer ; @@ -8526,56 +8580,6 @@ observable:WindowsTaskFacet sh:path observable:status ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "SCHED_E_ACCOUNT_DBASE_CORRUPT" - "SCHED_E_ACCOUNT_INFORMATION_NOT_SET" - "SCHED_E_ACCOUNT_NAME_NOT_FOUND" - "SCHED_E_CANNOT_OPEN_TASK" - "SCHED_E_INVALID_TASK" - "SCHED_E_NO_SECURITY_SERVICES" - "SCHED_E_SERVICE_NOT_INSTALLED" - "SCHED_E_SERVICE_NOT_RUNNING" - "SCHED_E_TASK_NOT_READY" - "SCHED_E_TASK_NOT_RUNNING" - "SCHED_E_TRIGGER_NOT_FOUND" - "SCHED_E_UNKNOWN_OBJECT_VERSION" - "SCHED_E_UNSUPPORTED_ACCOUNT_OPTION" - "SCHED_S_EVENT_TRIGGER" - "SCHED_S_TASK_DISABLED" - "SCHED_S_TASK_HAS_NOT_RUN" - "SCHED_S_TASK_NOT_SCHEDULED" - "SCHED_S_TASK_NO_MORE_RUNS" - "SCHED_S_TASK_NO_VALID_TRIGGERS" - "SCHED_S_TASK_READY" - "SCHED_S_TASK_RUNNING" - "SCHED_S_TASK_TERMINATED" - "TASK_STATE_QUEUED" - "TASK_STATE_UNKNOWN" - ) ; - sh:message "Value is not member of the vocabulary TaskStatusVocab." ; - sh:path observable:status ; - ] , - [ - sh:in ( - "TASK_FLAG_DELETE_WHEN_DONE" - "TASK_FLAG_DISABLED" - "TASK_FLAG_DONT_START_IF_ON_BATTERIES" - "TASK_FLAG_HIDDEN" - "TASK_FLAG_INTERACTIVE" - "TASK_FLAG_KILL_IF_GOING_ON_BATTERIES" - "TASK_FLAG_KILL_ON_IDLE_END" - "TASK_FLAG_RESTART_ON_IDLE_RESUME" - "TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET" - "TASK_FLAG_RUN_ONLY_IF_LOGGED_ON" - "TASK_FLAG_START_ONLY_IF_IDLE" - "TASK_FLAG_SYSTEM_REQUIRED" - "TASK_FLAG_ZERO" - ) ; - sh:message "Value is not member of the vocabulary TaskFlagVocab." ; - sh:path observable:flags ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -8599,26 +8603,6 @@ observable:WindowsTaskFacet sh:path observable:priority ; sh:severity sh:Warning ; ] , - [ - sh:message "Value is not member of the vocabulary TaskPriorityVocab." ; - sh:or ( - [ - sh:in ( - "ABOVE_NORMAL_PRIORITY_CLASS" - "BELOW_NORMAL_PRIORITY_CLASS" - "HIGH_PRIORITY_CLASS" - "IDLE_PRIORITY_CLASS" - "NORMAL_PRIORITY_CLASS" - "REALTIME_PRIORITY_CLASS" - ) ; - ] - [ - sh:datatype xsd:integer ; - ] - ) ; - sh:path observable:priority ; - sh:severity sh:Info ; - ] , [ sh:nodeKind sh:Literal ; sh:path observable:flags ; @@ -8627,6 +8611,82 @@ observable:WindowsTaskFacet sh:targetClass observable:WindowsTaskFacet ; . +observable:WindowsTaskFacet-flags-in-shape + a sh:PropertyShape ; + sh:in ( + "TASK_FLAG_DELETE_WHEN_DONE" + "TASK_FLAG_DISABLED" + "TASK_FLAG_DONT_START_IF_ON_BATTERIES" + "TASK_FLAG_HIDDEN" + "TASK_FLAG_INTERACTIVE" + "TASK_FLAG_KILL_IF_GOING_ON_BATTERIES" + "TASK_FLAG_KILL_ON_IDLE_END" + "TASK_FLAG_RESTART_ON_IDLE_RESUME" + "TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET" + "TASK_FLAG_RUN_ONLY_IF_LOGGED_ON" + "TASK_FLAG_START_ONLY_IF_IDLE" + "TASK_FLAG_SYSTEM_REQUIRED" + "TASK_FLAG_ZERO" + ) ; + sh:message "Value is not member of the vocabulary TaskFlagVocab." ; + sh:path observable:flags ; + sh:severity sh:Info ; + . + +observable:WindowsTaskFacet-priority-in-shape + a sh:PropertyShape ; + sh:message "Value is not member of the vocabulary TaskPriorityVocab." ; + sh:or ( + [ + sh:in ( + "ABOVE_NORMAL_PRIORITY_CLASS" + "BELOW_NORMAL_PRIORITY_CLASS" + "HIGH_PRIORITY_CLASS" + "IDLE_PRIORITY_CLASS" + "NORMAL_PRIORITY_CLASS" + "REALTIME_PRIORITY_CLASS" + ) ; + ] + [ + sh:datatype xsd:integer ; + ] + ) ; + sh:path observable:priority ; + sh:severity sh:Info ; + . + +observable:WindowsTaskFacet-status-in-shape + a sh:PropertyShape ; + sh:in ( + "SCHED_E_ACCOUNT_DBASE_CORRUPT" + "SCHED_E_ACCOUNT_INFORMATION_NOT_SET" + "SCHED_E_ACCOUNT_NAME_NOT_FOUND" + "SCHED_E_CANNOT_OPEN_TASK" + "SCHED_E_INVALID_TASK" + "SCHED_E_NO_SECURITY_SERVICES" + "SCHED_E_SERVICE_NOT_INSTALLED" + "SCHED_E_SERVICE_NOT_RUNNING" + "SCHED_E_TASK_NOT_READY" + "SCHED_E_TASK_NOT_RUNNING" + "SCHED_E_TRIGGER_NOT_FOUND" + "SCHED_E_UNKNOWN_OBJECT_VERSION" + "SCHED_E_UNSUPPORTED_ACCOUNT_OPTION" + "SCHED_S_EVENT_TRIGGER" + "SCHED_S_TASK_DISABLED" + "SCHED_S_TASK_HAS_NOT_RUN" + "SCHED_S_TASK_NOT_SCHEDULED" + "SCHED_S_TASK_NO_MORE_RUNS" + "SCHED_S_TASK_NO_VALID_TRIGGERS" + "SCHED_S_TASK_READY" + "SCHED_S_TASK_RUNNING" + "SCHED_S_TASK_TERMINATED" + "TASK_STATE_QUEUED" + "TASK_STATE_UNKNOWN" + ) ; + sh:message "Value is not member of the vocabulary TaskStatusVocab." ; + sh:path observable:status ; + . + observable:WindowsThread a owl:Class , @@ -8721,6 +8781,7 @@ observable:WindowsVolumeFacet rdfs:label "WindowsVolumeFacet"@en ; rdfs:comment "A Windows volume facet is a grouping of characteristics unique to a single accessible storage area (volume) with a single Windows file system. [based on https://en.wikipedia.org/wiki/Volume_(computing)]"@en ; sh:property + observable:WindowsVolumeFacet-driveType-in-shape , [ sh:datatype xsd:string ; sh:maxCount "1"^^xsd:integer ; @@ -8739,20 +8800,6 @@ observable:WindowsVolumeFacet sh:nodeKind sh:Literal ; sh:path observable:windowsVolumeAttributes ; ] , - [ - sh:in ( - "DRIVE_CDROM" - "DRIVE_FIXED" - "DRIVE_NO_ROOT_DIR" - "DRIVE_RAMDISK" - "DRIVE_REMOTE" - "DRIVE_REMOVABLE" - "DRIVE_UNKNOWN" - ) ; - sh:message "Value is not member of the vocabulary WindowsDriveTypeVocab." ; - sh:path observable:driveType ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -8762,6 +8809,22 @@ observable:WindowsVolumeFacet sh:targetClass observable:WindowsVolumeFacet ; . +observable:WindowsVolumeFacet-driveType-in-shape + a sh:PropertyShape ; + sh:in ( + "DRIVE_CDROM" + "DRIVE_FIXED" + "DRIVE_NO_ROOT_DIR" + "DRIVE_RAMDISK" + "DRIVE_REMOTE" + "DRIVE_REMOVABLE" + "DRIVE_UNKNOWN" + ) ; + sh:message "Value is not member of the vocabulary WindowsDriveTypeVocab." ; + sh:path observable:driveType ; + sh:severity sh:Info ; + . + observable:WindowsWaitableTime a owl:Class , @@ -8793,6 +8856,7 @@ observable:WirelessNetworkConnectionFacet rdfs:label "WirelessNetworkConnectionFacet"@en ; rdfs:comment "A wireless network connection facet is a grouping of characteristics unique to a connection (completed or attempted) across an IEEE 802.11 standards-conformant digital network (a group of two or more computer systems linked together). [based on https://www.webopedia.com/TERM/N/network.html]"@en ; sh:property + observable:WirelessNetworkConnectionFacet-wirelessNetworkSecurityMode-in-shape , [ sh:datatype xsd:string ; sh:maxCount "1"^^xsd:integer ; @@ -8817,20 +8881,6 @@ observable:WirelessNetworkConnectionFacet sh:path observable:wirelessNetworkSecurityMode ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "None" - "WEP" - "WPA" - "WPA2-PSK" - "WPA2-Enterprise" - "WPA3-PSK" - "WPA3-Enterprise" - ) ; - sh:message "Value is not member of the vocabulary WirelessNetworkSecurityModeVocab." ; - sh:path observable:wirelessNetworkSecurityMode ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:nodeKind sh:Literal ; @@ -8840,6 +8890,22 @@ observable:WirelessNetworkConnectionFacet sh:targetClass observable:WirelessNetworkConnectionFacet ; . +observable:WirelessNetworkConnectionFacet-wirelessNetworkSecurityMode-in-shape + a sh:PropertyShape ; + sh:in ( + "None" + "WEP" + "WPA" + "WPA2-PSK" + "WPA2-Enterprise" + "WPA3-PSK" + "WPA3-Enterprise" + ) ; + sh:message "Value is not member of the vocabulary WirelessNetworkSecurityModeVocab." ; + sh:path observable:wirelessNetworkSecurityMode ; + sh:severity sh:Info ; + . + observable:WriteBlocker a owl:Class , diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index 3eb7f9ce..3eba272f 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -136,6 +136,7 @@ types:Hash rdfs:label "Hash"@en ; rdfs:comment "A hash is a grouping of characteristics unique to the result of applying a mathematical algorithm that maps data of arbitrary size to a bit string (the 'hash') and is a one-way function, that is, a function which is practically infeasible to invert. This is commonly used for integrity checking of data. [based on https://en.wikipedia.org/wiki/Cryptographic_hash_function]"@en ; sh:property + types:Hash-hashMethod-in-shape , [ sh:datatype xsd:hexBinary ; sh:maxCount "1"^^xsd:integer ; @@ -149,25 +150,6 @@ types:Hash sh:path types:hashMethod ; sh:severity sh:Warning ; ] , - [ - sh:in ( - "MD5" - "MD6" - "SHA1" - "SHA224" - "SHA256" - "SHA3-224" - "SHA3-256" - "SHA3-384" - "SHA3-512" - "SHA384" - "SHA512" - "SSDEEP" - ) ; - sh:message "Value is not member of the vocabulary HashNameVocab." ; - sh:path types:hashMethod ; - sh:severity sh:Info ; - ] , [ sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; @@ -178,6 +160,27 @@ types:Hash sh:targetClass types:Hash ; . +types:Hash-hashMethod-in-shape + a sh:PropertyShape ; + sh:in ( + "MD5" + "MD6" + "SHA1" + "SHA224" + "SHA256" + "SHA3-224" + "SHA3-256" + "SHA3-384" + "SHA3-512" + "SHA384" + "SHA512" + "SSDEEP" + ) ; + sh:message "Value is not member of the vocabulary HashNameVocab." ; + sh:path types:hashMethod ; + sh:severity sh:Info ; + . + types:Identifier a rdfs:Datatype ; rdfs:comment "An identifier is a string conformant to the specified UUID-based format for UCO object identifiers."@en ; From d524b8eb57549e54eb475f37d2b6ce523815bbbf Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 26 Feb 2025 10:55:03 -0500 Subject: [PATCH 56/61] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- .../action_inheritance_PASS_validation.ttl | 15 +--- tests/examples/hash_PASS_validation.ttl | 80 +------------------ 2 files changed, 5 insertions(+), 90 deletions(-) diff --git a/tests/examples/action_inheritance_PASS_validation.ttl b/tests/examples/action_inheritance_PASS_validation.ttl index b121487c..eb053a17 100644 --- a/tests/examples/action_inheritance_PASS_validation.ttl +++ b/tests/examples/action_inheritance_PASS_validation.ttl @@ -15,20 +15,7 @@ sh:resultPath action:actionStatus ; sh:resultSeverity sh:Info ; sh:sourceConstraintComponent sh:InConstraintComponent ; - sh:sourceShape [ - sh:in ( - "Complete/Finish" - "Error" - "Fail" - "Ongoing" - "Pending" - "Success" - "Unknown" - ) ; - sh:message "Value is not member of the vocabulary ActionStatusTypeVocab." ; - sh:path action:actionStatus ; - sh:severity sh:Info ; - ] ; + sh:sourceShape action:Action-actionStatus-in-shape ; sh:value "CUSTOM Started" ; ] ; . diff --git a/tests/examples/hash_PASS_validation.ttl b/tests/examples/hash_PASS_validation.ttl index 193a7ada..674ba43e 100644 --- a/tests/examples/hash_PASS_validation.ttl +++ b/tests/examples/hash_PASS_validation.ttl @@ -17,25 +17,7 @@ sh:resultPath types:hashMethod ; sh:resultSeverity sh:Info ; sh:sourceConstraintComponent sh:InConstraintComponent ; - sh:sourceShape [ - sh:in ( - "MD5" - "MD6" - "SHA1" - "SHA224" - "SHA256" - "SHA3-224" - "SHA3-256" - "SHA3-384" - "SHA3-512" - "SHA384" - "SHA512" - "SSDEEP" - ) ; - sh:message "Value is not member of the vocabulary HashNameVocab." ; - sh:path types:hashMethod ; - sh:severity sh:Info ; - ] ; + sh:sourceShape types:Hash-hashMethod-in-shape ; sh:value "CUSTOM_hash" ; ] , [ @@ -45,25 +27,7 @@ sh:resultPath types:hashMethod ; sh:resultSeverity sh:Info ; sh:sourceConstraintComponent sh:InConstraintComponent ; - sh:sourceShape [ - sh:in ( - "MD5" - "MD6" - "SHA1" - "SHA224" - "SHA256" - "SHA3-224" - "SHA3-256" - "SHA3-384" - "SHA3-512" - "SHA384" - "SHA512" - "SSDEEP" - ) ; - sh:message "Value is not member of the vocabulary HashNameVocab." ; - sh:path types:hashMethod ; - sh:severity sh:Info ; - ] ; + sh:sourceShape types:Hash-hashMethod-in-shape ; sh:value "SHA-1" ; ] , [ @@ -88,25 +52,7 @@ sh:resultPath types:hashMethod ; sh:resultSeverity sh:Info ; sh:sourceConstraintComponent sh:InConstraintComponent ; - sh:sourceShape [ - sh:in ( - "MD5" - "MD6" - "SHA1" - "SHA224" - "SHA256" - "SHA3-224" - "SHA3-256" - "SHA3-384" - "SHA3-512" - "SHA384" - "SHA512" - "SSDEEP" - ) ; - sh:message "Value is not member of the vocabulary HashNameVocab." ; - sh:path types:hashMethod ; - sh:severity sh:Info ; - ] ; + sh:sourceShape types:Hash-hashMethod-in-shape ; sh:value "SHA1"^^vocabulary:HashNameVocab ; ] , [ @@ -131,25 +77,7 @@ sh:resultPath types:hashMethod ; sh:resultSeverity sh:Info ; sh:sourceConstraintComponent sh:InConstraintComponent ; - sh:sourceShape [ - sh:in ( - "MD5" - "MD6" - "SHA1" - "SHA224" - "SHA256" - "SHA3-224" - "SHA3-256" - "SHA3-384" - "SHA3-512" - "SHA384" - "SHA512" - "SSDEEP" - ) ; - sh:message "Value is not member of the vocabulary HashNameVocab." ; - sh:path types:hashMethod ; - sh:severity sh:Info ; - ] ; + sh:sourceShape types:Hash-hashMethod-in-shape ; sh:value "1"^^xsd:integer ; ] ; From 68ffd026009ef5ea99df3bec49f045a2e006a77c Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 26 Feb 2025 14:11:12 -0500 Subject: [PATCH 57/61] Fix logging syntax No effects were observed on Make-managed files. References: * https://docs.python.org/3.9/library/logging.html#logging.Logger.debug Signed-off-by: Alex Nelson --- tests/test_uco_monolithic.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_uco_monolithic.py b/tests/test_uco_monolithic.py index 583b42e8..693e145c 100644 --- a/tests/test_uco_monolithic.py +++ b/tests/test_uco_monolithic.py @@ -261,11 +261,9 @@ def test_semi_open_vocabulary_owl_shacl_alignment(graph: Graph) -> None: for (n_class, n_property, n_vocabulary) in computed: logging.error( "* %s and %s, used in %s", - ( - str(n_property), - str(n_vocabulary), - str(n_class), - ) + str(n_property), + str(n_vocabulary), + str(n_class), ) raise From 26a1b944e5e59bd4a8b9e0fd0bf7c1acc7165054 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 26 Feb 2025 15:22:48 -0500 Subject: [PATCH 58/61] Expand paths to SHACL vocabulary lists No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/629 Signed-off-by: Alex Nelson --- tests/test_uco_monolithic.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_uco_monolithic.py b/tests/test_uco_monolithic.py index 693e145c..3503a35e 100644 --- a/tests/test_uco_monolithic.py +++ b/tests/test_uco_monolithic.py @@ -190,8 +190,9 @@ def test_semi_open_vocabulary_owl_shacl_alignment(graph: Graph) -> None: query = """\ SELECT ?nProperty ?nOwlSequence WHERE { + # The owl:unionOf path being optional finds cases like core:objectStatus. ?nProperty - rdfs:range / owl:unionOf / rdf:rest* / rdf:first ?nDatatype ; + rdfs:range / (owl:unionOf / rdf:rest* / rdf:first)? ?nDatatype ; . ?nDatatype a rdfs:Datatype ; @@ -219,12 +220,14 @@ def test_semi_open_vocabulary_owl_shacl_alignment(graph: Graph) -> None: ?nClass sh:property ?nMemberCheckShape ; . + # The sh:or path finds cases like observable:WindowsTaskFacet-priority-in-shape. ?nMemberCheckShape - sh:in ?nShaclList ; + (sh:or / rdf:rest* / rdf:first)? / sh:in ?nShaclList ; sh:path ?nProperty ; . + # The owl:unionOf path being optional finds cases like core:objectStatus. ?nProperty - rdfs:range / owl:unionOf / rdf:rest* / rdf:first ?nDatatype ; + rdfs:range / (owl:unionOf / rdf:rest* / rdf:first)? ?nDatatype ; . ?nDatatype a rdfs:Datatype ; From be55ca32ab4a57c7be9d80df04d2a0f3aac728f8 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 31 Mar 2025 14:55:08 -0400 Subject: [PATCH 59/61] Fix copy-paste error References: * https://github.com/ucoProject/UCO/issues/563 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 2b8a76ac..7b905c3e 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -18,7 +18,7 @@ action:Action a owl:Class ; - rdfs:isDefinedBy ; + rdfs:isDefinedBy ; . core:Annotation From 3b19101be4cf6c01c1f1f6c849b0da3331fd6950 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 28 May 2025 08:26:05 -0400 Subject: [PATCH 60/61] Bump version A follow-on patch will regenerate Make-managed files. Signed-off-by: Alex Nelson --- README.md | 4 +- ontology/co/co.ttl | 6 +- ontology/owl/owl.ttl | 6 +- ontology/uco/action/action.ttl | 26 +++---- ontology/uco/analysis/analysis.ttl | 10 +-- ontology/uco/configuration/configuration.ttl | 10 +-- ontology/uco/core/core.ttl | 6 +- ontology/uco/identity/identity.ttl | 14 ++-- ontology/uco/location/location.ttl | 10 +-- ontology/uco/marking/marking.ttl | 10 +-- ontology/uco/master/uco.ttl | 76 ++++++++++---------- ontology/uco/observable/observable.ttl | 36 +++++----- ontology/uco/pattern/pattern.ttl | 10 +-- ontology/uco/role/role.ttl | 10 +-- ontology/uco/time/time.ttl | 10 +-- ontology/uco/tool/tool.ttl | 14 ++-- ontology/uco/types/types.ttl | 18 ++--- ontology/uco/victim/victim.ttl | 10 +-- ontology/uco/vocabulary/vocabulary.ttl | 6 +- 19 files changed, 146 insertions(+), 146 deletions(-) diff --git a/README.md b/README.md index b52b0aae..daa2f302 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ Through this approach not only are domain-focused representations defined consis The purpose of this repository is to provide a foundation for broader community involvement in defining what to represent and how. ### Current Release -The current release of UCO is 1.2.0. +The current release of UCO is 1.4.0. UCO 1.2.0 incorporates required refinements and updates, building on the stable 1.0.0 release. Following [SemVer](https://semver.org/spec/v2.0.0.html), additive improvements will continue to be accepted, but backwards-incompatible changes will be scheduled only for the 2.0.0 release, which will come after at least 6 months to possibly 12 months. -More detail of improvements is documented in the [UCO 1.2.0 release notes](https://unifiedcyberontology.org/releases/1.2.0/). +More detail of improvements is documented in the [UCO 1.4.0 release notes](https://unifiedcyberontology.org/releases/1.4.0/). diff --git a/ontology/co/co.ttl b/ontology/co/co.ttl index e8bff8dc..ea98c7a4 100644 --- a/ontology/co/co.ttl +++ b/ontology/co/co.ttl @@ -12,10 +12,10 @@ a owl:Ontology ; rdfs:label "uco-co"@en ; rdfs:comment "This ontology defines SHACL shapes to supplement the OWL 2 DL definitions in the Collections Ontology."@en ; - owl:backwardCompatibleWith uco-co:1.2.0 ; + owl:backwardCompatibleWith uco-co:1.3.0 ; owl:imports ; - owl:priorVersion uco-co:1.2.0 ; - owl:versionIRI uco-co:1.3.0 ; + owl:priorVersion uco-co:1.3.0 ; + owl:versionIRI uco-co:1.4.0 ; . co:ListItem diff --git a/ontology/owl/owl.ttl b/ontology/owl/owl.ttl index 2f5ecc72..24e18e8d 100644 --- a/ontology/owl/owl.ttl +++ b/ontology/owl/owl.ttl @@ -10,9 +10,9 @@ rdfs:label "uco-owl"@en ; rdfs:comment "This ontology defines SHACL shapes to perform conformance testing of OWL 2 DL. Some of these shapes follow rules specified from the canonical, subtractive parsing process of Section 3 of the OWL 2 mapping to RDF. From the last line of that document's Section 3, 'At the end of this process, the graph G MUST be empty,' anything not strictly matching patterns specified in that section cause the input graph to be non-conformant with OWL 2 DL."@en ; rdfs:seeAlso ; - owl:backwardCompatibleWith uco-owl:1.2.0 ; - owl:priorVersion uco-owl:1.2.0 ; - owl:versionIRI uco-owl:1.3.0 ; + owl:backwardCompatibleWith uco-owl:1.3.0 ; + owl:priorVersion uco-owl:1.3.0 ; + owl:versionIRI uco-owl:1.4.0 ; . uco-owl:Axiom-shape diff --git a/ontology/uco/action/action.ttl b/ontology/uco/action/action.ttl index 1d6d4b1e..80b67a3d 100644 --- a/ontology/uco/action/action.ttl +++ b/ontology/uco/action/action.ttl @@ -1,8 +1,8 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/location/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/pattern/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/types/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/location/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/pattern/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/types/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.4.0 @prefix action: . @prefix core: . @@ -20,16 +20,16 @@ a owl:Ontology ; rdfs:label "uco-action"@en ; rdfs:comment "This ontology defines classes and properties for characterizing actions."@en-US ; - owl:backwardCompatibleWith action:1.2.0 ; + owl:backwardCompatibleWith action:1.3.0 ; owl:imports - core:1.3.0 , - location:1.3.0 , - pattern:1.3.0 , - types:1.3.0 , - vocabulary:1.3.0 + core:1.4.0 , + location:1.4.0 , + pattern:1.4.0 , + types:1.4.0 , + vocabulary:1.4.0 ; - owl:priorVersion action:1.2.0 ; - owl:versionIRI action:1.3.0 ; + owl:priorVersion action:1.3.0 ; + owl:versionIRI action:1.4.0 ; . action:Action diff --git a/ontology/uco/analysis/analysis.ttl b/ontology/uco/analysis/analysis.ttl index 2d978663..432064c0 100644 --- a/ontology/uco/analysis/analysis.ttl +++ b/ontology/uco/analysis/analysis.ttl @@ -1,4 +1,4 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/action/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/action/1.4.0 @prefix action: . @prefix analysis: . @@ -14,10 +14,10 @@ rdfs:label "uco-analysis"@en ; rdfs:comment "This ontology defines classes and properties for characterizing analytic actions and results."@en-US ; rdfs:seeAlso ; - owl:backwardCompatibleWith analysis:1.2.0 ; - owl:imports action:1.3.0 ; - owl:priorVersion analysis:1.2.0 ; - owl:versionIRI analysis:1.3.0 ; + owl:backwardCompatibleWith analysis:1.3.0 ; + owl:imports action:1.4.0 ; + owl:priorVersion analysis:1.3.0 ; + owl:versionIRI analysis:1.4.0 ; . analysis:Analysis diff --git a/ontology/uco/configuration/configuration.ttl b/ontology/uco/configuration/configuration.ttl index ed856de6..1098b1f8 100644 --- a/ontology/uco/configuration/configuration.ttl +++ b/ontology/uco/configuration/configuration.ttl @@ -1,4 +1,4 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 @prefix configuration: . @prefix core: . @@ -13,10 +13,10 @@ rdfs:label "uco-configuration"@en ; rdfs:comment "This ontology defines classes and properties for characterizing configurations."@en-US ; rdfs:seeAlso ; - owl:backwardCompatibleWith configuration:1.2.0 ; - owl:imports core:1.3.0 ; - owl:priorVersion configuration:1.2.0 ; - owl:versionIRI configuration:1.3.0 ; + owl:backwardCompatibleWith configuration:1.3.0 ; + owl:imports core:1.4.0 ; + owl:priorVersion configuration:1.3.0 ; + owl:versionIRI configuration:1.4.0 ; . configuration:Configuration diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 7b905c3e..b4f59e84 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -11,9 +11,9 @@ a owl:Ontology ; rdfs:label "uco-core"@en ; rdfs:comment "This ontology defines classes and properties that are shared across the various UCO ontologies. At a high-level, the UCO core ontology provides base classes, relationship-oriented classes, content-aggregation classes, and shared classes."@en ; - owl:backwardCompatibleWith core:1.2.0 ; - owl:priorVersion core:1.2.0 ; - owl:versionIRI core:1.3.0 ; + owl:backwardCompatibleWith core:1.3.0 ; + owl:priorVersion core:1.3.0 ; + owl:versionIRI core:1.4.0 ; . action:Action diff --git a/ontology/uco/identity/identity.ttl b/ontology/uco/identity/identity.ttl index 93c20b6f..6c50fe6c 100644 --- a/ontology/uco/identity/identity.ttl +++ b/ontology/uco/identity/identity.ttl @@ -1,5 +1,5 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/location/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/location/1.4.0 @prefix core: . @prefix identity: . @@ -13,13 +13,13 @@ a owl:Ontology ; rdfs:label "uco-identity"@en ; - owl:backwardCompatibleWith identity:1.2.0 ; + owl:backwardCompatibleWith identity:1.3.0 ; owl:imports - core:1.3.0 , - location:1.3.0 + core:1.4.0 , + location:1.4.0 ; - owl:priorVersion identity:1.2.0 ; - owl:versionIRI identity:1.3.0 ; + owl:priorVersion identity:1.3.0 ; + owl:versionIRI identity:1.4.0 ; . identity:AddressFacet diff --git a/ontology/uco/location/location.ttl b/ontology/uco/location/location.ttl index 5ea94b37..2cdfee77 100644 --- a/ontology/uco/location/location.ttl +++ b/ontology/uco/location/location.ttl @@ -1,4 +1,4 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 @prefix core: . @prefix location: . @@ -11,10 +11,10 @@ a owl:Ontology ; rdfs:label "uco-location"@en ; - owl:backwardCompatibleWith location:1.2.0 ; - owl:imports core:1.3.0 ; - owl:priorVersion location:1.2.0 ; - owl:versionIRI location:1.3.0 ; + owl:backwardCompatibleWith location:1.3.0 ; + owl:imports core:1.4.0 ; + owl:priorVersion location:1.3.0 ; + owl:versionIRI location:1.4.0 ; . location:GPSCoordinatesFacet diff --git a/ontology/uco/marking/marking.ttl b/ontology/uco/marking/marking.ttl index 58f28559..f822a2a8 100644 --- a/ontology/uco/marking/marking.ttl +++ b/ontology/uco/marking/marking.ttl @@ -1,4 +1,4 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 @prefix core: . @prefix marking: . @@ -12,10 +12,10 @@ a owl:Ontology ; rdfs:label "uco-marking"@en ; rdfs:comment "Data markings represent restrictions, permissions, and other guidance for how data can be used and shared."@en ; - owl:backwardCompatibleWith marking:1.2.0 ; - owl:imports core:1.3.0 ; - owl:priorVersion marking:1.2.0 ; - owl:versionIRI marking:1.3.0 ; + owl:backwardCompatibleWith marking:1.3.0 ; + owl:imports core:1.4.0 ; + owl:priorVersion marking:1.3.0 ; + owl:versionIRI marking:1.4.0 ; . marking:GranularMarking diff --git a/ontology/uco/master/uco.ttl b/ontology/uco/master/uco.ttl index 61346b1b..dda2fb57 100644 --- a/ontology/uco/master/uco.ttl +++ b/ontology/uco/master/uco.ttl @@ -1,20 +1,20 @@ -# imports: https://ontology.unifiedcyberontology.org/co/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/owl/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/action/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/analysis/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/configuration/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/identity/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/location/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/marking/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/observable/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/pattern/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/role/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/time/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/tool/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/types/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/victim/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/co/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/owl/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/action/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/analysis/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/configuration/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/identity/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/location/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/marking/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/observable/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/pattern/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/role/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/time/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/tool/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/types/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/victim/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.4.0 @prefix owl: . @prefix rdf: . @@ -25,28 +25,28 @@ a owl:Ontology ; rdfs:label "uco-master"@en ; - owl:backwardCompatibleWith ; + owl:backwardCompatibleWith ; owl:imports - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; - owl:priorVersion ; - owl:versionIRI ; - owl:versionInfo "1.3.0" ; + owl:priorVersion ; + owl:versionIRI ; + owl:versionInfo "1.4.0" ; . diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 634b7f6b..31740ba2 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -1,10 +1,10 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/action/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/configuration/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/identity/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/location/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/types/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/action/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/configuration/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/identity/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/location/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/types/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.4.0 @prefix action: . @prefix co: . @@ -24,18 +24,18 @@ a owl:Ontology ; rdfs:label "uco-observable"@en ; - owl:backwardCompatibleWith observable:1.2.0 ; + owl:backwardCompatibleWith observable:1.3.0 ; owl:imports - action:1.3.0 , - configuration:1.3.0 , - core:1.3.0 , - identity:1.3.0 , - location:1.3.0 , - types:1.3.0 , - vocabulary:1.3.0 - ; - owl:priorVersion observable:1.2.0 ; - owl:versionIRI observable:1.3.0 ; + action:1.4.0 , + configuration:1.4.0 , + core:1.4.0 , + identity:1.4.0 , + location:1.4.0 , + types:1.4.0 , + vocabulary:1.4.0 + ; + owl:priorVersion observable:1.3.0 ; + owl:versionIRI observable:1.4.0 ; . observable:API diff --git a/ontology/uco/pattern/pattern.ttl b/ontology/uco/pattern/pattern.ttl index 02173140..ea6f4cdf 100644 --- a/ontology/uco/pattern/pattern.ttl +++ b/ontology/uco/pattern/pattern.ttl @@ -1,4 +1,4 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 @prefix core: . @prefix owl: . @@ -11,10 +11,10 @@ a owl:Ontology ; rdfs:label "uco-pattern"@en ; - owl:backwardCompatibleWith pattern:1.2.0 ; - owl:imports core:1.3.0 ; - owl:priorVersion pattern:1.2.0 ; - owl:versionIRI pattern:1.3.0 ; + owl:backwardCompatibleWith pattern:1.3.0 ; + owl:imports core:1.4.0 ; + owl:priorVersion pattern:1.3.0 ; + owl:versionIRI pattern:1.4.0 ; . pattern:LogicalPattern diff --git a/ontology/uco/role/role.ttl b/ontology/uco/role/role.ttl index 907c3b4a..f6136b44 100644 --- a/ontology/uco/role/role.ttl +++ b/ontology/uco/role/role.ttl @@ -1,4 +1,4 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 @prefix core: . @prefix owl: . @@ -11,10 +11,10 @@ a owl:Ontology ; rdfs:label "uco-role"@en ; - owl:backwardCompatibleWith role:1.2.0 ; - owl:imports core:1.3.0 ; - owl:priorVersion role:1.2.0 ; - owl:versionIRI role:1.3.0 ; + owl:backwardCompatibleWith role:1.3.0 ; + owl:imports core:1.4.0 ; + owl:priorVersion role:1.3.0 ; + owl:versionIRI role:1.4.0 ; . role:BenevolentRole diff --git a/ontology/uco/time/time.ttl b/ontology/uco/time/time.ttl index c78c605f..66a9db41 100644 --- a/ontology/uco/time/time.ttl +++ b/ontology/uco/time/time.ttl @@ -1,4 +1,4 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 @prefix core: . @prefix owl: . @@ -10,10 +10,10 @@ a owl:Ontology ; rdfs:label "uco-time"@en ; - owl:backwardCompatibleWith time:1.2.0 ; - owl:imports core:1.3.0 ; - owl:priorVersion time:1.2.0 ; - owl:versionIRI time:1.3.0 ; + owl:backwardCompatibleWith time:1.3.0 ; + owl:imports core:1.4.0 ; + owl:priorVersion time:1.3.0 ; + owl:versionIRI time:1.4.0 ; . time:Time diff --git a/ontology/uco/tool/tool.ttl b/ontology/uco/tool/tool.ttl index c5da6bd4..482f9553 100644 --- a/ontology/uco/tool/tool.ttl +++ b/ontology/uco/tool/tool.ttl @@ -1,5 +1,5 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/configuration/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/identity/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/configuration/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/identity/1.4.0 @prefix configuration: . @prefix core: . @@ -14,13 +14,13 @@ a owl:Ontology ; rdfs:label "uco-tool"@en ; - owl:backwardCompatibleWith tool:1.2.0 ; + owl:backwardCompatibleWith tool:1.3.0 ; owl:imports - configuration:1.3.0 , - identity:1.3.0 + configuration:1.4.0 , + identity:1.4.0 ; - owl:priorVersion tool:1.2.0 ; - owl:versionIRI tool:1.3.0 ; + owl:priorVersion tool:1.3.0 ; + owl:versionIRI tool:1.4.0 ; . tool:AnalyticTool diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index 3eba272f..646d7f6a 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -1,6 +1,6 @@ -# imports: https://ontology.unifiedcyberontology.org/co/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/core/1.3.0 -# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/co/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/core/1.4.0 +# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.4.0 @prefix co: . @prefix core: . @@ -16,14 +16,14 @@ a owl:Ontology ; rdfs:label "uco-types"@en ; - owl:backwardCompatibleWith types:1.2.0 ; + owl:backwardCompatibleWith types:1.3.0 ; owl:imports - uco-co:1.3.0 , - core:1.3.0 , - vocabulary:1.3.0 + uco-co:1.4.0 , + core:1.4.0 , + vocabulary:1.4.0 ; - owl:priorVersion types:1.2.0 ; - owl:versionIRI types:1.3.0 ; + owl:priorVersion types:1.3.0 ; + owl:versionIRI types:1.4.0 ; . types:ControlledDictionary diff --git a/ontology/uco/victim/victim.ttl b/ontology/uco/victim/victim.ttl index 5766391e..a2829734 100644 --- a/ontology/uco/victim/victim.ttl +++ b/ontology/uco/victim/victim.ttl @@ -1,4 +1,4 @@ -# imports: https://ontology.unifiedcyberontology.org/uco/role/1.3.0 +# imports: https://ontology.unifiedcyberontology.org/uco/role/1.4.0 @prefix owl: . @prefix rdf: . @@ -11,10 +11,10 @@ a owl:Ontology ; rdfs:label "uco-victim"@en ; - owl:backwardCompatibleWith victim:1.2.0 ; - owl:imports role:1.3.0 ; - owl:priorVersion victim:1.2.0 ; - owl:versionIRI victim:1.3.0 ; + owl:backwardCompatibleWith victim:1.3.0 ; + owl:imports role:1.4.0 ; + owl:priorVersion victim:1.3.0 ; + owl:versionIRI victim:1.4.0 ; . victim:Victim diff --git a/ontology/uco/vocabulary/vocabulary.ttl b/ontology/uco/vocabulary/vocabulary.ttl index 2ad3ac08..775e7ae0 100644 --- a/ontology/uco/vocabulary/vocabulary.ttl +++ b/ontology/uco/vocabulary/vocabulary.ttl @@ -7,9 +7,9 @@ a owl:Ontology ; rdfs:label "uco-vocabularies"@en ; - owl:backwardCompatibleWith vocabulary:1.2.0 ; - owl:priorVersion vocabulary:1.2.0 ; - owl:versionIRI vocabulary:1.3.0 ; + owl:backwardCompatibleWith vocabulary:1.3.0 ; + owl:priorVersion vocabulary:1.3.0 ; + owl:versionIRI vocabulary:1.4.0 ; . vocabulary:AccountTypeVocab From 38c9c52d9b0e2c12ba605ccbdc97ed8bf2312798 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 28 May 2025 08:44:33 -0400 Subject: [PATCH 61/61] Regenerate Make-managed files Signed-off-by: Alex Nelson --- ontology/uco/action/catalog-v001.xml | 12 ++++---- ontology/uco/analysis/catalog-v001.xml | 14 ++++----- ontology/uco/configuration/catalog-v001.xml | 2 +- ontology/uco/identity/catalog-v001.xml | 4 +-- ontology/uco/location/catalog-v001.xml | 2 +- ontology/uco/marking/catalog-v001.xml | 2 +- ontology/uco/master/catalog-v001.xml | 34 ++++++++++----------- ontology/uco/observable/catalog-v001.xml | 18 +++++------ ontology/uco/pattern/catalog-v001.xml | 2 +- ontology/uco/role/catalog-v001.xml | 2 +- ontology/uco/time/catalog-v001.xml | 2 +- ontology/uco/tool/catalog-v001.xml | 8 ++--- ontology/uco/types/catalog-v001.xml | 6 ++-- ontology/uco/victim/catalog-v001.xml | 4 +-- 14 files changed, 56 insertions(+), 56 deletions(-) diff --git a/ontology/uco/action/catalog-v001.xml b/ontology/uco/action/catalog-v001.xml index b2d6684c..ee8ab053 100644 --- a/ontology/uco/action/catalog-v001.xml +++ b/ontology/uco/action/catalog-v001.xml @@ -2,11 +2,11 @@ - - - - - - + + + + + + diff --git a/ontology/uco/analysis/catalog-v001.xml b/ontology/uco/analysis/catalog-v001.xml index 2bbe3a6d..74b38622 100644 --- a/ontology/uco/analysis/catalog-v001.xml +++ b/ontology/uco/analysis/catalog-v001.xml @@ -2,12 +2,12 @@ - - - - - - - + + + + + + + diff --git a/ontology/uco/configuration/catalog-v001.xml b/ontology/uco/configuration/catalog-v001.xml index 7efa2af0..282028b2 100644 --- a/ontology/uco/configuration/catalog-v001.xml +++ b/ontology/uco/configuration/catalog-v001.xml @@ -1,5 +1,5 @@ - + diff --git a/ontology/uco/identity/catalog-v001.xml b/ontology/uco/identity/catalog-v001.xml index 54b2425d..dd097305 100644 --- a/ontology/uco/identity/catalog-v001.xml +++ b/ontology/uco/identity/catalog-v001.xml @@ -1,6 +1,6 @@ - - + + diff --git a/ontology/uco/location/catalog-v001.xml b/ontology/uco/location/catalog-v001.xml index 61bbbed2..c4a5752c 100644 --- a/ontology/uco/location/catalog-v001.xml +++ b/ontology/uco/location/catalog-v001.xml @@ -1,5 +1,5 @@ - + diff --git a/ontology/uco/marking/catalog-v001.xml b/ontology/uco/marking/catalog-v001.xml index fa166323..a546aeeb 100644 --- a/ontology/uco/marking/catalog-v001.xml +++ b/ontology/uco/marking/catalog-v001.xml @@ -1,5 +1,5 @@ - + diff --git a/ontology/uco/master/catalog-v001.xml b/ontology/uco/master/catalog-v001.xml index 839b6401..c429ddb9 100644 --- a/ontology/uco/master/catalog-v001.xml +++ b/ontology/uco/master/catalog-v001.xml @@ -2,22 +2,22 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/ontology/uco/observable/catalog-v001.xml b/ontology/uco/observable/catalog-v001.xml index fb5f3d2b..fe48ee57 100644 --- a/ontology/uco/observable/catalog-v001.xml +++ b/ontology/uco/observable/catalog-v001.xml @@ -2,14 +2,14 @@ - - - - - - - - - + + + + + + + + + diff --git a/ontology/uco/pattern/catalog-v001.xml b/ontology/uco/pattern/catalog-v001.xml index 1e3db776..46a1c934 100644 --- a/ontology/uco/pattern/catalog-v001.xml +++ b/ontology/uco/pattern/catalog-v001.xml @@ -1,5 +1,5 @@ - + diff --git a/ontology/uco/role/catalog-v001.xml b/ontology/uco/role/catalog-v001.xml index 3d657139..81b3c837 100644 --- a/ontology/uco/role/catalog-v001.xml +++ b/ontology/uco/role/catalog-v001.xml @@ -1,5 +1,5 @@ - + diff --git a/ontology/uco/time/catalog-v001.xml b/ontology/uco/time/catalog-v001.xml index 900b7d33..bec0d874 100644 --- a/ontology/uco/time/catalog-v001.xml +++ b/ontology/uco/time/catalog-v001.xml @@ -1,5 +1,5 @@ - + diff --git a/ontology/uco/tool/catalog-v001.xml b/ontology/uco/tool/catalog-v001.xml index 33084fb7..4ac3d4a7 100644 --- a/ontology/uco/tool/catalog-v001.xml +++ b/ontology/uco/tool/catalog-v001.xml @@ -1,8 +1,8 @@ - - - - + + + + diff --git a/ontology/uco/types/catalog-v001.xml b/ontology/uco/types/catalog-v001.xml index fafb8699..81350b26 100644 --- a/ontology/uco/types/catalog-v001.xml +++ b/ontology/uco/types/catalog-v001.xml @@ -2,8 +2,8 @@ - - - + + + diff --git a/ontology/uco/victim/catalog-v001.xml b/ontology/uco/victim/catalog-v001.xml index 70228d09..9f558b81 100644 --- a/ontology/uco/victim/catalog-v001.xml +++ b/ontology/uco/victim/catalog-v001.xml @@ -1,6 +1,6 @@ - - + +