VERITAS is a lightweight and stylish File Integrity Monitoring (FIM) tool that helps you detect unauthorized file changes using SHA-256 hashing.
-
SHA-256 Cryptographic Hashing
Generates secure file fingerprints to detect unauthorized modifications. -
Baseline Initialization
Create an initial integrity snapshot for a single file or an entire directory. -
Integrity Change Detection
Identifies important file state changes, including:- Unmodified files
- Modified files
- Missing or deleted files
-
Baseline Updating
Allows intentional changes to be synchronized safely into the stored baseline. -
JSON-Based Storage
Hash records are stored locally in a simple and readablefile_hashes.jsondatabase. -
Clean CLI Reporting
Provides structured, color-coded terminal output for quick visibility. -
Recursive Directory Scanning
Automatically monitors all files inside nested subdirectories.
[ INFO ] Checking integrity...
[ OK ] Unmodified: ./src/app.py
[ ALERT ] Modified: ./config/settings.json
[ ERROR ] MISSING: ./logs/data.log
VERITAS operates in 3 main phases:
Creates a trusted “truth database” of file hashes.
Recomputes hashes and compares them against the baseline.
Synchronizes hashes after legitimate edits.
All hashes are stored in:
file_hashes.jsonClone the project:
git clone https://github.com/yourusername/veritas.git
cd veritasMake sure you have Python 3 installed:
python3 --versionRun the script with:
python3 veritas.py <command> [path]| Command | Description |
|---|---|
init |
Create baseline hashes for a file or directory |
check |
Scan monitored files and detect changes |
update |
Update baseline hashes after intentional changes |
python3 veritas.py init ./srcpython3 veritas.py checkpython3 veritas.py update ./src/main.pypython3 veritas.py update ./srcAfter every scan, VERITAS prints a report:
========================================
SCAN COMPLETED
========================================
Total Scanned: 12
✔ OK: 10
✖ Modified: 1
⚠ Missing: 1
========================================