File tree Expand file tree Collapse file tree
src/skillspector/nodes/analyzers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -351,7 +351,9 @@ searches remain outside it. The anti-refusal schema-field helper uses a linear
351351whitespace prefix so its benign-context check cannot backtrack quadratically.
352352
353353Audited command/option patterns use a linear, command-segment search that preserves
354- unbounded command spans and the original greedy matches. Memory poisoning's
354+ unbounded command spans and the original greedy matches. The SC3 shell-decoder
355+ rules keep their native matcher: their literals, stages and options already have
356+ explicit length/count bounds and atomic or possessive ambiguous groups. Memory poisoning's
3553572–20-character repetition rule uses Python's native engine: failed candidates
356358examine at most 20 copies, and successful candidates consume the repeated run.
357359The variable shell-flag rule also retains Python’s native backreference semantics.
Original file line number Diff line number Diff line change @@ -2282,8 +2282,13 @@ def line_number(start: int) -> int:
22822282 if has_shell_decoder :
22832283 sc3_patterns = sc3_patterns + SC3_SHELL_PATTERNS
22842284 for pattern , confidence in sc3_patterns :
2285+ # Shell-decoder rules already bound every stage/literal and use atomic
2286+ # or possessive ambiguous groups. Keep their audited native matcher;
2287+ # the interruptible engine adds enough cost to reject dense input.
22852288 matches = (
2286- static_runner .iter_paragraph_matches
2289+ re .finditer
2290+ if (pattern , confidence ) in SC3_SHELL_PATTERNS
2291+ else static_runner .iter_paragraph_matches
22872292 if (pattern , confidence ) in SC3_PROSE_PATTERNS
22882293 else static_runner .iter_pattern_matches
22892294 )
You can’t perform that action at this time.
0 commit comments