feat: Add Supabase credential detection and security analysis#1
feat: Add Supabase credential detection and security analysis#1chukfinley wants to merge 10 commits intotusharonly:mainfrom
Conversation
- Add SupabaseService for detecting Supabase project URLs and anon keys in APKs - Add SupabaseResultsPage to display found credentials and test bucket access - Add SettingsService for app configuration - Add share_plus for sharing analysis results - Enhanced APK analyzer to extract and validate Supabase credentials - Improved app_tile widget with expanded functionality - Updated settings page with new configuration options Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Scan .so files where Flutter stores compiled strings (libapp.so) - Detect Supabase if URL OR key found (not just when both present) - Security check still requires both URL and key to run tests This fixes detection for Flutter apps like Chuck.Chat that use Supabase but weren't being detected because their credentials are in native libs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Supabase changed their key format from JWT (eyJ...) to a new format: - Old: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... - New: sb_publishable_xxx or sb_secret_xxx Now detects both formats for backwards compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Decode JWT payload and check for Supabase-specific fields - Only match JWTs with "iss" containing "supabase" or role fields - This eliminates false positives from other services (Auth0, Firebase Auth, etc.) - Updated UI labels for consistency Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Thanks for this. Give me some time I'll review and merge if everything looks good. |
|
Could you please also update the Readme file. |
- Updated title to reflect Firebase & Supabase scanning - Added Supabase detection features section - Documented Flutter app support (.so file scanning) - Added smart JWT validation description - Updated filtering options - Added bug bounty hunters use case Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
I tested your code locally the Firebase remote config logic works perfectly with your Supabase logic but I don't have any Supabase app that has there config exposed can you share some apps that are vulnerable so that I can install them on my device and have the code tested. |
UI Improvements: - Added search functionality (search icon in app bar) - Changed to manual scan mode - users must press "Start Scan" button - Show scan prompt with app count before scanning - Search works on app name and package ID - Search results update in real-time This gives users more control and makes it easier to find specific apps in large app lists. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Expanded common table names list from 20 to 55+ names - Added security-sensitive table names (secrets, credentials, etc.) - Implemented PostgREST OpenAPI schema discovery - Automatically discovers tables from the API schema endpoint - Falls back to common table names if schema discovery fails Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Unified UI design with List/Table/JSON view modes (matching Firebase) - SegmentedButton view switcher for consistent navigation - Display Project URL and Anon Key as info cards - Exposed tables, buckets, and files shown as finding cards - Expandable cards for large data with expand/collapse - Bottom sheet detail view on long press - Share and copy buttons in app bar - JSON view with dark theme code block - Table view with Type/Name/Details columns - All findings color-coded by type (table=purple, bucket=orange, file=blue) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added Schema Discovery feature for Supabase - Added unified UI for List/Table/JSON views - Added Search functionality - Added Manual Scan Mode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added Overview tab with category-based display (credentials, stats, tables, buckets, files) - List view shows all findings as unified cards - Table view shows data in a spreadsheet format - JSON view shows raw data with dark theme - All views have copy/share functionality - Expandable cards for sample data preview Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Supabase Security Detection - Complete ImplementationHey @tusharonly! This PR adds comprehensive Supabase security scanning alongside the existing Firebase functionality.
Features AddedSupabase Credential Detection:
Security Analysis:
UI Improvements:
Test App AvailableI created an intentionally insecure Flutter app for testing:
The Supabase instance has:
README UpdatedAdded documentation for all new Supabase features, search functionality, and manual scan mode. Generated by Claude Opus 4.5 via Claude Code |
Summary
Key Features
Supabase Key Detection (Both Formats!)
sb_publishable_xxxorsb_secret_xxx(always detected)eyJhbG...(validated to ensure it's actually Supabase)Smart JWT Validation
Unlike Firebase keys (which have unique
AIzaprefix), JWT tokens are used by many services. We now decode the JWT payload and check for Supabase-specific fields:"iss"containing "supabase""role": "anon"/"authenticated"/"service_role"This eliminates false positives from Auth0, Firebase Auth, Stripe, etc.
Flutter App Support
.sonative library files where Flutter stores compiled stringsChanges
New Files
lib/src/services/supabase_service.dart- Credential validation and bucket enumerationlib/src/pages/supabase_results_page.dart- UI for Supabase analysis resultslib/src/services/settings_service.dart- App settings managementModified Files
Test Plan
🤖 Generated with Claude Code