Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jazbengu/ThreatDetect/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through cloning the repository, installing dependencies, starting the app, and running your first threat detection analysis. By the end you will have ThreatDetect running in your browser and a results CSV with risk scores for every employee record in your dataset.
ThreatDetect requires Python 3.8 or later. Check your version with python --version before proceeding.
1

Clone or download the repository

Clone the ThreatDetect repository from GitHub to your local machine:
git clone https://github.com/jazbengu/ThreatDetect.git
cd ThreatDetect
If you prefer not to use Git, download the repository as a ZIP from GitHub and extract it.
2

Install dependencies

Install all required Python packages using pip:
pip install -r requirements.txt
This installs Streamlit, XGBoost, SHAP, and the other libraries ThreatDetect depends on. See the installation guide for a full list of packages.
3

Launch the app

Start the Streamlit application from the repository root:
streamlit run streamlit_app.py
Streamlit opens ThreatDetect in your default browser at http://localhost:8501. Leave this terminal session running while you use the app.
4

Upload your CSV and run detection

  1. In the sidebar, select Organisational Search via CSV.
  2. Click Browse files and upload a CSV that contains the required columns (employee_campus, has_criminal_record, is_contractor, has_foreign_citizenship, total_printed_pages, num_printed_pages_off_hours, total_files_burned, entry_during_weekend, late_exit_flag).
  3. Click Run Threat Detection to start the analysis.
  4. Review the organizational summary, risk probability distribution, and SHAP explanations.
  5. Expand Detailed Results Table and click Download results as CSV to save the output.
Each row in the results CSV includes a Prediction (Malicious or Normal), Risk_Prob, Anomaly_Score, and Confidence value.
If you do not have a dataset ready, navigate to the Exploratory Data Analysis page and select Use sample dataset. This loads a bundled dataset you can explore before running detection on your own data.

Build docs developers (and LLMs) love