Skip to content

Commit

Permalink
Merge branch 'develop-2.0.0' into Feature-Issue-619-2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnelson-nist committed Jul 30, 2024
2 parents c205205 + db5d688 commit 5599ce3
Show file tree
Hide file tree
Showing 19 changed files with 63 additions and 206 deletions.
10 changes: 10 additions & 0 deletions ontology/owl/owl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,16 @@ uco-owl:rdf-rest-subjects-shape
sh:targetSubjectsOf rdf:rest ;
.

uco-owl:sh-datatype-objects-shape
a sh:NodeShape ;
sh:description "This shape enforces that the sh:datatype constraining predicate does not bind an OWL class for a literal-valued constraint."@en ;
sh:not [
a sh:NodeShape ;
sh:class owl:Class ;
] ;
sh:targetObjectsOf sh:datatype ;
.

uco-owl:unionOf-subjects-shape
a sh:NodeShape ;
sh:property [
Expand Down
2 changes: 1 addition & 1 deletion ontology/uco/action/action.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ action:ActionLifecycle
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf action:Action ;
rdfs:subClassOf action:ActionPattern ;
rdfs:label "ActionLifecycle"@en ;
rdfs:comment "An action lifecycle is an action pattern consisting of an ordered set of multiple actions or subordinate action lifecycles."@en ;
sh:property
Expand Down
3 changes: 1 addition & 2 deletions ontology/uco/core/core.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,11 @@ core:UcoInherentCharacterizationThing

core:UcoInherentCharacterizationThing-disjointWith-UcoObject-shape
a sh:NodeShape ;
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:message "core:UcoInherentCharacterizationThing and core:UcoObject are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class core:UcoObject ;
] ;
sh:severity sh:Warning ;
sh:targetClass core:UcoInherentCharacterizationThing ;
.

Expand Down
32 changes: 8 additions & 24 deletions ontology/uco/observable/observable.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
@prefix location: <https://ontology.unifiedcyberontology.org/uco/location/> .
@prefix observable: <https://ontology.unifiedcyberontology.org/uco/observable/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix pattern: <https://ontology.unifiedcyberontology.org/uco/pattern/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
Expand Down Expand Up @@ -236,17 +237,9 @@ observable:AlternateDataStream
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:ObservableObject ;
rdfs:subClassOf observable:FileSystemObject ;
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 ;
.

Expand Down Expand Up @@ -3214,12 +3207,11 @@ observable:File

observable:File-disjointWith-URL-shape
a sh:NodeShape ;
sh:message "observable:File and observable:URL are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ;
sh:message "observable:File and observable:URL are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class observable:URL ;
] ;
sh:severity sh:Warning ;
sh:targetClass observable:File ;
.

Expand Down Expand Up @@ -5050,7 +5042,10 @@ observable:ObservablePattern
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:Observable ;
rdfs:subClassOf
observable:Observable ,
pattern:Pattern
;
rdfs:label "ObservablePattern"@en ;
rdfs:comment "An observable pattern is a grouping of characteristics unique to a logical pattern composed of observable object and observable action properties."@en ;
sh:targetClass observable:ObservablePattern ;
Expand All @@ -5070,15 +5065,11 @@ observable:ObservableRelationship
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 ;
Expand Down Expand Up @@ -8929,12 +8920,6 @@ observable:WindowsThreadFacet
rdfs:label "WindowsThreadFacet"@en ;
rdfs:comment "A Windows thread facet is a grouping os characteristics unique to a single thread of execution within a Windows process."@en ;
sh:property
[
sh:datatype xsd:dateTime ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path observable:creationTime ;
] ,
[
sh:datatype xsd:dateTime ;
sh:maxCount "1"^^xsd:integer ;
Expand Down Expand Up @@ -10280,9 +10265,8 @@ observable:creationTime-deprecation-shape
sh:property [
a sh:PropertyShape ;
sh:maxCount "0"^^xsd:integer ;
sh:message "observable:creationTime is deprecated, and will be an error to use in UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:message "observable:creationTime is deprecated, and an error to use as of UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:path observable:creationTime ;
sh:severity sh:Warning ;
] ;
sh:targetSubjectsOf observable:creationTime ;
.
Expand Down
10 changes: 8 additions & 2 deletions ontology/uco/pattern/pattern.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pattern:LogicalPattern
rdfs:label "LogicalPattern"@en ;
rdfs:comment "A logical pattern is a grouping of characteristics unique to an informational pattern expressed via a structured pattern expression following the rules of logic."@en ;
sh:property [
sh:datatype pattern:PatternExpression ;
sh:datatype xsd:string ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path pattern:patternExpression ;
Expand All @@ -48,18 +48,24 @@ pattern:Pattern
pattern:PatternExpression
a
owl:Class ,
owl:DeprecatedClass ,
sh:NodeShape
;
rdfs:subClassOf core:UcoInherentCharacterizationThing ;
rdfs:label "PatternExpression"@en ;
rdfs:comment "A pattern expression is a grouping of characteristics unique to an explicit logical expression defining a pattern (e.g., regular expression, SQL Select expression, etc.)."@en ;
sh:message "pattern:PatternExpression is deprecated, and an error to use as of UCO 2.0.0. xsd:string should be used instead." ;
sh:not [
a sh:NodeShape ;
sh:class pattern:PatternExpression ;
] ;
sh:targetClass pattern:PatternExpression ;
.

pattern:patternExpression
a owl:DatatypeProperty ;
rdfs:label "patternExpression"@en ;
rdfs:comment "An explicit logical pattern expression."@en ;
rdfs:range pattern:PatternExpression ;
rdfs:range xsd:string ;
.

10 changes: 4 additions & 6 deletions ontology/uco/types/types.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ types:Thread
;
rdfs:subClassOf
co:Bag ,
core:UcoThing
core:UcoInherentCharacterizationThing
;
rdfs:label "Thread"@en ;
rdfs:comment "A semi-ordered array of items, that can be present in multiple copies. Implemetation of a UCO Thread is similar to a Collections Ontology List, except a Thread may fork and merge - that is, one of its members may have two or more direct successors, and two or more direct predecessors."@en ;
Expand All @@ -281,12 +281,11 @@ 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:message "types:Thread and co:List are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class co:List ;
] ;
sh:severity sh:Warning ;
sh:targetClass types:Thread ;
.

Expand All @@ -297,7 +296,7 @@ types:ThreadItem
;
rdfs:subClassOf
co:Item ,
core:UcoThing
core:UcoInherentCharacterizationThing
;
rdfs:label "ThreadItem"@en ;
rdfs:comment "A ThreadItem is a member of a thread."@en ;
Expand All @@ -310,12 +309,11 @@ 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:message "types:ThreadItem and co:ListItem are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class co:ListItem ;
] ;
sh:severity sh:Warning ;
sh:targetClass types:ThreadItem ;
.

Expand Down
12 changes: 6 additions & 6 deletions tests/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ all: \
database_records_XFAIL_validation.ttl \
dictionary_PASS_validation.ttl \
dictionary_XFAIL_validation.ttl \
disjointedness_PASS_validation.ttl \
disjointedness_XFAIL_validation.ttl \
event_XFAIL_validation.ttl \
file_url_PASS_validation.ttl \
file_url_XFAIL_validation.ttl \
has_facet_inverse_functional_PASS_validation.ttl \
has_facet_inverse_functional_XFAIL_validation.ttl \
hash_PASS_validation.ttl \
Expand All @@ -42,7 +42,7 @@ all: \
location_XFAIL_validation.ttl \
message_thread_PASS_validation.ttl \
message_thread_XFAIL_validation.ttl \
observable_creation_time_PASS_validation.ttl \
observable_creation_time_XFAIL_validation.ttl \
owl_axiom_PASS_validation.ttl \
owl_axiom_XFAIL_validation.ttl \
owl_properties_PASS_validation.ttl \
Expand Down Expand Up @@ -106,9 +106,9 @@ check: \
database_records_XFAIL_validation.ttl \
dictionary_PASS_validation.ttl \
dictionary_XFAIL_validation.ttl \
disjointedness_PASS_validation.ttl \
disjointedness_XFAIL_validation.ttl \
event_XFAIL_validation.ttl \
file_url_PASS_validation.ttl \
file_url_XFAIL_validation.ttl \
has_facet_inverse_functional_PASS_validation.ttl \
has_facet_inverse_functional_XFAIL_validation.ttl \
hash_PASS_validation.ttl \
Expand All @@ -118,7 +118,7 @@ check: \
location_XFAIL_validation.ttl \
message_thread_PASS_validation.ttl \
message_thread_XFAIL_validation.ttl \
observable_creation_time_PASS_validation.ttl \
observable_creation_time_XFAIL_validation.ttl \
owl_axiom_PASS_validation.ttl \
owl_axiom_XFAIL_validation.ttl \
owl_properties_PASS_validation.ttl \
Expand Down
11 changes: 3 additions & 8 deletions tests/examples/alternate_data_stream_PASS.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
{
"@context": {
"kb": "http://example.org/kb/",
"observable": "https://ontology.unifiedcyberontology.org/uco/observable/",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#"
"observable": "https://ontology.unifiedcyberontology.org/uco/observable/"
},
"@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"
"@type": "observable:AlternateDataStream"
},
{
"@id": "kb:AlternateDataStream-b2d4968b-4490-4b44-a56b-832058834454",
"@type": [
"observable:AlternateDataStream",
"observable:FileSystemObject"
]
"@type": "observable:AlternateDataStream"
}
]
}
17 changes: 0 additions & 17 deletions tests/examples/alternate_data_stream_PASS_validation.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@prefix observable: <https://ontology.unifiedcyberontology.org/uco/observable/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
Expand All @@ -8,21 +7,5 @@
[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/AlternateDataStream-07b3c41a-080c-4916-8375-c18148763e13> ;
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 <http://example.org/kb/AlternateDataStream-07b3c41a-080c-4916-8375-c18148763e13> ;
] ;
.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"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."
"rdfs:comment": "This node will trigger a violation 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."
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
sh:conforms "false"^^xsd:boolean ;
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/File-33a25932-3a1a-4828-a90f-d31818b495ce> ;
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:resultMessage "core:UcoInherentCharacterizationThing and core:UcoObject are disjoint classes."@en ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NotConstraintComponent ;
sh:sourceShape core:UcoInherentCharacterizationThing-disjointWith-UcoObject-shape ;
sh:value <http://example.org/kb/File-33a25932-3a1a-4828-a90f-d31818b495ce> ;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
sh:conforms "false"^^xsd:boolean ;
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Thing-23a38d67-3432-458b-9651-955b418c2a77> ;
sh:resultMessage "observable:File and observable:URL 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:resultMessage "observable:File and observable:URL are disjoint classes."@en ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NotConstraintComponent ;
sh:sourceShape observable:File-disjointWith-URL-shape ;
sh:value <http://example.org/kb/Thing-23a38d67-3432-458b-9651-955b418c2a77> ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
sh:conforms "false"^^xsd:boolean ;
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/windows-thread-facet-4967ae35-f00b-49c8-9dd2-38e3bdf851e1> ;
sh:resultMessage "observable:creationTime is deprecated, and will be an error to use in UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:resultMessage "observable:creationTime is deprecated, and an error to use as of UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:resultPath observable:creationTime ;
sh:resultSeverity sh:Warning ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxCountConstraintComponent ;
sh:sourceShape [
a sh:PropertyShape ;
sh:maxCount "0"^^xsd:integer ;
sh:message "observable:creationTime is deprecated, and will be an error to use in UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:message "observable:creationTime is deprecated, and an error to use as of UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:path observable:creationTime ;
sh:severity sh:Warning ;
] ;
] ;
.
Expand Down
Loading

0 comments on commit 5599ce3

Please sign in to comment.