Data Loss Prevention — Class Project Overview

High School Technology Team • Python • Databases • Automation

1. Project Summary

In this project, your team will build a Data Loss Prevention (DLP) system using Python. The system watches a folder on the computer and records every change:

All activity is logged into a SQLite database, and an HTML report is automatically generated.

2. What the Python Script Does

The Python script performs four major tasks:

  1. Create required folders if they don’t exist:
    • C:\Temp\projectAniston\monitor\
    • C:\Temp\projectAniston\DB\
    • C:\Temp\projectAniston\HTML\
  2. Monitor the folder for changes using a file‑watching library.
  3. Log events (CREATED, MODIFIED, DELETED) into:
    dataLossPrevention.db
  4. Generate an HTML report showing all logged activity.
Key idea: This is the same technique used in real cybersecurity systems to detect tampering or unauthorized access.

3. How the Database Works

The script creates a SQLite database with a single table called events. Each time something changes in the monitored folder, a new row is added.

The table stores:

SQLite is perfect for this project because it is lightweight, file‑based, and requires no server.

4. HTML Report Generation

Every time the database is updated, the script regenerates an HTML file:

C:\Temp\projectAniston\HTML\dataLossPrevention.html

This report shows a table of all file activity, making it easy to review what happened and when.

Goal: Build a clean, readable dashboard that updates automatically.

5. Why This Project Matters

This project teaches real‑world skills used in:

You’ll learn how to combine hardware concepts (file systems), software logic (Python), and data storage (SQLite) into a single working system.

Challenge: Add features like email alerts, file hashing, or a live‑updating web dashboard.