flutter/flutter

5 docs files carry U+202C bidi controls (the CVE-2021-42574 / Trojan Source class), apparently harmless and mostly in archived release notes, caught by oss-baseline's no_bidi_controls rule and missed by every other tool in the pipeline.

Narrative
Polyglot wins
Rules
68 at study time · 58 in today’s ruleset
Last revalidated
Engineering reference
README on GitHub · .alint.yml

Point-in-time snapshot, validated against the alint rule catalogue as of the date above. The catalogue has grown since, so capabilities this writeup frames as planned may already ship; see the current rule catalogue for what alint enforces today.

Why this matters

flutter/flutter is the flagship “platform-driven polyglot monorepo” in the corpus, a single tree where the framework itself is Dart, but every native-OS embedder (Android, iOS, macOS, Linux, Windows, Fuchsia, GLFW desktop, the cross-platform “embedder” ABI) lives as a peer subdirectory under engine/src/flutter/shell/platform/, each implementing the same surface (PlatformView, ExternalTexture, KeyEventHandler, VsyncWaiter, PlatformMessageHandler, AccessibilityBridge) in the language native to that OS:

Where apache/arrow is the data-format-driven polyglot (one schema, six per-language readers), flutter is the platform-driven polyglot (one framework, six per-OS embedders).

Concrete polyglot density in the in-scope tree:

No per-platform IDE / linter sees the cross-platform conventions: Android Studio sees android/, Xcode sees darwin/{ios,macos}/, MSVC sees windows/, but no one tool sees them as peers.

Headline catch

Running the alint config against the live tree surfaces 5 files carrying U+202C bidirectional controls (the CVE-2021-42574 / Trojan Source character class) in docs/about/Values.md and 4 archived release-notes files under docs/releases/archive/, caught by oss-baseline’s no_bidi_controls rule. They are almost certainly harmless, sitting in contributor names / commit messages copied into the docs; alint surfaces them at PR time.

This is one of the clearest “alint catches things other tools miss” examples in the case-study corpus. The bidi controls slip past every per-language linter (Dart analyzer, clang-format, clang-tidy, eslint, gofmt, etc.) because they’re embedded in markdown text content, not source code; they slip past markdown linters because the controls are valid Unicode and don’t break rendering. alint’s no_bidi_controls rule, shipped in the oss-baseline@v1 ruleset by default, catches them across the whole repo in one pass.

CVE-2021-42574 (Trojan Source) is the 2021-disclosed attack class where bidirectional text controls let attackers visually conceal malicious code in commits, exactly the threat model where “valid Unicode that no per-language tool flags” is the failure mode. A language-agnostic tool that scans every text file in the repo by default is a structural defence.

Plus the Apple framework four-file layout (Headers/, Source/, Info.plist, module.modulemap per engine/src/flutter/shell/ platform/darwin/{ios,macos}/framework/), another invariant no Linux/Windows developer would notice was broken; drift here silently breaks xcodebuild framework targets that external Flutter apps consume.

Where alint earns its keep here

The Flutter-Authors BSD-style header rule across 5 native languages + Dart is the cleanest single-rule polyglot demo in the catalogue, one regex, ~9,000 source files across 6 languages, one alint pass. The engine subtree’s format.sh enforces this on engine/src/flutter/ only; alint extends the same gate to the framework subtree (packages/, dev/, examples/) where it’s currently enforced only by review discipline.

Per-platform structural invariants checked once across the entire polyglot tree:

flutter is the fifth independent demand signal for cross_language_implementation_complete (now v0.11+ ship-target, saturated at 5 sources: arrow + TF + protobuf + angular + flutter) and the first platform-driven source, distinct from the data-format-driven variant that arrow + tensorflow demonstrate. The shape generalises to every cross-platform UI framework with per-OS native embedders (React Native, Xamarin/MAUI, Qt, Tauri).

flutter also surfaces:

Future story angles

The factual engineering writeup (tooling inventory, mapping table, gap catalogue, validation status footer) lives in the public alint repo at github.com/asamarts/alint/tree/main/examples/flutter-flutter/README.md.