Skip to content

Commit

Permalink
Merge pull request #131 from casework/release-1.2.0
Browse files Browse the repository at this point in the history
Release 1.2.0
  • Loading branch information
plbt5 authored Mar 29, 2023
2 parents 0d0f0dd + 74aed3b commit efc880c
Show file tree
Hide file tree
Showing 20 changed files with 256 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# Unit testing files
.*.done.log
.*.ttl
venv

# Pycharm files
.idea

# Protege files
catalog-v001.xml
.project
11 changes: 11 additions & 0 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@
## Testing prerelease states

Practices for users interested in testing prerelease states are documented on the [Cyber Domain Ontology website](https://cyberdomainontology.org/ontology/development/#testing-prereleases).


## Using Protégé catalog files

Interested users of `catalog-v001.xml` files, e.g. users of [Protégé](https://protege.stanford.edu/), can use these XML files to interact with CASE as local files. To do so, CASE must be `git-clone`'d with Git submodules also cloned. This can be done with the following commands:

* `git clone --recursive https://github.com/casework/CASE.git` (all users)
* `git clone https://github.com/casework/CASE.git ; cd CASE ; make` (macOS or Linux users)
- The narrowest setup operation strictly for purposes of supporting the `catalog-v001.xml` files is to run `make .git_submodule_init.done.log` instead of the default `make all`.

Protégé should not require network connectivity to load imported ontologies after the above commands are run.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2023-03-28
* (0cb7b85) UCO Issue 449: Enable generating Protégé catalog files

2022-11-22
* ONT-491: Release CASE 1.1.0, with release notes at https://caseontology.org/releases/1.1.0/

Expand Down
47 changes: 44 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@

SHELL := /bin/bash

PYTHON3 ?= $(shell which python3.9 2>/dev/null || which python3.8 2>/dev/null || which python3.7 2>/dev/null || which python3.6 2>/dev/null || which python3)
PYTHON3 ?= $(shell which python3)

all:
all: \
.venv.done.log
$(MAKE) \
--directory ontology

# This recipe guarantees that 'git submodule init' and 'git submodule update' have run at least once.
# The recipe avoids running 'git submodule update' more than once, in case a user is testing with the submodule at a different commit than what CASE tracks.
Expand All @@ -38,8 +41,32 @@ all:
.lib.done.log
touch $@

# The two CASE-Utility... files are to trigger rebuilds based on command-line interface changes or version increments.
.venv.done.log: \
.git_submodule_init.done.log \
dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/case_shacl_inheritance_reviewer/__init__.py \
dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/setup.cfg \
dependencies/UCO/requirements.txt
rm -rf venv
$(PYTHON3) -m venv \
venv
source venv/bin/activate \
&& pip install \
--upgrade \
pip \
setuptools \
wheel
source venv/bin/activate \
&& pip install \
dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer
source venv/bin/activate \
&& pip install \
--requirement dependencies/UCO/requirements.txt
touch $@

check: \
.lib.done.log
.lib.done.log \
.venv.done.log
$(MAKE) \
--directory ontology \
check
Expand Down Expand Up @@ -70,3 +97,17 @@ clean:
)
@rm -f \
.*.done.log
@rm -rf \
venv

dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/case_shacl_inheritance_reviewer/__init__.py: \
.git_submodule_init.done.log
$(MAKE) \
--directory dependencies/UCO \
dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/case_shacl_inheritance_reviewer/__init__.py

dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/setup.cfg: \
.git_submodule_init.done.log
$(MAKE) \
--directory dependencies/UCO \
dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/setup.cfg
2 changes: 1 addition & 1 deletion dependencies/UCO
Submodule UCO updated 62 files
+3 −0 .gitignore
+12 −1 CONTRIBUTE.md
+44 −4 Makefile
+3 −3 README.md
+2 −0 etc/dependency_files.tsv
+1 −0 etc/domain_directories.tsv
+23 −4 ontology/co/Makefile
+6 −0 ontology/co/catalog-v001.xml
+3 −3 ontology/co/co.ttl
+4 −3 ontology/owl/owl.ttl
+13 −13 ontology/uco/action/action.ttl
+12 −0 ontology/uco/action/catalog-v001.xml
+5 −3 ontology/uco/analysis/analysis.ttl
+13 −0 ontology/uco/analysis/catalog-v001.xml
+5 −0 ontology/uco/configuration/catalog-v001.xml
+5 −5 ontology/uco/configuration/configuration.ttl
+4 −0 ontology/uco/core/catalog-v001.xml
+10 −8 ontology/uco/core/core.ttl
+6 −0 ontology/uco/identity/catalog-v001.xml
+7 −7 ontology/uco/identity/identity.ttl
+5 −0 ontology/uco/location/catalog-v001.xml
+5 −5 ontology/uco/location/location.ttl
+5 −0 ontology/uco/marking/catalog-v001.xml
+5 −5 ontology/uco/marking/marking.ttl
+23 −0 ontology/uco/master/catalog-v001.xml
+38 −38 ontology/uco/master/uco.ttl
+15 −0 ontology/uco/observable/catalog-v001.xml
+67 −23 ontology/uco/observable/observable.ttl
+5 −0 ontology/uco/pattern/catalog-v001.xml
+5 −5 ontology/uco/pattern/pattern.ttl
+5 −0 ontology/uco/role/catalog-v001.xml
+5 −5 ontology/uco/role/role.ttl
+5 −0 ontology/uco/time/catalog-v001.xml
+5 −5 ontology/uco/time/time.ttl
+8 −0 ontology/uco/tool/catalog-v001.xml
+7 −7 ontology/uco/tool/tool.ttl
+9 −0 ontology/uco/types/catalog-v001.xml
+13 −9 ontology/uco/types/types.ttl
+6 −0 ontology/uco/victim/catalog-v001.xml
+5 −5 ontology/uco/victim/victim.ttl
+4 −0 ontology/uco/vocabulary/catalog-v001.xml
+8 −3 ontology/uco/vocabulary/vocabulary.ttl
+0 −0 requirements.txt
+366 −0 src/create-catalog-v001.xml.py
+22 −3 src/review.mk
+0 −3 tests/.gitignore
+11 −38 tests/Makefile
+4 −6 tests/dependencies/Makefile
+5 −3 tests/examples/Makefile
+8 −0 tests/examples/hash_XFAIL_validation.ttl
+24 −0 tests/examples/observable_creation_time_PASS.json
+27 −0 tests/examples/observable_creation_time_PASS_validation.ttl
+12 −0 tests/examples/test_validation.py
+12 −8 tests/examples/uco_thing_XFAIL_validation.ttl
+3 −5 tests/shapes/Makefile
+3 −5 tests/shapes/examples_uco_owl/Makefile
+3 −5 tests/shapes/examples_uco_qc/Makefile
+57 −0 tests/shapes/examples_uco_qc/co_Collection_core_UcoObject_XFAIL.ttl
+38 −0 tests/shapes/examples_uco_qc/co_Collection_core_UcoObject_XFAIL_validation.ttl
+10 −0 tests/shapes/test_qc_shapes.py
+22 −0 tests/shapes/uco-qc.ttl
+8 −6 tests/test_uco_monolithic.py
Empty file added etc/dependency_files.tsv
Empty file.
2 changes: 2 additions & 0 deletions etc/domain_directories.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://ontology.caseontology.org/ ${top_srcdir}/ontology/
https://ontology.unifiedcyberontology.org/ ${top_srcdir}/dependencies/UCO/ontology/
22 changes: 21 additions & 1 deletion ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,38 @@
#
# We would appreciate acknowledgement if the software is used.

all:
SHELL := /bin/bash

top_srcdir := ..

all: \
all-investigation \
all-master \
all-vocabulary

.PHONY: \
all-investigation \
all-master \
all-vocabulary \
check-investigation \
check-master \
check-vocabulary \
clean-investigation \
clean-master \
clean-vocabulary

all-investigation:
$(MAKE) \
--directory investigation

all-master:
$(MAKE) \
--directory master

all-vocabulary:
$(MAKE) \
--directory vocabulary

check: \
check-master \
check-investigation \
Expand Down
34 changes: 31 additions & 3 deletions ontology/investigation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@
#
# We would appreciate acknowledgement if the software is used.

SHELL := /bin/bash

top_srcdir := ../..

all:
uco_srcdir := $(top_srcdir)/dependencies/UCO

ttl_basenames := investigation.ttl

all: \
catalog-v001.xml

.check-investigation.ttl: \
$(top_srcdir)/.lib.done.log \
Expand All @@ -26,11 +33,32 @@ all:
--target-format turtle
mv _$@ $@

catalog-v001.xml: \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
$(uco_srcdir)/ontology/uco/action/catalog-v001.xml \
$(uco_srcdir)/ontology/uco/role/catalog-v001.xml \
$(uco_srcdir)/src/create-catalog-v001.xml.py
rm -f _$@
source $(top_srcdir)/venv/bin/activate \
&& python3 $(uco_srcdir)/src/create-catalog-v001.xml.py \
--catalog-xml $(uco_srcdir)/ontology/uco/action/catalog-v001.xml \
--catalog-xml $(uco_srcdir)/ontology/uco/role/catalog-v001.xml \
_$@ \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
"$(top_srcdir)" \
$(ttl_basenames)
mv _$@ $@

check: \
.check-investigation.ttl
.check-investigation.ttl \
catalog-v001.xml
diff investigation.ttl .check-investigation.ttl

clean:
@rm -f \
.check-*.ttl \
_*
_* \
catalog-v001.xml
15 changes: 15 additions & 0 deletions ontology/investigation/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/dependencies/collections-ontology/collections.owl" name="http://purl.org/co"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/dependencies/error/docs/current/error.ttl" name="http://purl.org/spar/error"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/co/co.ttl" name="https://ontology.unifiedcyberontology.org/co/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/action/action.ttl" name="https://ontology.unifiedcyberontology.org/uco/action/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/core/core.ttl" name="https://ontology.unifiedcyberontology.org/uco/core/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/location/location.ttl" name="https://ontology.unifiedcyberontology.org/uco/location/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/pattern/pattern.ttl" name="https://ontology.unifiedcyberontology.org/uco/pattern/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/role/role.ttl" name="https://ontology.unifiedcyberontology.org/uco/role/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/types/types.ttl" name="https://ontology.unifiedcyberontology.org/uco/types/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/vocabulary/vocabulary.ttl" name="https://ontology.unifiedcyberontology.org/uco/vocabulary/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../vocabulary/vocabulary.ttl" name="https://ontology.caseontology.org/case/vocabulary/1.2.0"/>
<uri id="User Entered Import Resolution" uri="investigation.ttl" name="https://ontology.caseontology.org/case/investigation"/>
</catalog>
18 changes: 9 additions & 9 deletions ontology/investigation/investigation.ttl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# imports: https://ontology.caseontology.org/case/vocabulary/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/action/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/role/1.1.0
# imports: https://ontology.caseontology.org/case/vocabulary/1.2.0
# imports: https://ontology.unifiedcyberontology.org/uco/action/1.2.0
# imports: https://ontology.unifiedcyberontology.org/uco/role/1.2.0

@prefix investigation: <https://ontology.caseontology.org/case/investigation/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
Expand All @@ -17,14 +17,14 @@
a owl:Ontology ;
rdfs:label "investigation"@en ;
rdfs:comment "This ontology defines key concepts, and their associated properties and relationships, for characterizing cyber-investigations in the broadest range of contexts, including security incidents, criminal investigations, civil and regulatory matters, intelligence operations, international disputes, accident inquiries, policy violations, and others." ;
owl:backwardCompatibleWith investigation:1.0.0 ;
owl:backwardCompatibleWith investigation:1.1.0 ;
owl:imports
vocabulary:1.1.0 ,
uco-action:1.1.0 ,
uco-role:1.1.0
vocabulary:1.2.0 ,
uco-action:1.2.0 ,
uco-role:1.2.0
;
owl:priorVersion investigation:1.0.0 ;
owl:versionIRI investigation:1.1.0 ;
owl:priorVersion investigation:1.1.0 ;
owl:versionIRI investigation:1.2.0 ;
.

investigation:Attorney
Expand Down
32 changes: 29 additions & 3 deletions ontology/master/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@
#
# We would appreciate acknowledgement if the software is used.

SHELL := /bin/bash

top_srcdir := ../..

all:
uco_srcdir := $(top_srcdir)/dependencies/UCO

ttl_basenames := case.ttl

all: \
catalog-v001.xml

.check-case.ttl: \
$(top_srcdir)/.lib.done.log \
Expand All @@ -26,11 +33,30 @@ all:
--target-format turtle
mv _$@ $@

catalog-v001.xml: \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
$(uco_srcdir)/ontology/uco/master/catalog-v001.xml \
$(uco_srcdir)/src/create-catalog-v001.xml.py
rm -f _$@
source $(top_srcdir)/venv/bin/activate \
&& python3 $(uco_srcdir)/src/create-catalog-v001.xml.py \
--catalog-xml $(uco_srcdir)/ontology/uco/master/catalog-v001.xml \
_$@ \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
"$(top_srcdir)" \
$(ttl_basenames)
mv _$@ $@

check: \
.check-case.ttl
.check-case.ttl \
catalog-v001.xml
diff case.ttl .check-case.ttl

clean:
@rm -f \
.check-*.ttl \
_*
_* \
catalog-v001.xml
20 changes: 10 additions & 10 deletions ontology/master/case.ttl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# imports: https://ontology.caseontology.org/case/investigation/1.1.0
# imports: https://ontology.caseontology.org/case/vocabulary/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/uco/1.1.0
# imports: https://ontology.caseontology.org/case/investigation/1.2.0
# imports: https://ontology.caseontology.org/case/vocabulary/1.2.0
# imports: https://ontology.unifiedcyberontology.org/uco/uco/1.2.0

@prefix dct: <http://purl.org/dc/terms/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
Expand All @@ -16,14 +16,14 @@
rdfs:label "case-master"@en ;
rdfs:comment "The Cyber-investigation Analysis Standard Expression (CASE) ontology is a community-developed standard that defines concepts used in a broad range of cyber-investigation domains, including digital forensic science, incident response, counter-terrorism, criminal justice, forensic intelligence, and situational awareness. CASE includes all aspects of the digital forensic process, from evidence-gathering and chain of custody, to generating a final report. The goal is to increase sharing and interoperability of cyber-investigation information among organizations and between forensic analytic tools. CASE aligns with and extends the Unified Cyber Ontology (UCO). The preferred namespace abbreviation for this ontology is: case-master."@en ;
dct:title "Cyber-investigation Analysis Standard Expression (CASE)"@en ;
owl:backwardCompatibleWith <https://ontology.caseontology.org/case/case/1.0.0> ;
owl:backwardCompatibleWith <https://ontology.caseontology.org/case/case/1.1.0> ;
owl:imports
<https://ontology.caseontology.org/case/investigation/1.1.0> ,
<https://ontology.caseontology.org/case/vocabulary/1.1.0> ,
<https://ontology.unifiedcyberontology.org/uco/uco/1.1.0>
<https://ontology.caseontology.org/case/investigation/1.2.0> ,
<https://ontology.caseontology.org/case/vocabulary/1.2.0> ,
<https://ontology.unifiedcyberontology.org/uco/uco/1.2.0>
;
owl:priorVersion <https://ontology.caseontology.org/case/case/1.0.0> ;
owl:versionIRI <https://ontology.caseontology.org/case/case/1.1.0> ;
owl:versionInfo "1.1.0" ;
owl:priorVersion <https://ontology.caseontology.org/case/case/1.1.0> ;
owl:versionIRI <https://ontology.caseontology.org/case/case/1.2.0> ;
owl:versionInfo "1.2.0" ;
.

26 changes: 26 additions & 0 deletions ontology/master/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/dependencies/collections-ontology/collections.owl" name="http://purl.org/co"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/dependencies/error/docs/current/error.ttl" name="http://purl.org/spar/error"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/co/co.ttl" name="https://ontology.unifiedcyberontology.org/co/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/owl/owl.ttl" name="https://ontology.unifiedcyberontology.org/owl/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/action/action.ttl" name="https://ontology.unifiedcyberontology.org/uco/action/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/analysis/analysis.ttl" name="https://ontology.unifiedcyberontology.org/uco/analysis/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/configuration/configuration.ttl" name="https://ontology.unifiedcyberontology.org/uco/configuration/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/core/core.ttl" name="https://ontology.unifiedcyberontology.org/uco/core/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/identity/identity.ttl" name="https://ontology.unifiedcyberontology.org/uco/identity/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/location/location.ttl" name="https://ontology.unifiedcyberontology.org/uco/location/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/marking/marking.ttl" name="https://ontology.unifiedcyberontology.org/uco/marking/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/master/uco.ttl" name="https://ontology.unifiedcyberontology.org/uco/uco/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/observable/observable.ttl" name="https://ontology.unifiedcyberontology.org/uco/observable/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/pattern/pattern.ttl" name="https://ontology.unifiedcyberontology.org/uco/pattern/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/role/role.ttl" name="https://ontology.unifiedcyberontology.org/uco/role/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/time/time.ttl" name="https://ontology.unifiedcyberontology.org/uco/time/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/tool/tool.ttl" name="https://ontology.unifiedcyberontology.org/uco/tool/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/types/types.ttl" name="https://ontology.unifiedcyberontology.org/uco/types/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/victim/victim.ttl" name="https://ontology.unifiedcyberontology.org/uco/victim/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/vocabulary/vocabulary.ttl" name="https://ontology.unifiedcyberontology.org/uco/vocabulary/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../investigation/investigation.ttl" name="https://ontology.caseontology.org/case/investigation/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../vocabulary/vocabulary.ttl" name="https://ontology.caseontology.org/case/vocabulary/1.2.0"/>
<uri id="User Entered Import Resolution" uri="case.ttl" name="https://ontology.caseontology.org/case/case"/>
</catalog>
Loading

0 comments on commit efc880c

Please sign in to comment.