Welcome to your guide for navigating through our repositories and setting up the project. Follow the steps below to get everything up and running smoothly. 🚀
Ensure you have the following software installed:
- Python3 🐍
- Neo4j 🌐
- Protege 🦉
Here's an overview to help you set up the software:
- Cloning the GitHub repository 📦
- Installing Protege (Ontology Editor) 📚
- Installing Neo4j Desktop (GraphDB) 🖥
- Running the Dashboard 📊
Clone the repository including submodules with the following command:
git clone --recurse-submodules https://github.com/uol-feps-soc-comp3931-2324-classroom/final-year-project-ASHS21.git
Navigate to the directory:
cd final-year-project-ASHS21/
Choose the installation guide based on your operating system:
For beginners: Getting Started with Protege
Download Neo4j Desktop for your OS: Download Neo4j Desktop
Start by navigating to the working directory inside the repo:
cd csonto/target/csonto/
Install the required Python packages:
pip install -r requirements.txt
Ensure the Neo4j database is running, then launch the dashboard:
streamlit run streamlit_app.py
Follow the pop-up page or the link on the terminal.
Navigate to the main directory in the repo:
cd csonto/target/csonto/
Go to the evaluation directory:
cd evaluation/
Execute the following files to evaluate the ontology and knowledge graph:
python3 modelEval.py
python3 ontologyEval.py
python3 kgEval.py
python3 ML-LinkPredict.py
Follow this guide to navigate through the various ontology files within the project repository.
To begin working with the ontology files, please ensure you are in the correct directory within the repository.
-
Navigate to the ontology directory by running the following command in your terminal:
cd csonto/target/csonto/src/ontology/
-
Within this directory, you will find several files named
csonto-edit
. You can open any of these files using Protege to view or modify the ontology.
If you need to work with scripts related to the ontology, follow these steps:
-
If you're already in the ontology directory, navigate to the scripts directory by executing:
cd csonto/target/csonto/src/scripts/
-
StatusChecker Script: This script is responsible for checking the status of various policies within the ontology.
-
OntologyBuilder Script: This script aids in building and evolving the ontology throughout the development process.
-
Onto_Definitions & Updates Script: Use this script for defining and updating instances within the ontology.
To find the full ontology documentation, follow this link: CyberSecurity Ontology Docs Or, find the alternative docs : Alternative Ontology Docs
Welcome to the guide on accessing the Cybersecurity Knowledge Graph (CSKG) via the Neo4j Desktop. Follow these steps to navigate and execute queries within the Neo4j browser.
Once you have opened Neo4j Desktop, proceed to the Neo4j Browser to start interacting with the database.
To explore the complete Cybersecurity Knowledge Graph, execute the following Cypher query. This query retrieves all nodes connected by either REPORTS_TO
or PART_OF
relationships, providing a comprehensive view of the graph.
MATCH (n:CyberSecurityScore)<-[r:REPORTS_TO]-(m) RETURN n, r, m
UNION
MATCH (n)<-[r:PART_OF]-(m) RETURN n, r, m
If you are interested in a more focused view of the CSKG's core elements, use the query below. This query specifically retrieves nodes and relationships where nodes report directly to a CyberSecurityScore
.
MATCH (n:CyberSecurityScore)<-[r:REPORTS_TO]-(m) RETURN n, r, m
Depending on your needs for analysis or data visualization, you can utilize these queries to delve into different aspects of the CSKG.