flutter_permission_scanner 1.0.1
flutter_permission_scanner: ^1.0.1 copied to clipboard
A CLI tool that scans Flutter projects and their dependencies for native permissions (Android, iOS, macOS) to help prevent App Store rejections and ensure privacy compliance.
Flutter Permission Scanner #
A powerful CLI tool to scan your Flutter project and all its dependencies for native permissions on Android, iOS, and macOS. Perfect for security audits, CI/CD pipelines, and ensuring your app complies with privacy guidelines.
Features #
- Android Support: Scans
AndroidManifest.xmlfor<uses-permission>and<uses-permission-sdk-23>. - iOS & macOS Support: Scans
Info.plistand.podspecfiles forNS...UsageDescriptionkeys. - Dependency Scan: Automatically discovers all dependencies and their requested permissions.
- Main App Scan: Checks your host application's explicit permission requests.
- Sensitive Highlighting: Automatically flags sensitive permissions (like Location, Camera, Microphone).
- Multiple Output Formats: Supports professional Terminal output, raw JSON, and Markdown tables.
Installation #
Install the package globally using:
dart pub global activate flutter_permission_scanner
Usage #
Run the scanner in the root of your Flutter project:
flutter_permission_scanner
Options #
-a, --all: Show all packages, even those with no native permissions.-j, --json: Output results as raw JSON for easy integration with CI/CD tools.-m, --markdown: Output results as a formatted Markdown table, ideal for PR comments.-h, --help: Show usage information.
CI/CD Example (GitHub Actions) #
Integrate this tool into your CI/CD to automatically document permissions on every PR:
- name: Run Permission Scanner
run: flutter_permission_scanner --markdown >> permission_report.md
License #
MIT License - see LICENSE for details.