flutter_auditor 1.0.0
flutter_auditor: ^1.0.0 copied to clipboard
A CLI that audits Flutter projects for security misconfigurations (Android manifest, iOS Info.plist, hardcoded secrets, insecure network/storage) and dependency hygiene issues.
flutter_auditor #
A command-line security & dependency audit tool for Flutter projects. Point
it at a Flutter project and it scans the Android manifest, iOS Info.plist,
Dart source, and pubspec.yaml/pubspec.lock for common security
misconfigurations and dependency hygiene issues — no project modification,
read-only analysis.
Installation #
dart pub global activate flutter_auditor
Or run it from source without installing:
dart run bin/flutter_auditor.dart audit
Usage #
Run from the root of the Flutter project you want to audit:
flutter_auditor audit
Options #
| Flag | Description |
|---|---|
-v, --verbose |
Show full detail for low-risk and maintenance findings (collapsed by default). |
--fail-on <severity> |
Minimum severity that causes a non-zero exit code: critical, high (default), medium, low, info, or none. |
--html <path> |
Write an HTML report (with charts) to the given path, e.g. --html audit_report.html. |
--open |
Open the generated HTML report in the default browser after writing it. |
Example:
flutter_auditor audit --html audit_report.html --open --fail-on medium
What it checks #
Android
android:allowBackupenabled- Cleartext (HTTP) traffic permitted
- Exported activities, services, receivers, and providers
android:debuggableenabled- Manifest permissions (high/medium risk)
- Network Security Configuration (cleartext traffic, trusted user certificates)
- Missing or misconfigured backup rules / data extraction rules
iOS
- App Transport Security exceptions (arbitrary loads, weak minimum TLS version)
UIFileSharingEnabledexposing the Documents directory- Missing, empty, or mismatched usage-description strings (camera, location, etc.)
Cross-platform (Dart source)
- Hardcoded secrets (API keys, tokens, credentials, private keys)
- Insecure network usage (cleartext URLs, disabled certificate validation, WebView SSL bypass)
- Insecure storage (sensitive data in
SharedPreferencesor unencrypted Hive boxes)
Dependencies
- Outdated, discontinued, or unlicensed/restricted-license packages
- An outdated Dart SDK constraint (pre-null-safety)
- Dependencies declared in
pubspec.yamlbut never imported
Exit codes #
0 if no issue meets the --fail-on threshold, 1 otherwise. Maintenance
findings (outdated/unused dependencies) never affect the exit code.
License #
MIT — see LICENSE.