You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tcl: unbounded single-quote pairing in _build_brace_safe_stream mispairs SQL-literal apostrophes, swallowing real procs #2242
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginethreat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability
Found during a tri-comparison ledger sweep of tcl/function/existence/agree[ctags,tree_sitter]_vs[gitgalaxy] (already validated but with an inaccurate root cause — corrected in the same pass; this issue tracks the actual fix).
Confirmed real, currently-reproducing GitGalaxy defect, root-caused by driving the pipeline directly (Prism.split_streams() → StructuralExtractor._build_brace_safe_stream()) rather than trusting the ledger's prior surface-level verdict ("GitGalaxy misses proc with nested braces in args" — not the actual mechanism).
sqlite/tester.tcl:2254 (proc drop_all_tables {{db db}} { ... }) and :2279 (proc drop_all_indexes {{db db}} { ... }) are both completely absent from GitGalaxy's output. ctags and tree-sitter both correctly find both.
Root cause:gitgalaxy/core/detector.py's _build_brace_safe_stream's generic (non-language-specialized) string-shielding branch — used for tcl, since tcl has no dedicated branch in that function — includes an unbounded single-quote pairing regex ('(?:\\.|[^'\\])*') with no length cap and no per-language gate, unlike rust/zig (#1426)/scala/perl, which each already got a bounded or disabled version of this same pattern after hitting the identical class of bug. Tcl has no single-quote string literal syntax at the language level at all — a bare ' is just an ordinary character.
sqlite/tester.tcl:2234 contains string map {' ''} $contents — a normal SQL-single-quote-doubling idiom with 3 literal ' characters in a 7-character span, an odd count that desyncs the naive pairing: the regex consumes two of the three as one "string," leaving the third dangling, which then pairs with the next unrelated ' character found far downstream (inside drop_all_tables's own SQL text, WHERE type IN('). Everything in between — spanning roughly lines 2235–2281 — gets blanked out as if it were string content, including the full headers of both drop_all_tables and drop_all_indexes.
Suggested fix: gate tcl into the same bounded/disabled treatment already given to rust/zig/scala in the same function — ideally disable single-quote pairing for tcl entirely, since the language has no single-quote string syntax to protect in the first place.
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginethreat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability
Activity
docs: full tri-comparison ledger sweep -- 49 shapes resolved, 0 unval…
fix(typescript): recognize negation-body arrows, optional method sign…
fix(tcl): gate single-quote pairing out of the brace-safe stream (#2266)
docs(tcl): language status write-up, capstone for the cleared ledger …