GithubHelp home page GithubHelp logo

casework / case-utility-verifier Goto Github PK

View Code? Open in Web Editor NEW
2.0 10.0 4.0 9.15 MB

API used for instantiating CASE objects (includes ontological verification and type checking).

License: Other

Python 100.00%
adoption api verification ontology rdf-graph python rdf json-ld autogeneration

case-utility-verifier's Introduction

Cyber-investigation Analysis Standard Expression (CASE)

Read the CASE Wiki tab to learn everything you need to know about the Cyber-investigation Analysis Standard Expression (CASE) ontology. For learning about the Unified Cyber Ontology, CASE's parent, see UCO.

CASE Python API

Development Status: Alpha

Alpha status implies:

  • Designation of versions of CASE and UCO the project supports.
  • Follow Semantic Versioning (SEMVER).

Quickstart

  1. python setup.py install
  2. Import case.py and NLG.py into the file you plan to implement CASE.

NLG.py & CASE.py

The Natural Language Glossary (NLG) is an alphabetical list of types of CASE classes (categories of CASE types). The functions in NLG.py create CASE objects (instances of such types) while automatically checking ontology and type. The API (case.py) could be used directly to create non-typed objects if ontology and type checking are not requirements. However, we advise against this to maintain consistency across community usage of the ontology.

Note that different versions of the NLG exist for different realizations of the Unified Cyber Ontology. The human legible NLG corresponding to this version of CASE (one realization of UCO) can be found here: https://casework.github.io/case/case-v0.1.0-natural-language-glossary.html

The API wraps RDFLib for a JSON-LD schematic. This verison is only directly adoptable via Python but JSON-LD is also supported in Javascript, PHP, Ruby, Java, C#, and Go.

Examples

The example folder contains a slimmed down NLG, for an understanding of some of the basic function variations that exist, as well as a template for all types of conditions checked by the NLG functions.

NLG Autogeneration (only for CASE team to manage API)

Note that currently the script will not function properly because v0.1.0 of CASE does not have a cardinality field for each object and property. When this is added the script will be stable and new_NLG.py in the outputs folder will not have missing body checks.

Dependency: Ontospy

When CASE's base specification (Turtle files) changes this script can be used to automatically regenerate the NLG.py functions for the next release. Therefore, this should only be run by the CASE team - eventually it will move to a new (possibly backend) repo where a CI/CD framework is placed.

To run Ontospy must be installed, and the Turtle files combined into one. Then run python autogen-api.py <path-to-turtle-file>. (Note there is a ToDo list in the autogen-api.py file so that it can align with changes that may occur in the API, as well as other add new features such as better CLI flags, a CSV export of all object names and properties for the Ontologists and Mappers teams to use for quick reference, etc.)

I have a question!

Before you post a Github issue or send an email ensure you've done this checklist:

  1. Determined scope of your task. It is not necessary for most parties to understand all aspects of the ontology, mapping methods, and supporting tools.

  2. Familiarize yourself with the labels and search the Issues tab. Typically, only light-blue and red labels should be used by non-admin Github users while the others should be used by CASE Github admins. All but the red Project labels are found in every casework repository.

case-utility-verifier's People

Contributors

jstroud-mitre avatar vikhari avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

case-utility-verifier's Issues

Add export functionality for Ontologists

The list of objects/properties (and native data types) parsed in these scripts can be exported to an excel "cheat sheet," which will help the Mappers and Ontologists teams to keep track of all objects/properties when helping adopters/making decisions. This also helps track changes between different version of the ontology. Doing a quick diff will show new objects/properties added (useful for tracking overall progress of project).

Move to Python 3

Python 2 was used for Ontospy and other tools. If Python 3 can be used for Autogeneration and the API itself, etc. then we should transition. This should likely be done after reaching a stable version of CASE to first get the workflow and framework more stable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.