Cha
1.8.0 - 2026-04-25
v1.8.0
Apr 25 2026 at 13:12 UTC
Added
abstraction_boundary_leakpost-analysis finding — detects dispatcher functions that fan out to ≥ 3 sibling callbacks which all share the same non-local type in corresponding parameter positions. Flagged as a missing Anti-Corruption Layer. lvgl scan shows 11/13 true-positive rate identifying GLAD/SDL/STB/Win32 leaks.FunctionInfo.parameter_typesnow carriesTypeRef { name, raw, origin }whereoriginisLocal | External(module) | Primitive | Unknown. Each parser resolves origins from file imports: Rustuse_declaration, TSimport_statement, Pythonimport/from, Goimport_specwithgo.modmodule root lookup, C/C++ primitive seeding.- Parser normalisation helpers in
cha-parser/src/type_ref.rsunwrap&'a mut Vec<Option<T>>,[]T,List[T],pkg.Typeetc. down to the innermost identifier for import lookup. - Universal-primitive fallback in resolve (String, PathBuf, HashMap, int, boolean, etc.) so common prelude types without explicit imports don't trip the detector.
unwrap_abusenow emits one finding per.unwrap()/.expect(call site (was: single finding at function name). IDE underlines each call directly.switch_statementnow points at theswitch/matchkeyword inside the function body (was: function name).message_chainnow points at thea.b.c.dchain expression itself (was: function name). Heuristic text scan, falls back to function name when the chain can't be textually located.
Changed
FunctionInfo.parameter_typestype changed fromVec<String>toVec<TypeRef>— breaking change for WASM plugins and cached SourceModels. WIT schema addstype-refrecord andtype-originvariant. Rebuilding against the new SDK picks up generated types automatically.- Parsers no longer sort
parameter_types— declaration order is preserved, fixing latent.first()-based C OOP heuristics that silently depended on alphabetical ordering.data_clumpsplugin now sorts its own key locally.