ucoProject / UCO-Utility-Pre-0.7.0-Validator

Utility for validation of UCO 0.4.0, UCO 0.5.0, UCO 0.6.0 & UCO 0.7.0 content
Other
2 stars 4 forks source link
graphs json-ld ontology rdf uco validation

UCO-Utility-Pre-0.7.0-Validator

Description - (Beta Release Version 1.1)

The UCO/CASE Validation Toolkit provides the capability to validate JSON-LD data files against a turtle-file based ontology such as the Unified Cyber Ontology (UCO) and Cyber-Investigation Analysis Standard Expression (CASE).

Note - this tool has a number of suggested improvements that may be added in the future. Among these, the tool may present error messages that could be viewed by some as warnings vs errors in ontological representation.

Getting Started

Dependencies:

There are minor toolkit setup differences between Linux and Windows, described here:

Installing - Linux

  1. Create empty working directory

    • $ mkdir foo
    • $ cd foo
  2. Copy source files into the working directory

  3. In the tookit directory, create a python3 virtual environment

    • $ cd UCO-Utility-Pre-0.7.0-Validator
    • $ virtualenv --python=python3 venv
  4. Activate the virtual environment

    • $ source venv/bin/activate
  5. Install the source into the virtual environment

    • $ pip install --upgrade pip
    • $ pip install --editable src
  6. Run python commands

Installing - Windows

  1. Create empty working directory
    • mkdir foo
  2. Copy source files
  3. Create virtual environment
    • foo> cd UCO-Utility-Pre-0.7.0-Validator
    • foo\enhanced-case-toolkit> virtualenv --python=python3 venv
  4. Activate the virtual environment
    • foo\enhanced-case-toolkit> venv\Scripts\activate
  5. Install the source
    • (venv) foo\enhanced-case-toolkit> pip install --editable src
  6. Run the scripts from src directory, for example:
    • (venv) foo\enhanced-case-toolkit> cd src
    • (venv) foo\enhanced-case-toolkit\src> python validate.py ..\data\ontology-0.4.0\ontology ..\data\samples-0.4\accounts.json
  7. When done, deactivate the virtual environment
    • (venv) foo\enhanced-case-toolkit> deactivate

Executing the tool

As long as the virtual environment is activated, you can now run these scripts.


validate ontology_path jsonld_path [jsonld_path...]

Validate json-ld data against an ontology

Convert version UCO 0.4 json-ld data to UCO 0.5

Serialize ontology or json-ld file

Describe serialized file