This document provides setup instructions for the EU GDPR Git Validator project.
- Python 3.8 or higher
- Git
- pip
-
Clone the repository:
git clone https://github.com/your-username/EU-GDPR-Git-Validator.git cd EU-GDPR-Git-Validator -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the package:
pip install -e . -
Install development dependencies (optional):
pip install pytest pytest-cov black isort flake8
# Show help
gdpr-validator --help
# Scan a repository
gdpr-validator scan /path/to/repository
# Generate HTML report
gdpr-validator scan /path/to/repository --output report.html --format html
# Analyze specific GDPR articles
gdpr-validator scan /path/to/repository --articles 6,17 --verbose# Run all tests
pytest
# Run with coverage
pytest --cov=src/gdpr_validator
# Run specific test file
pytest tests/test_basic_functionality.py -v# Format code
black src tests
# Sort imports
isort src tests
# Lint code
flake8 src testsdocker build -t eu-gdpr-git-validator .# Scan a repository
docker run --rm -v /path/to/repo:/app/data -v /path/to/output:/app/reports \
eu-gdpr-git-validator scan /app/data --output /app/reports/report.html
# Interactive mode
docker run --rm -it -v /path/to/repo:/app/data \
eu-gdpr-git-validator scan /app/data --verboseEU-GDPR-Git-Validator/
├── src/
│ └── gdpr_validator/
│ ├── __init__.py
│ ├── cli.py
│ ├── git_scanner.py
│ ├── gdpr_analyser.py
│ ├── compliance_checker.py
│ └── report_generator.py
├── tests/
│ ├── __init__.py
│ └── test_basic_functionality.py
├── .github/
│ └── workflows/
│ └── ci.yml
├── README.md
├── LICENSE
├── requirements.txt
├── pyproject.toml
├── Dockerfile
├── .dockerignore
├── .gitignore
├── CONTRIBUTING.md
└── SETUP.md
- Git Repository Scanning: Analyzes commit history, branches, and metadata
- GDPR Compliance Analysis: Checks against Articles 6, 17, and others
- Multiple Output Formats: JSON, HTML, and text reports
- CLI Interface: Easy-to-use command-line tool
- Docker Support: Containerized deployment
- CI/CD Pipeline: Automated testing and deployment
- Article 6: Lawful basis for processing
- Article 17: Right to erasure ("right to be forgotten")
- Article 20: Right to data portability
- Article 25: Data protection by design and by default
The tool can be configured through:
- Command-line arguments
- Environment variables
- Configuration files (future enhancement)
- Import errors: Ensure the package is installed with
pip install -e . - Permission errors: Check file permissions for the target repository
- Git errors: Ensure the target directory is a valid Git repository
- Check the README.md for detailed usage instructions
- Review CONTRIBUTING.md for development guidelines
- Open an issue on GitHub for bugs or feature requests
- Initialize Git repository:
git init - Add remote origin:
git remote add origin <your-github-repo-url> - Make initial commit:
git add . && git commit -m "Initial commit" - Push to GitHub:
git push -u origin main
This project is licensed under the MIT License - see the LICENSE file for details.