Skip to main content

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


Python License Version Status

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?

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 .env files 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


๐Ÿ“Š Project Stats

GitHub stars GitHub forks GitHub issues


Made with โค๏ธ for data privacy and security

If this tool helped you, please โญ star the repository!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasovereign_scout-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasovereign_scout-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

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

Hashes for datasovereign_scout-0.1.0.tar.gz
Algorithm Hash digest
SHA256 97d43bf00803b7e541365118e64b90230d44444f6e58b39498c823209d69e93e
MD5 956be27e74985d12f83ef6c9d0426e03
BLAKE2b-256 5abdb8bd531b3617655fda45e02667c4a6698326265b547c757f66d19de4065a

See more details on using hashes here.

File details

Details for the file datasovereign_scout-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for datasovereign_scout-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2e9ceecd6529f4bad17d192fae4013293d08ac652f1bf8c29ef8b6e0dec6ddc
MD5 6a75a763c1ac62f13595b49e0010fdff
BLAKE2b-256 bd4714944c942877814f913905f99b23b8a0d2678828414675eb00ceff8617b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page