feat(signatures): add active-content.json from verified guard source
The EchoLeak class (CVE-2025-32711): markdown image/link/refdef/autolink, data: URIs and active HTML, plus the URL-shape analysis that separates a URL naming a remote document from one carrying bytes outward. Seeded from llm-ingestion-pipeline-security v0.3.4 @ 0bf0729 (read-only) — active_content.py's pattern table and calibration.py's severities/floors. That module documents itself as the canonical home of this table, which is why the guard is the source here rather than llm-security. One deliberate deviation from byte-identity, recorded in the file: five patterns carried `\"` from Python raw strings, which is a SyntaxError under ECMAScript's u/v flags. Normalised to `"` and proven equivalent by differential match-set comparison (5 patterns x 30 adversarial inputs, 0 differences). Verification log in docs/extraction-plan.md. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191AKc2qW6tmXDFSx1xn53q
This commit is contained in:
parent
ef80288c57
commit
43f682bedd
2 changed files with 277 additions and 0 deletions
|
|
@ -67,6 +67,32 @@ data, never from recollection or inference.
|
|||
`llm-security` when it is later consumed from here. That consumption happens in
|
||||
`llm-security`'s own Phase 5 steps 3–4 — **not here.**
|
||||
|
||||
## Verification log
|
||||
|
||||
Every claim of fidelity below was produced by a command, not by reading. The check scripts
|
||||
themselves deliberately do **not** live in this repository — executable code here would
|
||||
breach the charter. They are reproducible from the description given.
|
||||
|
||||
### `signatures/active-content.json` — extracted 2026-08-09
|
||||
|
||||
Source: `llm-ingestion-pipeline-security` v0.3.4, commit `0bf0729` (2026-08-03),
|
||||
`src/llm_ingestion_guard/active_content.py` + `calibration.py`. Read-only; nothing in that
|
||||
repository was modified.
|
||||
|
||||
| Check | Method | Result |
|
||||
| --- | --- | --- |
|
||||
| JSON well-formed | `python3 -m json.tool` | pass |
|
||||
| Patterns compile as Python `re` | translate `(?<` → `(?P<`, compile all 17 with declared flags | 17/17, 0 failures |
|
||||
| Patterns compile as ECMAScript | `new RegExp(pattern, flags)` on all 17 | 17/17, 0 failures |
|
||||
| Pattern text matches source | compare against the live `re.Pattern.pattern` of each source object, inline flags stripped | 12/17 byte-identical; 5 differ only by the documented `redundant-quote-escape` normalisation |
|
||||
| The 5 normalised patterns behave identically | differential match-set comparison (offsets + captured text) against the source objects over a 30-input adversarial corpus: bare quotes, escaped quotes, markdown titles containing quotes, quoted/unquoted HTML attributes, quote runs of length 1–5 | 150 comparisons, 0 differences |
|
||||
| The normalisation is necessary | `new RegExp('\\"', 'u')` and `'v'` in Node | both throw `Invalid escape`; the bare form compiles under `""`, `"u"` and `"v"` |
|
||||
| Severities, ordinary severity, opacity floors, active-tag set, pass order | compare against `calibration.ACTIVE_CONTENT_SEVERITY`, `ACTIVE_CONTENT_ORDINARY_SEVERITY`, `URL_OPAQUE_*`, `active_content._ACTIVE_TAGS`, and the scan-call order in `scan_active_content` | all identical (23/23 tags, 6/6 severities, 4/4 floors) |
|
||||
|
||||
Not verified, and not claimed: that the Node consumer's active-content behaviour matches
|
||||
this table. The source module states the Node port shares its severities; that is the
|
||||
module's claim, and confirming it needs the Node file.
|
||||
|
||||
## Definition of done for v0.1.0
|
||||
|
||||
1. Repository initialized, Forgejo remote `open/llm-security-commons`, MIT, `STATE.md`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue