Advanced Open Source Intelligence with Kenyan Cultural Context Preservation
Developer: Sarah Marion - Security-Focused Full-Stack Developer
Portfolio: https://www.sarahmarion.com/
LinkedIn: https://www.linkedin.com/in/sarah-ndeti/
GitHub: https://github.com/Sarah-Marion
Tech Blog: https://www.blog.sarahmarion.com/the-sgr-protocol-a-colonial-algorithm-for-a-captive-nation/
Sarah Marion - Security-conscious Senior Full-Stack Developer with 9+ years of experience specializing in:
- π Security-First Development: Ethical Hacking, Vulnerability Management, Secure SDLC
- π African Tech Solutions: Kenyan-focused OSINT with cultural context preservation
- π οΈ Full-Stack Expertise: Python (Django/Flask), PHP, Laravel, JavaScript, React/Vue.js, PostgreSQL, Docker, DevOps
- ποΈ Database Systems: PostgreSQL, MySQL, MongoDB, SQLite, Redis
- βοΈ DevOps & Infrastructure: Docker, AWS, Jenkins, CI/CD, Linux Server Administration
- π± Mobile & IoT: React Native, Flutter, Swift, Android Development, Raspberry Pi, Arduino
- π Compliance: Data Protection Act 2019, Data Sovereignty, Ethical Data Handling
"When algorithms become colonial instruments, we build tools of digital sovereignty. This is OSINT reimagined through Kenyan eyes, for African contexts."
Most OSINT tools emerge from Western security paradigms that treat Global South data as extractive resources. This framework challenges that paradigm through the Sovereign Framework: Sovereignty, Guardianship, Reciprocity.
Unlike generic OSINT tools, Sovereign OSINT Toolkit understands that:
- Kenyan data requires Kenyan context
- Nairobi is not Kansasβgeopolitical realities differ
- Our ethics are non-negotiable, not optional features
- Kenyan Journalists investigating public accountability
- East African Researchers studying digital ecosystems
- Local NGOs monitoring human rights
- Ethical Developers building decolonial tools
I measure success not in data points collected, but in:
- Community capacity built
- Ethical boundaries respected
- Kenyan digital sovereignty advanced
"The most dangerous algorithm is the one that doesn't know it's colonial." ~ Sarah Marion Ndeti
# See it in action immediately
git clone https://github.com/Sarah-Marion/sovereign-osint-toolkit.git
cd sovereign-osint-toolkit
python main.pyThe demo will:
- Process sample OSINT queries about Kenyan development
- Generate multiple export formats
- Display cultural relevance scores
- Create organized export files
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π SOVEREIGN OSINT TOOLKIT by Sarah Marion β
β π Security-Focused Full-Stack Developer β
β π Advanced Kenyan-Focused Intelligence Platform β
β β
β GitHub: https://github.com/Sarah-Marion/sovereign-osint-toolkit β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
Comprehensive Kenyan OSINT architecture loaded
1. RUNNING BASIC WORKFLOW:
========================================
π Processing: Nairobi infrastructure development
π Collecting OSINT data...
β
Export completed: sovereign_export_researcher_20251004_041434.json
π Format: json, Size: 4754 bytes
2. RUNNING ENHANCED WORKFLOW:
========================================
π Processing: Nairobi infrastructure development
π Running correlation analysis...
π ANALYSIS RESULTS:
β’ Analyzed 1 data sources
β’ Kenyan relevance score: 0.70
β’ Key topics: infrastructure, development
β
Enhanced export completed
3. RUNNING COMPREHENSIVE WORKFLOW:
========================================
π Comprehensive Analysis: Nairobi infrastructure development in nairobi
π§ COMPREHENSIVE ANALYSIS INSIGHTS:
π Region: nairobi
π Kenyan Relevance: 1.00
π Cultural Insights: 3 found
πΊοΈ Cultural Landmarks: 3 mapped
πΎ Comprehensive export saved
4. TESTING BATCH EXPORT:
========================================
π¦ Batch export completed: 4 files
π Overall quality score: 0.58
π All workflows completed successfully!
Step 1: Main Interface & Banner
Launching Sovereign OSINT Toolkit with comprehensive Kenyan architecture
Step 2: Enhanced Analysis in Action
Running correlation analysis with Kenyan relevance scoring (0.70 for infrastructure topics)
Step 3: Cultural Context Analysis
Detailed analysis results showing topic identification and source reliability metrics
Step 4: Comprehensive Regional Workflow
Advanced analysis with regional context (Nairobi, Mombasa, Kisumu) and cultural insights
Step 5: Batch Export & Final Results
Successful batch export completion with quality scoring and file generation
π All workflows completed successfully!
π¦ Batch export completed: 4 files
π Overall quality score: 0.58
β
Kenyan relevance scores: 0.40-1.00
π Regional analysis: Nairobi, Mombasa, Kisumu
π Exports saved to: exports/ directory
Demo GIF coming soon - showing installation β execution β export process
| Basic Workflow | Enhanced Analysis | Comprehensive Insights |
|---|---|---|
| Simple data collection & export | Correlation analysis & scoring | Cultural context & regional mapping |
| β’ Quick OSINT collection β’ Multi-format exports β’ User-type templates |
β’ Kenyan relevance scoring β’ Source reliability β’ Topic identification |
β’ Regional context β’ Cultural landmarks β’ Social media integration |
- Cultural Context Preservation: Automatic Kenyan context detection with regional validation
- Ethical OSINT Collection: Built-in ethical boundaries and cultural consent preservation
- Regional Awareness: Nairobi, Mombasa, Kisumu and county-specific context mapping
- Multi-Format Export: JSON, CSV, HTML exports tailored to user types and use cases
- Batch Processing: Quality-validated bulk exports with comprehensive reporting
- Source Reliability Scoring: Enhanced verification metrics with cross-referencing
- Data Sensitivity Classification: Public, Sensitive, Restricted levels with DPA 2019 compliance
- Multi-User Templates: Journalist, Researcher, NGO, Developer, Government-specific exports
- Role-Based Access: Tailored data presentation based on user permissions
- Custom Workflows: Optimized processing for different analysis scenarios
- Data Protection Act 2019: Full compliance with Kenyan data sovereignty requirements
- Ethical Boundaries: Culturally-aware data collection with consent preservation
- Secure Export Protocols: Protected data handling and transmission
| Category | Features | Status |
|---|---|---|
| Cultural Intelligence | Kenyan context preservation, Regional validation, Ethical boundaries | β Active |
| Data Processing | Multi-format exports, Batch processing, Source reliability scoring | β Active |
| User Experience | Role-based templates, Custom workflows, User-type optimization | β Active |
| Compliance | DPA 2019 compliance, Data sovereignty, Secure protocols | β Active |
- Python 3.8 or higher
- Git
- 500MB free disk space
# Clone repository
git clone https://github.com/your-username/sovereign-osint-toolkit.git
cd sovereign-osint-toolkit
pip install -e .
# Run automated setup
python setup_environment.py
# Or run directly
python main.py# Clone repository
git clone https://github.com/your-username/sovereign-osint-toolkit.git
cd sovereign-osint-toolkit
## Create virtual environment
python -m venv sovereign_env
## Activate virtual environment
source sovereign_env/bin/activate # Linux/Mac
or
sovereign_env\Scripts\activate # Windows
### Install dependencies
pip install -r requirements.txt
### Set up environment variables
cp .env.template .env
Common Installation Issues:
ModuleNotFoundError: Runpip install -e .from project root- Permission errors: Use
pip install --user -e . - Python path issues: Ensure you're using Python 3.8+
- Virtual environment not activating: Use full path
source ./sovereign_env/bin/activate - Dependencies conflict: Try
pip install --upgrade -r requirements.txt
Export Issues:
- Single dictionary export: Wrap in list
exporter.export_data([single_dict], "journalist", "json") - User type restrictions: Government exports require special permissions
- File permission errors: Check write permissions in exports/ directory
from src.main import SovereignOSINTToolkit
# Initialize toolkit
toolkit = SovereignOSINTToolkit()
# Run basic workflow
result = toolkit.run_basic_workflow(
"Nairobi infrastructure development",
"researcher",
"json"
)
print(f"Export completed: {result['filename']}")from src.main import SovereignOSINTToolkit
toolkit = SovereignOSINTToolkit()
# Run enhanced analysis with correlation
result, analysis = toolkit.run_enhanced_workflow(
"Mombasa tourism development",
"journalist",
"json"
)
print(f"Kenyan relevance: {analysis.get('kenyan_relevance', 0)}")from src.main import SovereignOSINTToolkit
# Use comprehensive architecture (if available)
toolkit = SovereignOSINTToolkit(use_comprehensive=True)
# Run comprehensive analysis with cultural context
result, analysis = toolkit.run_comprehensive_workflow(
"Kisumu lake region development",
region="kisumu",
user_type="researcher"
)
print(f"Cultural insights: {len(analysis['cultural_insights'])}")# Basic components (always available)
from src.collectors.osint_collector import OSINTCollector
from src.exporters.sovereign_exporter import SovereignExporter
collector = OSINTCollector()
exporter = SovereignExporter()
data = collector.search("Kenyan digital economy")
export_result = exporter.export_data([data], "ngo", "json")
# For single result, wrap in list:
single_result = {"query": "test", "results": [...]}
export_result = exporter.export_data([single_result], "journalist", "json")
# For multiple results, use as-is:
multiple_results = [
{"query": "test1", "results": [...]},
{"query": "test2", "results": [...]}
]
export_result = exporter.export_data(multiple_results, "researcher", "csv")# Cultural data works with these user types:
working_user_types = ["journalist", "researcher", "ngo"]
# Technical data works with developer:
technical_data = [{"data_type": "technical", ...}]
export_result = exporter.export_data(technical_data, "developer", "json")from sovereign_osint import KenyanOSINTCollector, KenyanDataAnalyzer, KenyanGeospatialAnalyzer
# Initialize with ethical boundaries
collector = KenyanOSINTCollector(ethical_boundaries=True)
results = collector.analyze_kenyan_social_media(platform="twitter", region="Nairobi")
# Cultural context analysis
analyzer = KenyanDataAnalyzer()
insights = analyzer.generate_cultural_context_insights(data_source="local_news")
# Geospatial mapping
geospatial = KenyanGeospatialAnalyzer()
nairobi_map = geospatial.create_cultural_geospatial_map(region="Nairobi")class SovereignOSINTToolkit:
def run_basic_workflow(query, user_type="researcher", export_format="json")
def run_enhanced_workflow(query, user_type="researcher", export_format="json")
def run_comprehensive_workflow(query, region="nairobi", user_type="researcher")class SovereignExporter:
def export_data(data, user_type, export_format)
def batch_export(data, formats, user_types, output_dir)
def enhance_with_osint_context(data, source_type)class KenyanOSINTCollector:
def analyze_kenyan_social_media(platform, region, query="")
def collect_kenyan_news(topics, regions=None)The toolkit supports two architectural approaches:
-
Basic Architecture (Always Available):
-
OSINTCollector - Core data collection
-
SovereignExporter - Kenyan context preservation
-
Simple workflow patterns
-
-
Comprehensive Architecture (Enhanced):
-
KenyanOSINTCollector - Ethical boundary enforcement
-
KenyanDataAnalyzer - Cultural context insights
-
KenyanGeospatialAnalyzer - Regional mapping
-
Advanced Kenyan-focused workflows
-
sovereign-osint-toolkit/
βββ config/ # Configuration files for the OSINT toolkit
β βββ ethical_boundaries.json # Defines ethical boundaries for data collection
β βββ export_profiles.yaml # Export profile configurations
β βββ kenya_regions.json # Kenyan geographical regions data
β βββ settings.yaml # Main application settings
β βββ use_cases.json # Predefined use cases for the toolkit
βββ database/ # Database-related files
β βββ optimize.sql # SQL scripts for database optimization
βββ docs/ # Documentation and project guides
β βββ images/ # Documentation images and assets
β βββ protocols/ # Security and operational protocols
β βββ BRANDING.md # Branding guidelines for the project
β βββ ethical_framework.md # Ethical framework for OSINT operations
β βββ export_demo.py # Demonstration scripts for data export
β βββ EXPORT_IMPROVEMENTS.md # Improvements planned for export functionality
βββ examples/ # Example usage and implementation samples
βββ exports/ # Default directory for exported data
βββ src/ # Main source code directory
β βββ analyzers/ # Data analysis and correlation modules
β β βββ __init__.py # Package initialization
β β βββ sovereign_corelator.py # Core data correlation engine
β β βββ sovereign_ml_detector.py # Machine learning detection capabilities
β βββ api/ # API endpoints and web server components
β β βββ __init__.py # Package initialization
β β βββ core.py # Core API functionality and routes
β β βββ graphql_schema.py # GraphQL schema definitions
β β βββ main.py # Main API server entry point
β β βββ minimal_server.py # Lightweight API server implementation
β β βββ standalone_server.py # Standalone server implementation
β βββ auth/ # Authentication and authorization system
β β βββ __init__.py # Package initialization
β β βββ core.py # Core authentication logic
β β βββ models.py # Data models for authentication
β β βββ user_manager.py # User management functionality
β βββ collectors/ # Data collection modules
β β βββ government_ke/ # Kenyan government data sources
β β βββ social_media/ # Social media data collection
β β βββ __init__.py # Package initialization
β β βββ osint_collector.py # Main OSINT collection engine
β β βββ real_time_monitor.py # Real-time monitoring capabilities
β βββ database/ # Database models and operations
β β βββ __init__.py # Package initialization
β βββ exporters/ # Data export functionality
β β βββ __init__.py # Package initialization
β β βββ test_exporter.py # Export functionality testing
β βββ monitoring/ # System monitoring and logging
β β βββ __init__.py # Package initialization
β β βββ sovereign_monitor.py # Main monitoring system
β βββ sovereign_osint/ # Core OSINT framework
β β βββ __init__.py # Package initialization
β β βββ analyzers.py # Analysis components
β β βββ collectors.py # Collection components
β β βββ geospatial.py # Geospatial analysis capabilities
β β βββ sovereign_framework.py # Main framework implementation
β βββ sovereign_osint_toolkit.egg-info/ # Python package metadata
β βββ utils/ # Utility functions and helpers
β β βββ __init__.py # Package initialization
β β βββ anonymization.py # Data anonymization utilities
β β βββ consent_manager.py # User consent management
β β βββ kenyan_context.py # Kenya-specific context utilities
β β βββ security.py # Security utilities and functions
β β βββ sovereign_framework.py # Framework utility functions
β βββ visualization/ # Data visualization components
β β βββ dashboard/ # Web dashboard implementation
β β β βββ components/ # Dashboard UI components
β β β βββ __init__.py # Package initialization
β β β βββ app.py # Main dashboard application
β β βββ __init__.py # Package initialization
β βββ __init__.py # Main package initialization
βββ tests/ # Test suite for the application
β βββ __init__.py # Test package initialization
β βββ test_exporter.py # Export functionality tests
βββ .gitignore # Git ignore rules
βββ ABOUT.md # Project overview and description
βββ api_runner.py # API server runner script
βββ AUTHOR.md # Author information and credits
βββ CONTRIBUTING.md # Contribution guidelines
βββ deploy.sh # Deployment automation script
βββ DEPLOYMENT.md # Deployment documentation
βββ docker-compose.yml # Docker Compose configuration
βββ Dockerfile # Docker container definition
βββ intro.svg # Project introduction graphic
βββ LICENSE # Project license file
βββ main.py # Main application entry point
βββ PERFORMANCE.md # Performance documentation
βββ README.md # Main project documentation
βββ requirements.txt # Python dependencies
βββ SECURITY.md # Security policies and procedures
βββ setup_environment.py # Environment setup script
βββ setup.py # Python package setup
βββ sovereign-osint-toolkit-terminal-slide.svg # Terminal slide graphic
βββ USAGE.md # Usage instructions and examples
βββ users.db # User database file
βββ .env.template # Environment variables template
-
Investigative Journalism: Track public spending with local context
-
Human Rights Monitoring: Document violations with cultural sensitivity
-
Academic Research: Study Kenyan digital ecosystems ethically
-
Community Advocacy: Support grassroots organizations with data
-
Policy Analysis: Inform decision-making with culturally-relevant insights
Edit environment configuration:
API_KEYS=your_ethical_api_keys
REGION=Kenya
LANGUAGE=swahili
ETHICAL_BOUNDARIES=true
DATA_SOVEREIGNTY=true-
Fast Processing: Optimized for large OSINT datasets
-
Memory Efficient: Streaming processing for large exports
-
Parallel Execution: Batch operations run concurrently
-
Caching: Intelligent caching of frequent queries
Docker Deployment (Recommended)
# Copy environment template
cp .env.template .env
# Deploy with Docker
chmod +x deploy.sh
./deploy.shThe toolkit supports automatic SSL with Let's Encrypt. See DEPLOYMENT.md for detailed production setup.
Redis is configured for optimal performance. Cache OSINT query results:
import redis
import json
r = redis.Redis(host='redis', port=6379, db=0)
def cache_osint_query(query_key, results, ttl=3600):
r.setex(f"osint:{query_key}", ttl, json.dumps(results))
def get_cached_osint(query_key):
cached = r.get(f"osint:{query_key}")
return json.loads(cached) if cached else NoneAdd to your reverse proxy configuration:
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;I'd love your input! Please read CONTRIBUTING.md for details on the development process:
-
Fork the repo and create your branch from main
-
Follow PEP 8 standards and use type hints
-
Write meaningful commit messages
-
Include tests and update documentation
-
Follow responsible disclosure practices for security research
This project is licensed under the MIT License - see the LICENSE file for details.
Stable Release - Core Sovereign OSINT functionality with Kenyan cultural context preservation
- Enhanced ML correlation patterns for Kenyan data
- Improved Swahili language processing
- Advanced source reliability scoring
- Real-time OSINT monitoring dashboard
- Expanded East African regional support
- Mobile application interface
- Advanced geospatial analysis with Kenyan maps
- Community data sharing protocols
- Enhanced batch processing capabilities
- Multi-language support (Swahili primary focus)
- AI-powered cultural context detection
- Federated learning for privacy preservation
Versioning follows Semantic Versioning (SemVer) principles
If you use this toolkit in academic work, please cite:
@software{sovereign_osint_2024,
title = {Sovereign OSINT Toolkit: Kenyan-Focused Intelligence Gathering},
author = {Sarah Marion},
year = {2025},
url = {https://github.com/Sarah-Marion/sovereign-osint-toolkit},
version = {1.0}
}This toolkit is built specifically for Kenyan and East African contexts with built-in cultural preservation and data sovereignty compliance. Unlike Western-centric tools, it understands that Nairobi is not Kansas.
Yes, all processing follows Data Protection Act 2019 guidelines with built-in ethical boundaries and optional anonymization. We prioritize data sovereignty.
Yes, under the MIT License with proper attribution. However, we encourage ethical use that aligns with the project's decolonial principles.
While optimized for Kenyan contexts, the framework can be adapted for other Global South regions. The cultural context preservation is specifically tuned for East Africa.
Basic Python knowledge is sufficient for most use cases. The toolkit provides both simple and advanced interfaces.
Currently: Kenyan news outlets, social media platforms with regional focus, public government data, and local academic sources. More sources are planned.
Regular updates for security, new features, and cultural context improvements. Subscribe to GitHub releases for notifications.
For support:
-
Open an issue on GitHub: https://github.com/Sarah-Marion/sovereign-osint-toolkit/issues
-
Email: dev@sarahmarion.com
- Usage Guide - Complete usage instructions and examples
- Deployment Guide - Production deployment instructions
- Performance Optimization - Caching and optimization strategies
- Security Hardening - Security best practices and configuration
Security-Focused Full-Stack Software Developer | Kenyan OSINT Specialist