Detect tracking pixels on healthcare websites that may violate HIPAA. Fast, reliable scans with smart URL handling and enterprise features.
π Why This Matters | π Real Results | π₯ Healthcare Analysis | π¦ For Insurers
Purpose-built for insurance workflows. See our comprehensive Adoption Guide and 5-Minute Quick Start.
# For regular environments
docker build -t pixel-scanner .
# For corporate environments with proxy/SSL inspection
./build-with-proxy.sh
# For AWS Fargate deployment with S3 support
docker build -f Dockerfile.production -t pixel-scanner:fargate .- Risk Scoring System - Convert scans to insurance metrics
- Enterprise API - REST API with authentication
- Portfolio Monitoring - Automated alerts and reporting
# Install (one-time setup)
git clone https://github.com/minghsuy/pixel-detector-v2.git
cd pixel-detector-v2
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync
uv run playwright install chromium# Single domain scan
pixel-detector scan healthcare-site.com
# Test if consent banners actually work (NEW!)
pixel-detector scan healthcare-site.com --test-consent
# With screenshot evidence
pixel-detector scan healthcare-site.com --screenshot
# Batch scan from CSV (custom_id,url columns)
pixel-detector batch portfolio.csv -o results/
# Batch scan from TXT (one domain per line)
pixel-detector batch domains.txt -o results/
# Docker: Single domain
docker run --rm pixel-scanner scan google.com
# Docker: Batch scan
docker run --rm -v $(pwd):/work pixel-scanner batch /work/portfolio.csv -o /work/resultsNEW: Deploy to AWS Fargate for serverless batch processing with S3 integration.
# Run with S3 input/output
docker run --rm \
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
pixel-scanner:fargate \
--input-file s3://my-bucket/input/portfolio.csv \
--output-dir s3://my-bucket/results/ \
--concurrency 10See Docker Deployment Guide for complete Fargate setup.
| Tracker | HIPAA Risk | Why It's Dangerous | Our Detection Rate |
|---|---|---|---|
| Meta Pixel | π΄ Critical | No BAA available, shares with advertisers | 99.9% |
| Google Analytics | π΄ Critical | Links to ad network, no healthcare BAA | 99.9% |
| Google Ads | π΄ Critical | Remarketing lists from patient data | 99.9% |
| TikTok Pixel | π‘ High | Foreign data sovereignty concerns | 99% |
| LinkedIn Insight | π‘ High | B2B targeting using healthcare data | 98% |
| Twitter Pixel | π‘ High | Conversion tracking without BAA | 98% |
| Pinterest Tag | π‘ High | Shopping behavior tracking | 98% |
| Snapchat Pixel | π‘ High | Demographic targeting risks | 98% |
We detect 6 major consent management platforms AND test if they actually work:
| Platform | Market Share | Detection Rate | Risk Level |
|---|---|---|---|
| OneTrust | 40% | 99.9% | π’ Low (Compliance Tool) |
| Cookiebot | 15% | 99.9% | π’ Low (Compliance Tool) |
| Osano | 8% | 99% | π’ Low (Compliance Tool) |
| TrustArc | 7% | 99% | π’ Low (Compliance Tool) |
| Usercentrics | 5% | 98% | π’ Low (Compliance Tool) |
| Termly | 3% | 98% | π’ Low (Compliance Tool) |
Why Detection Alone Isn't Enough: Many sites have consent banners installed but they're malfunctioning - tracking still fires before consent or after rejection. This is the compliance GAP that gets companies fined.
Use --test-consent flag to automatically test if consent platforms actually work:
# Test consent banner functionality
pixel-detector scan healthcare-site.com --test-consentWhat It Tests:
-
Baseline Test (Dark Patterns): Does tracking fire BEFORE you click anything?
- β Compliant: No tracking before consent
- β Violation: Pixels firing before user interaction
-
Reject All Test (GDPR/CCPA Critical): Does "Reject All" actually block trackers?
- β Compliant: All tracking stops after rejection
- β Violation: Tracking continues despite rejection
-
Accept All Test (Validation): Does tracking work after consent?
- β Validates our detection is working correctly
Real Results:
- goodsamsanjose.com: Has Cookiebot, but Google Analytics fires BEFORE consent (Score: 33/100)
- elcaminohealth.org: Has TrustArc, no pre-consent tracking detected (Score: 33/100, banner issues)
Output Includes:
- Overall compliance score (0-100)
- Detailed violation list with severity
- Platform-specific recommendations
- Timeline of when each tracker fired
- Recommended action (APPROVE/REVIEW/DECLINE)
{
"domain": "example-hospital.com",
"timestamp": "2025-01-20T14:23:45Z",
"hipaa_risk": "CRITICAL",
"pixels_detected": [
{
"type": "google_analytics",
"pixel_id": "GA-123456789",
"risk_level": "critical",
"evidence": {
"network_requests": [
"https://www.google-analytics.com/collect?v=1&tid=GA-123456789"
],
"cookies_set": ["_ga", "_gid"],
"global_variables": ["gtag", "dataLayer"]
},
"hipaa_concern": "Transmits user data without BAA"
}
],
"recommendation": "Remove immediately or obtain signed BAA"
}- Cost of manual audit: $5,000 - $25,000
- Cost of Pixel Detector: $0 (open source)
- Potential fine avoided: $2,100,000
- ROI: 420x - 2,100x
- Traditional assessment: $5,000 per client
- With Pixel Detector: $0.10 per scan
- Efficiency gain: 50,000x
- Claims prevented: 80% reduction
"We found tracking pixels on our patient portal that we didn't even know existed. Removed them before our HHS audit. This tool literally saved us millions."
- HIPAA Compliance Officer, Major Hospital System
New York Healthcare Systems (Full Analysis):
- 90% use Google Analytics (9 out of 10 institutions)
- NYU Langone: β Only major system without tracking
- Mount Sinai, Montefiore, Northwell, Albany Med, Rochester Regional: β All tracking with Google Analytics
Other Notable Results:
- Stanford Health Care: β Google Analytics detected
- Kaiser Permanente: β Google Analytics detected
- Cedars-Sinai: β Clean (no tracking)
- Mayo Clinic: β Clean (no tracking)
- 8 Major Tracking Pixels - All major advertising platforms covered
- 6 Consent Platforms - OneTrust, Cookiebot, Osano, TrustArc, Usercentrics, Termly
- Consent Banner Testing - Automated interaction testing to verify compliance (NEW!)
- 5 Detection Methods - Network, DOM, JavaScript, cookies, and fingerprinting
- 99%+ Accuracy - Virtually no false positives or negatives
- Stealth Mode - Avoids bot detection with playwright-stealth
- Evidence Collection - Screenshots, network logs, timeline events, and technical details
- 10-second scans - Fast enough for real-time assessments
- Concurrent batch processing - Scan 100s of sites in minutes
- Automatic retries - Handles network issues gracefully
- DNS pre-check - Skips non-existent domains automatically
- 91% test coverage - Production-ready reliability
- Smart URL normalization - Handles various input formats automatically
- Intelligent domain resolution - Finds the best accessible version (www vs non-www, http vs https)
- Copy-paste artifact cleaning - Removes quotes, markdown syntax, trailing punctuation
- Subdomain and path support - Works with complex URLs like
secure.hospital.com/patient-portal - Alternative suggestions - Provides helpful alternatives when domains fail
Run Pixel Detector at scale with Docker containers:
- Simple CLI interface: Uses the proven pixel-detector CLI tool
- CSV batch processing: Supports custom_id,url columns for portfolio analysis
- Corporate proxy support: Works behind firewalls with SSL inspection
- Pre-cached dependencies: Handles corporate environments gracefully
Quick Start:
# Build image
./build-with-proxy.sh # Handles corporate proxies automatically
# Run single scan
docker run --rm pixel-scanner scan google.com
# Run batch scan
docker run --rm -v $(pwd):/work pixel-scanner batch /work/domains.csv -o /work/resultsDocumentation:
- Docker Development Guide - Local and corporate setup
- Docker Deployment Guide - Production deployment
- Python 3.11 or higher
- uv package manager
- 1GB free disk space (for Chromium)
Pixel Detector is distributed from this repository and its
GitHub Releases.
It is not currently published on PyPI; pip install pixel-detector is not
a supported installation path.
Starting with v2.3.0, each GitHub Release includes a reviewed wheel and
source distribution. To install a downloaded wheel:
uv venv
uv pip install ./pixel_detector-2.3.0-py3-none-any.whl
uv run playwright install chromium
uv run pixel-detector --version# 1. Clone the repository
git clone https://github.com/minghsuy/pixel-detector-v2.git
cd pixel-detector-v2
# 2. Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# 3. Install dependencies
uv sync
# 4. Install browser
uv run playwright install chromium
# 5. Verify installation
uv run pixel-detector --version
uv run pixel-detector list-detectorsIssue: Playwright installation fails
# Try installing with dependencies
uv run playwright install --with-deps chromiumIssue: Permission denied errors
# Run with proper permissions
sudo uv run playwright install chromium| Feature | CLI Scanner (pixel-detector) |
|---|---|
| Single Domain | pixel-detector scan domain.com |
| Batch TXT | pixel-detector batch domains.txt -o results/ |
| Batch CSV | pixel-detector batch portfolio.csv -o results/ |
| Speed | β‘ Fast without screenshots (2-3 hrs/1700 domains) |
| Screenshots | β
Optional (--screenshot flag) |
| CSV Support | β Yes (custom_id,url columns) |
| Docker Ready | β Fully optimized |
| Corporate Proxy | β Supported with build script |
| Output Format | CSV with timestamps, duration, pipe-separated pixel names |
For portfolio analysis with custom tracking:
custom_id,url
COMP001,healthcare-site.com
COMP002,hospital.orgComprehensive results with timing and error tracking:
custom_id,url,domain,scan_status,has_pixel,pixel_count,pixel_names,timestamp,duration_seconds,error
COMP001,healthcare-site.com,healthcare-site.com,success,1,2,google_analytics|meta_pixel,2025-01-21T10:30:45Z,3.45,
COMP002,invalid-url,,rejected,0,0,,2025-01-21T10:30:46Z,0.01,Invalid domain format# CSV with custom IDs (portfolio mode)
pixel-detector batch portfolio.csv -o results/ --max-concurrent 10
# TXT file (simple list mode)
pixel-detector batch domains.txt -o results/ --max-concurrent 10
# Docker batch processing
docker run --rm -v $(pwd):/work pixel-scanner batch /work/portfolio.csv -o /work/results- Automatic normalization: Cleans URLs, removes protocols, handles variations
- Invalid domain detection: Flags and reports invalid entries
- Deduplication: Scans each unique domain only once
- Error tracking: Captures and reports all failures with reasons
The pixel-detector CLI provides comprehensive scanning with optional screenshot evidence.
# Scan a single domain (NO screenshot by default)
pixel-detector scan healthcare-site.com
# Scan WITH screenshot evidence (slower but provides visual proof)
pixel-detector scan hospital.com --screenshot
# The scanner will automatically:
# - Add https:// if no protocol specified
# - Try www/non-www versions to find the accessible one
# - Clean up copy-paste artifacts (quotes, commas, etc.)
# - Follow redirects to the correct URL
# Scan with custom timeout
pixel-detector scan slow-site.com --timeout 60# Batch scan WITHOUT screenshots (faster)
pixel-detector batch sites.txt -o results/
# Batch scan WITH screenshots (slower, creates evidence)
pixel-detector batch sites.txt -o results/ --screenshot
# Scan with more concurrent connections (faster for many sites)
pixel-detector batch large-list.txt --max-concurrent 10
# Scan with custom timeout and retries
pixel-detector batch slow-sites.txt --timeout 60000 --max-retries 5# Python API
from pixel_detector import Scanner
scanner = Scanner()
result = await scanner.scan_domain("hospital.com")
if result.pixels_detected:
print(f"Found {len(result.pixels_detected)} trackers!")
for pixel in result.pixels_detected:
print(f"- {pixel.type}: {pixel.risk_level}")For optimal performance when scanning many sites:
# Increase concurrent scans (default: 5)
pixel-detector batch sites.txt --max-concurrent 20
# For sites with bot protection
pixel-detector batch protected-sites.txt --max-retries 5 --timeout 60000
# Skip health checks for faster scanning (less reliable)
pixel-detector batch sites.txt --no-health-checkConcurrent Scanning Guidelines:
- 5 concurrent (default): Safe for most systems
- 10 concurrent: Good for modern machines with 8GB+ RAM
- 20 concurrent: Maximum recommended, requires 16GB+ RAM
- Each browser instance uses ~200MB RAM
# Increase timeout for slow sites
export PIXEL_DETECTOR_TIMEOUT=60000
# Enable debug logging
export PIXEL_DETECTOR_LOG_LEVEL=DEBUG
# Set custom user agent
export PIXEL_DETECTOR_USER_AGENT="Custom Bot 1.0"| Option | Description | Default |
|---|---|---|
--timeout |
Page load timeout (ms) | 30000 |
--screenshot |
Capture screenshots | False |
--headless |
Run without browser UI | True |
--retries |
Number of retry attempts | 3 |
--max-concurrent |
Maximum concurrent scans | 5 |
- Architecture Overview
- Cyber Insurance Use Cases
- Example Scan Results - Real-world healthcare scans
- Detection Patterns
- Contributing Guide
- Phase 1: Core detection engine (8 tracking pixels)
- Phase 1.5: Consent platform detection (6 CMPs)
- Phase 2: Banner interaction testing β¨ NEW!
- Phase 3: Performance optimization (5x faster)
- Testing: 91% code coverage achieved
- Cloud deployment: Docker/Kubernetes ready
- REST API development - FastAPI wrapper available
- Batch consent testing for portfolio analysis
- Enhanced reporting and dashboards
- Real-time monitoring service
- Historical tracking database
- Automated compliance report generation
- Email alerts for violations
- Integration with GRC platforms
- Browser extension for manual testing
- Docker Deployment Guide - Production deployment with Docker
- Local Development Guide - Docker setup for local and corporate environments
- Testing Documentation - Test patterns and coverage
- Testing Achievements - 91% coverage success story
- Why This Matters - $66M in HIPAA fines context
- Cyber Insurance Adoption - Insurance industry value prop
- Quick Start for Insurers - 5-minute proof of value
- Architecture - System design and components
- Analysis Reports - Business case and improvements
- Example Results - Real healthcare scan results
- AWS Fargate Guide - AWS deployment (alternative to Docker)
We welcome contributions! Key areas:
- Add new pixel detectors
- Improve detection accuracy
- Performance optimizations
- Documentation improvements
- Bug fixes
See CONTRIBUTING.md for guidelines.
- Issues & Bug Reports: GitHub Issues
- Feature Requests: GitHub Issues
- Discussions: GitHub Discussions
MIT License - See LICENSE for details
This tool is for legitimate security testing and compliance verification only. Users are responsible for obtaining proper authorization before scanning any websites they do not own.
Pixel Detector:
- β Never collects or transmits scanned data
- β All scanning happens locally
- β No telemetry or usage tracking
- β Open source for full transparency
Built with β€οΈ for healthcare privacy by the security community