cometchat-flutter-v5-production — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited cometchat-flutter-v5-production (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Ground truth:cometchat_chat_uikit: ^5.2(legacy/maintenance-only; calls via rawcometchat_calls_sdk ^5.0.2) — pub-cache source +ui-kit/flutter/v5. Official docs: https://www.cometchat.com/docs/fundamentals/user-auth · Docs MCP:claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp(or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
Hardening a CometChat Flutter app for production deployment.
Development: CometChatUIKit.login(uid) uses authKey from UIKitSettingsBuilder. This is convenient but insecure — the authKey is embedded in the app binary.
Production: Use server-minted auth tokens via CometChatUIKit.loginWithAuthToken(authToken):
// 1. Your backend generates an auth token via CometChat REST API
// POST https://{appId}.api-{region}.cometchat.io/v3/users/{uid}/auth_tokens
// Header: apiKey: YOUR_API_KEY
// 2. Your Flutter app receives the token and logs in
CometChatUIKit.loginWithAuthToken(authToken,
onSuccess: (user) { ... },
onError: (e) { ... },
);This keeps the API key on your server, never in the client.
Store credentials outside source code:
class AppCredentials {
static String _appId = '';
static String _authKey = '';
static String _region = '';
// Load from SharedPreferences, environment, or remote config
static String get appId => _appId.isEmpty
? SharedPreferencesClass.getString('appId')
: _appId;
static Future<void> setAppId(String value) async {
await SharedPreferencesClass.setString('appId', value);
_appId = value;
}
}The master app supports QR code scanning to load credentials dynamically (CometChatQRScreen).
android.useAndroidX=true
android.enableJetifier=true// android/app/build.gradle
defaultConfig {
minSdk 24 // Matches vendor samples (sample_app + sample_app_push_notifications + calls_uikit android/build.gradle).
// Raw calls-sdk docs cite 26; the UI Kit wrapper relaxes to 24 for chat-only apps.
// Bump to 26 ONLY if your app uses calls AND fails at runtime with a min-SDK error from the calls plugin.
}Create android/app/proguard-rules.pro:
-keep class com.cometchat.** { *; }
-keep interface com.cometchat.** { *; }
-dontwarn com.cometchat.calls.**Reference in build.gradle:
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}signingConfigs {
release {
storeFile file('your_keystore.jks')
storePassword 'STORE_PASSWORD'
keyAlias 'KEY_ALIAS'
keyPassword 'KEY_PASSWORD'
}
}<key>NSCameraUsageDescription</key>
<string>Camera access for video calls and photo sharing</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access for voice and video calls</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo library access for sharing images</string>Enable in Xcode: Background Modes → Voice over IP, Remote notifications, Background fetch.
Ensure minimum iOS deployment target matches CometChat requirements.
// In main(), before runApp:
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);FlutterError.onError = (errorDetails) {
FirebaseCrashlytics.instance.recordFlutterFatalError(errorDetails);
};
PlatformDispatcher.instance.onError = (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
return true;
};Configure provider IDs for FCM and APNs in the CometChat dashboard:
static String get fcmProviderId => 'your-fcm-provider-id';
static String get apnProviderId => 'your-apn-provider-id';These must match what's configured in the CometChat dashboard under Notifications → Push Notifications.
For internal tracking (optional):
CometChat.setDemoMetaInfo(jsonObject: {
"name": "flutter-sample-app",
"type": "sample",
"version": "5.2.11",
"platform": "flutter",
});// 1. Unregister push tokens — real SDK API:
await CometChatNotifications.unregisterPushToken(
onSuccess: (_) {},
onError: (e) {},
);
// (PNRegistry.unregisterPNService() only works if you copied the v5 sample-app
// `extension PNRegistry on CometChatService` helper into your project — it is
// NOT importable from any cometchat_* package. See cometchat-flutter-v5-push.)
// 2. Sign out from Firebase/Google (if applicable)
await FirebaseAuth.instance.signOut();
await GoogleSignIn().signOut();
// 3. Logout from CometChat
await CometChatUIKit.logout(
onSuccess: (_) { /* navigate to login */ },
onError: (e) { /* show error */ },
);~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.