Hub rules-flutter

rules-flutter

v3 public Verified

Flutter

Flutter is Google's UI toolkit for building natively compiled applications from a single codebase. These rules govern widget management, state handling, and platform-specific interactions for AI-assisted development.

@sigmashakeinc 2 pulls 7 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-flutter →
Severity
4 error 3 warn 0 info
demo.cast
Flutter is Google's UI toolkit for building natively compiled applications from a single codebase. These rules govern widget management, state handling, and platform-specific interactions for AI-assisted development.

Rules index

7 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

flutter

flutter-deprecated-flatbutton warning log

FlatButton was removed in Flutter 2.0. Replace with TextButton (and TextButton.styleFrom() for theming). FlatButton is no longer maintained and will cause build failures with current Flutter SDK versions.

Rule source requires an active Pro or Enterprise subscription.
flutter-ffi-unsafe warning log

dart:ffi provides C interop with no memory safety guarantees — CWE-119. Incorrect pointer arithmetic, null dereferences, or wrong type casts in FFI code cause undefined behaviour and crashes. Isolate FFI calls in a dedicated wrapper class, validate all pointer values before use, and prefer higher-level packages (e.g., package:ffi) that handle lifetime management.

Rule source requires an active Pro or Enterprise subscription.
flutter-hardcoded-api-key error block

Hardcoded API key or secret in Dart source — CWE-798. Secrets embedded in Dart source are visible in the compiled APK/IPA through simple string extraction. Store secrets server-side or retrieve them at runtime from a secure backend; use flutter_dotenv or similar for local development only (with .env in .gitignore).

Rule source requires an active Pro or Enterprise subscription.
flutter-insecure-allow-cleartext error block

Android manifest enables cleartext (HTTP) network traffic — CWE-319. This allows unencrypted HTTP requests to any host, bypassing Android's Network Security Config restrictions. Remove this attribute or restrict it to a specific domain allowlist in res/xml/network_security_config.xml.

Rule source requires an active Pro or Enterprise subscription.
flutter-insecure-http error block

Plaintext HTTP request to a non-localhost host — CWE-319. HTTP transmits authentication tokens and user data in the clear. Use Uri.https() for all production endpoints. For development emulators, localhost/10.0.2.2 (Android emulator loopback) is acceptable.

Rule source requires an active Pro or Enterprise subscription.
flutter-insecure-shared-prefs warning log

Sensitive data stored in SharedPreferences — CWE-312. SharedPreferences is unencrypted on both Android and iOS and is accessible to other apps on rooted devices. Use flutter_secure_storage (backed by Android Keystore / iOS Keychain) for any token, password, or key material.

Rule source requires an active Pro or Enterprise subscription.
flutter-path-traversal error block

Dynamic file path construction with user-controlled input — CWE-22. Building a File() path by concatenating request parameters allows '../' traversal to access files outside the intended directory. Validate the resolved path starts within the expected base directory using p.normalize and p.isWithin from package:path.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v3
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
17d26b0952fc26b2ff56658105639278a215b0077298f76aa95363f34f78fdb8
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-flutter/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-flutter. The published version only bumps when a maintainer resyncs.

No commit history available.