Repository navigation
v2.5.5 Phase 3 follow-ups: JitContext consolidation + test-data lexer + block-comment markers #116
Description
Context
PR #102 / #105 / #106 / #107 landed the v2.5.5 context-awareness foundation modules. PR #110 wired test_context + comment_marker + ffi_kind into assail::apply_v255_context_suppression. Three follow-ups remain.
Phase 3a — JitContext analyzer consolidation
src/assail/analyzer.rs:1117..1129 has an inline Cranelift detection that downgrades mem::transmute-to-fn-ptr findings from Critical to High. PR #107 factored this into reusable src/jit_context.rs (Cranelift / Llvm / Wasm / Javascript classifier + transmute_targets_fn_ptr recogniser) but the inline check still works correctly.
Consolidation: replace the inline check with calls to classify_rust(content) + transmute_targets_fn_ptr(content). Behaviour is identical for the Cranelift case; LLVM/Wasm/JS contexts pick up the same severity downgrade automatically.
This is code cleanup, not an FP reducer. Low priority.
Phase 3b — Test-data fixture lexer (test-specific suppression patterns)
ROADMAP test_context item: 'Create test-specific suppression patterns for HTTP URLs and other test data.'
Scope: a sub-lexer that recognises example/test data (example.com / test@test.com / AAAA…AAAA placeholder strings / Bearer test headers / etc.) inside files whose test_context is TestOnly or Doc. When found, flips WeakPoint.suppressed = true for findings whose location-span overlaps the test-data region.
This needs to integrate with the existing apply_v255_context_suppression pass — likely adding a (4) condition after the three existing checks.
Phase 3c — Block-comment markers
src/comment_marker.rs currently recognises markers only in LINE comments (//, #, --, ;, %). Add block-comment forms:
/* panic-attack: accepted - reason */(C-family){- panic-attack: accepted - reason -}(Haskell / Idris)(* panic-attack: accepted - reason *)(OCaml / SML)
Same scope rule applies (same line OR immediately preceding line). The parser needs to handle the closing */ / -} / *) properly.
Low priority — line comments cover the common case. File for tracking only.
Acceptance
Three separate PRs, one per phase. Tests + ROADMAP [~] → [x] per delivered item.
Refs
- ROADMAP.adoc v2.5.5
- PR feat(suppression): v2.5.5 Phase 2 — analyzer wire-up #110 (Phase 2 wire-up — the integration point)
- PRs feat(test_context): v2.5.5 cross-language test detection + WeakPoint field #102 / feat(comment_marker): v2.5.5 inline 'panic-attack: accepted' suppression #105 / feat(ffi_kind): v2.5.5 FFI subtyping (BuildSystem / RuntimeAbi / TestMock) #106 / feat(jit_context): v2.5.5 JIT-framework classifier (Cranelift/LLVM/Wasm/JS) #107 (the foundation modules)
Activity
release(v2.5.5): tag the 11-PR context-awareness cohort (#118)