A privacy-focused tool to detect orphaned and sensitive datasets.
Project description
๐ DataSovereign-Scout
Developed by: Dr. T.M. Usha
LinkedIn Profile โข ushawin2020@gmail.com โข +91 9994463686
A privacy-focused Python CLI tool to detect orphaned datasets and ghost data.
Features โข Installation โข Quick Start โข Documentation โข Contributing
๐ Table of Contents
- What is DataSovereign-Scout?
- The Problem: Ghost Data
- Features
- Installation
- Quick Start
- How It Works
- Advanced Usage
- Examples
- Architecture
- Contributing
- License
- Contact
๐ฏ What is DataSovereign-Scout?
DataSovereign-Scout is a command-line tool that helps organizations and individuals discover "ghost data" - forgotten files, orphaned backups, leaked credentials, and unauthorized datasets hiding in your infrastructure.
Think of it as a home inspector for your data. You tell it what files should be there (via a manifest), and it alerts you to everything else that shouldn't exist.
๐ Perfect For:
- ๐ข DevOps Teams - Finding leaked
.envfiles and credentials before deployment - ๐ Security Auditors - Discovering unauthorized data before compliance reviews
- ๐ Data Engineers - Identifying orphaned datasets consuming storage
- ๐ Researchers - Ensuring sensitive research data is properly tracked
- ๐ผ Startups - Preventing data leaks during rapid development
๐จ The Problem: Ghost Data
What is Ghost Data?
Ghost Data refers to files that exist on your system but are:
- โ Not documented in any inventory
- โ Not actively used or maintained
- โ Potentially sensitive (backups, credentials, PII)
- โ Unknown to current team members
- โ Compliance/privacy risks
Real-World Examples:
โ forgotten_backup_2023.csv (Contains customer data)
โ .env (Database passwords exposed)
โ aws_production.pem (Private keys for cloud access)
โ database_dump_old.sql (PII from deleted users)
โ test_credentials.json (API keys from former developers)
The Risk: These files can lead to:
- ๐ Data breaches
- ๐ฐ GDPR/CCPA fines
- ๐ฐ Reputational damage
- ๐ Customer trust loss
โจ Features
๐ฏ Core Capabilities
- ๐ Manifest-Based Scanning - Define your "known good" data in a simple YAML file
- ๐ Smart Detection - Identifies files by extension AND risky keywords
- ๐ Security-Focused - Flags
.pem,.key,.env,.p12, and other sensitive formats - ๐ Rich Terminal Output - Beautiful, color-coded results powered by
rich - โก Fast & Lightweight - Scans thousands of files in seconds
- ๐ง Intelligent Filtering - Auto-skips
.git,venv,__pycache__, etc.
๐ต๏ธ Detection Rules
Extension-Based:
- Data Files:
.csv,.json,.sql,.db,.sqlite,.parquet,.xlsx - Secrets:
.pem,.key,.env,.p12,.kdbx - Logs:
.log
Keyword-Based:
- Filenames containing:
backup,dump,secret,password,token,credential
๐ฆ Installation
Prerequisites
- Python 3.8 or higher
- pip (Python package manager)
Install from PyPI
pip install datasovereign-scout
Install from Source
git clone https://github.com/DrTMUSHACoder/py-datasovereign-scout.git
cd py-datasovereign-scout
pip install -e .
Verify Installation
ds-scout --help
You should see:
Usage: ds-scout [OPTIONS] COMMAND [ARGS]...
DataSovereign-Scout: Detect Ghost Data and Orphaned Datasets.
๐ Quick Start
Step 1: Create a Manifest
Create a file named manifest.yaml listing your approved data files:
assets:
- data/users.csv
- reports/quarterly_2024.xlsx
- configs/app_settings.json
Step 2: Run a Scan
ds-scout scan --manifest manifest.yaml --path ./
Step 3: Review Results
Expected Output:
Scouting for Ghost Data...
Manifest: manifest.yaml
Scan Path: ./
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CRITICAL: Found 3 orphaned datasets! โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Orphaned Assets (Ghost Data)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Path โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ /project/data/forgotten_backup_2023.csv โ
โ /project/.env โ
โ /project/secrets/aws_production.pem โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total Scanned Files: 15
๐ง How It Works
The Workflow
graph LR
A[Create manifest.yaml] --> B[Run ds-scout scan]
B --> C[Scanner reads manifest]
C --> D[Walks filesystem]
D --> E{File matches<br/>extensions or<br/>keywords?}
E -->|Yes| F{File in<br/>manifest?}
E -->|No| G[Ignore]
F -->|Yes| H[Mark as Safe]
F -->|No| I[FLAG as Ghost Data]
I --> J[Report to User]
Detection Logic
# Pseudo-code
for file in filesystem:
if file.extension in SENSITIVE_EXTENSIONS:
if file not in manifest:
FLAG_AS_GHOST_DATA(file)
if any(keyword in file.name for keyword in RISKY_KEYWORDS):
if file not in manifest:
FLAG_AS_GHOST_DATA(file)
๐ Advanced Usage
Scan a Specific Directory
ds-scout scan --manifest manifest.yaml --path ./production_data
Include Hidden Files
By default, hidden directories (.git, .venv) are skipped. To include them, modify the scanner source code or open an issue for this feature.
Custom Extensions (Future Feature)
# Coming soon
ds-scout scan --manifest manifest.yaml --path ./ --extensions .dat,.bin
๐ Examples
Example 1: DevOps Pre-Deployment Check
Scenario: You're about to deploy a Docker container. Check for leaked credentials.
# Create manifest
cat > manifest.yaml << EOF
assets:
- src/config.json
- data/sample.csv
EOF
# Scan
ds-scout scan --manifest manifest.yaml --path ./
# Result: Finds forgotten .env file with database password
Example 2: GDPR Compliance Audit
Scenario: Verify no unauthorized customer data exists before a compliance review.
# manifest.yaml
assets:
- database/customers_2024.db
- exports/approved_report.xlsx
ds-scout scan --manifest manifest.yaml --path ./
# Finds: old_customer_backup.csv (not in manifest)
# Action: Securely delete or add to consent records
Example 3: Research Data Management
Scenario: Ensure all research datasets are properly documented.
# manifest.yaml
assets:
- experiments/trial_001.csv
- experiments/trial_002.csv
ds-scout scan --manifest manifest.yaml --path ./experiments
# Finds: pilot_study_draft.csv (orphaned from previous researcher)
๐๏ธ Architecture
Project Structure
datasovereign-scout/
โโโ src/
โ โโโ datasovereign_scout/
โ โโโ __init__.py # Package initializer
โ โโโ cli.py # Command-line interface
โ โโโ manager.py # Orchestrates scan logic
โ โโโ manifest.py # Manifest parser
โ โโโ scanners.py # Filesystem scanner
โ โโโ detector.py # Detection rules
โโโ tests/ # Unit tests
โโโ pyproject.toml # Package configuration
โโโ README.md # This file
โโโ LICENSE # MIT License
Key Components
| Component | Responsibility |
|---|---|
cli.py |
Argument parsing, user interaction |
manager.py |
Coordinates manifest + scanner |
scanners.py |
Walks filesystem, applies rules |
manifest.py |
Parses YAML manifest |
detector.py |
Detection algorithms |
๐ค Contributing
We welcome contributions! Here's how you can help:
Ways to Contribute
- ๐ Report bugs via GitHub Issues
- ๐ก Suggest features
- ๐ Improve documentation
- ๐งช Write tests
- ๐ง Submit pull requests
Development Setup
# Clone the repo
git clone https://github.com/DrTMUSHACoder/py-datasovereign-scout.git
cd py-datasovereign-scout
# Install in editable mode
pip install -e .
# Run tests (when added)
pytest tests/
Coding Standards
- Follow PEP 8
- Add type hints
- Write docstrings
- Include tests for new features
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 Dr. T.M. Usha
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
๐ Questions or Feedback?
Feel free to reach out via the contact information at the top of this README or open an issue on GitHub!
๐ Acknowledgments
- Built with Python 3.8+
- Powered by Rich for terminal output
- Inspired by real-world data governance challenges
๐ Related Projects
- detect-secrets - Pre-commit hook for secret detection
- truffleHog - Searches for secrets in Git history
- GitGuardian - Automated secret scanning
๐ Project Stats
Made with โค๏ธ for data privacy and security
If this tool helped you, please โญ star the repository!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datasovereign_scout-0.1.0.tar.gz.
File metadata
- Download URL: datasovereign_scout-0.1.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97d43bf00803b7e541365118e64b90230d44444f6e58b39498c823209d69e93e
|
|
| MD5 |
956be27e74985d12f83ef6c9d0426e03
|
|
| BLAKE2b-256 |
5abdb8bd531b3617655fda45e02667c4a6698326265b547c757f66d19de4065a
|
File details
Details for the file datasovereign_scout-0.1.0-py3-none-any.whl.
File metadata
- Download URL: datasovereign_scout-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2e9ceecd6529f4bad17d192fae4013293d08ac652f1bf8c29ef8b6e0dec6ddc
|
|
| MD5 |
6a75a763c1ac62f13595b49e0010fdff
|
|
| BLAKE2b-256 |
bd4714944c942877814f913905f99b23b8a0d2678828414675eb00ceff8617b2
|