Files
ruflo/v3/plugins
rUvandr ca70a30672 fix(security): linear-time channel-guard role scan, unguessable MCP session ids (#5117)
* fix(security): linear-time channel-guard role scan, unguessable MCP session ids

- channel-guard (cli, shipped) and channel-guard-worker (hooks): the
  role-shift regex `(^|\n)\s*(system|...)` was quadratic on newline runs
  (CodeQL js/polynomial-redos #256): 400k newlines took about a minute.
  `[^\S\n]*` can't cross a newline, so the scan is linear. Leading blank
  lines before a first role marker still count as the preamble.
- legal-contracts extractKeyTerms: `\d+\s*(days?...)` and `\d+%` were
  quadratic on digit runs (CodeQL #325); `(?<!\d)` anchors them.
- shared/mcp and v3/mcp SessionManager: replace timestamp + Math.random()
  session ids with randomUUID(), matching @claude-flow/mcp.

Co-Authored-By: RuFlo <ruv@ruv.net>

* revert shared/mcp session-manager change (needs its own leaf publish; follow-up)

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-11-25 09:21:13 -05:00
..