docs(divergence): our own form has a number now, and it is quadratic
The guard answered the span-byte question with evidence rather than preference: their [^><] is a measured ReDoS fix (cff0437, 2026-07-31), and they asked us to measure our form rather than take their word for it. We did. Node v25.8.2 and Python 3.14.0, patterns read out of the lexicon, run over '<script ' repeated — the unit that denies the pattern the > it needs: 25.5ms at 16k chars, 6681.6ms at 256k. x4.0 per doubling against the guard form's x2. Quadratic against linear, reproduced in both engines. It is scan-position quadratic, not catastrophic backtracking: <script matches at ~n positions and [^>]* scans to end of input at each one. Counted across the whole file instead of stopping at the row we were told about: 8 of 83 patterns carry a bare [^>], none carries [^><]. Six are the bounded html-obfuscation family — measured linear, so bounding does work, at the recall cost this file already records. Two are unbounded, and the second one, hybrid-xss:iframe-src, had not been named by any party: 16.9s at 256k chars. That row is ours, found by counting rather than by being told. No data file touched. Both patterns stay byte-identical to llm-security's source, because behaviour preservation is not suspended when a measurement is unwelcome — commons carries [^>] on provenance and would carry [^><] had the source been the guard's. The finding is routed to the owning runtime instead, which is exactly the path SECURITY.md promised an outsider three commits ago. First time that route is walked from the inside. Also recorded: the guard's own disclosure that their suite passes under both forms (717 green), because their DoS row repeats '<script>' — which supplies the > and never exercises the run. Verified: JSON well-formed, every spec still normative, charter clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T85QqeiWBEoBMjWaMiBnxD
This commit is contained in:
parent
0e765a02eb
commit
4187715ab7
2 changed files with 71 additions and 0 deletions
19
CHANGELOG.md
19
CHANGELOG.md
|
|
@ -11,6 +11,25 @@ case ids, disposition semantics). Each JSON file additionally carries its own
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- `docs/lexicon-port-divergence.md` (informative) — the `[^>]` vs `[^><]` row gets the number
|
||||
it never had for **this** side. The guard disclosed that their `[^><]` is a measured ReDoS fix
|
||||
(`cff0437`), not a preference, and asked commons to measure its own form rather than take
|
||||
their word. Measured here in Node and Python: `<script\b[^>]*>` is **quadratic** in scan
|
||||
position on input that denies it a `>` — ×4.0 per doubling, 6.7 s at 256 000 chars against
|
||||
0.41 ms for the guard's form.
|
||||
|
||||
Counted across the whole lexicon rather than assumed from the one row: 8 of 83 patterns carry
|
||||
a bare `[^>]`, six of them bounded (`{1,256}`, measured linear) and **two unbounded**. The
|
||||
second unbounded one, `hybrid-xss:iframe-src`, had not been named by any party — 16.9 s at
|
||||
256 000 chars.
|
||||
|
||||
**No data file is touched and neither pattern changes here.** Both are byte-identical to
|
||||
`llm-security`'s source, and behaviour preservation is not suspended because a measurement is
|
||||
unwelcome. The finding is routed to the owning runtime, which is what `SECURITY.md` promises
|
||||
an outsider would happen — this is the first time that route has been walked from the inside.
|
||||
|
||||
## [0.3.1] — 2026-08-11
|
||||
|
||||
**No pattern changed value. One shipped table is disclosed as stale, and the repository gains
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue