4641a7b release(0.3.0): a detection pattern changed value — that is new here 1482c0b feat(schema,spec): give the §1.1 MUST a shape, since v0.2.0 shipped it without one 25a2cf9 feat(conformance): the witness case, and the derivation rule that had no room for it c1b2385 fix(lexicon): converge script-tag on its source — re-extraction, not revision 6f79a6e fix(lexicon,docs): the script-tag row reversed — commons is now the sole diverger git-subtree-dir: scanners/commons git-subtree-split: 4641a7b5184047460e3f10038b615a61e7a4ac21
261 lines
23 KiB
JSON
261 lines
23 KiB
JSON
{
|
|
"version": "0.3.0",
|
|
"id": "llm-security-commons/conformance",
|
|
"description": "Enumeration and measurement header for the conformance corpus. Every case directory holds input.txt (the exact bytes to scan) and expected.json (the findings a conforming runtime must produce). The normative reading of those files is spec/conformance-corpus.md; this file records where the cases came from and what was measured.",
|
|
"$comment": "Fixture files carry no individual version field. The corpus is versioned as a whole, here — a case is added, removed or corrected by bumping this version, and a case-id change is a MAJOR bump because consumers name cases.",
|
|
"case_id_derivation": {
|
|
"rule": "case_id = pattern_id with ':' replaced by '__', optionally followed by '--' and a variant slug",
|
|
"reverse": "pattern_id = case_id truncated at the first '--' if present, then '__' replaced by ':'",
|
|
"why": "':' is not a legal filename character on Windows, and this repository is fork-and-own. '__' does not occur in the ratified id space, so the transform is one-to-one — verified collision-free across all 90.",
|
|
"stability": "A case id is a stable identifier. Changing one is a BREAKING change.",
|
|
"variant_suffix": {
|
|
"added_in": "0.3.0",
|
|
"syntax": "'--' + a slug of [a-z0-9-]",
|
|
"purpose": "To hold a SECOND case for one pattern id when the two inputs answer different questions about the same rule. The first such case is hybrid-xss__script-tag--src-no-close: the original case's input matches the pattern under both its pre-0.7.0 and post-0.7.0 forms, so it cannot gate the difference between them, and the variant input can.",
|
|
"separator_is_unambiguous": "Measured, not assumed: '--' occurs in none of the 83 ratified pattern ids and in none of the 89 case ids that predate this version. Ids use single hyphens throughout. So the reverse transform stays purely LEXICAL — split at the first '--', no lookup against the id list required — which is the property the original one-to-one rule was protecting.",
|
|
"constraint": "A variant case MUST be scoped and matched exactly like the base case, and MUST expect the same pattern id. The suffix distinguishes INPUTS, never findings. It is not a licence to record a second, different verdict for one rule.",
|
|
"supersedes": "This replaces the `one_case_per_pattern_id` note carried through 0.2.0, which read: 'The derivation takes a pattern id and nothing else, so a single-finding scope holds at most one case per pattern id — there is nowhere in the name to put a second.' That was an accurate description of the rule and it cost a real case: see `omitted_payloads`, where the guard's seventh active-content payload was dropped for exactly this reason. The rule is now extended rather than worked around. NOTE that the omitted payload has NOT been added back — extending the derivation makes it expressible, but it was omitted on a second ground as well (its in-scope finding set is identical to the case built from coverage.py:476), and that ground still stands unexamined against the new rule. Adding it is a separate decision, not a consequence of this one."
|
|
}
|
|
},
|
|
"match_semantics": "exact-within-scope",
|
|
"scope_covered": [
|
|
"lexicon/injection-lexicon.json",
|
|
"signatures/active-content.json"
|
|
],
|
|
"scope_covered_note": "The two entries do NOT have equal standing, and averaging them would misreport both. `lexicon/injection-lexicon.json` is implemented by both seeding runtimes and its id space is ratified by both. `signatures/active-content.json` is implemented by one; its cases are `not-applicable` for the other under spec/conformance-corpus.md section 1.1, not failures. See that file's `pattern_id_space.single_runtime`.",
|
|
"scope_planned": {
|
|
"$comment": "Named rather than faked. Four convertible cases remain in the guard's coverage matrix (3 carrier, 1 secret-egress), and neither table is blocked on effort — each is blocked on a distinct unresolved question, measured 2026-08-10 and recorded below rather than left as 'no agreement yet'.",
|
|
"codepoints/carriers.json": 3,
|
|
"signatures/secret-egress.json": 1,
|
|
"blockers": {
|
|
"codepoints/carriers.json": "No adoptable id space, and a second problem underneath it. The guard emits TWO stage-coupled labels for the same carrier depending on pipeline position — `sanitize:zero-width` (input) versus `output:zero-width-present` (output), and the same split for bidi and unicode-tag; llm-security emits prose titles (unicode-scanner.mjs:191,236). A commons id would therefore have to be invented stage-neutral, which no other id space here required. And because `exact-within-scope` compares a finding SET, a commons id aliasing both guard labels would make the verdict depend on which entry point the runtime was measured through — an entry-point dependence the lexicon cases do not have, since this manifest pins entry point as a measurement fact rather than as contract.",
|
|
"signatures/secret-egress.json": "Not an id-naming question at all. The two runtimes carry DIFFERENT TABLES, not two namings of one: this file holds 18 entries from llm-security, the guard's `_SECRET_PATTERNS` (output.py) holds 25 at different cut points — this file's single `GitHub Token` is four ids there, `Private Key PEM Block` is three, `Database connection string` is four — and membership diverges both ways (the guard has `gcp-service-account-json` and `openai-api-key-legacy`, which are absent here; this file has `Slack/Discord Webhook URL` and `Azure AI Services Key`, which are absent there). `aws-access-key-id` is the one clean one-to-one, which is why exactly one egress case was ever offered. A shared id space presupposes a table reconciliation that has not happened."
|
|
}
|
|
},
|
|
"omitted_payloads": [
|
|
{
|
|
"source": "llm-ingestion-pipeline-security src/llm_ingestion_guard/coverage.py:484, at commit de09711 (line numbers are commit-relative; the structure is the fifth `_scan_case` of `_build_cases()`'s `active` group)",
|
|
"described_as": "opaque (base64) path segment",
|
|
"expected_label": "active:markdown-image",
|
|
"reason": "Its in-scope finding set is `[active:markdown-image]` — identical, measured, to the case built from coverage.py:476. The only thing that distinguishes it is `entropy:base64-blob`, and this repository publishes no entropy table, so the difference falls outside every declared scope. A second case could not have failed in any way the first does not, and the case-id derivation had no room for it.",
|
|
"$comment": "Recorded so that 6 built from 7 offered reads as a decision rather than as a miscount.",
|
|
"derivation_ground_withdrawn_in_0_3_0": "The second half of `reason` — that the derivation has no room for a second case per pattern id — stopped being true in 0.3.0, when `case_id_derivation.variant_suffix` was added. It is left in the text above with this note rather than silently deleted, because the omission decision was taken on TWO grounds and only this one lapsed. The first ground stands: the payload's in-scope finding set is identical to the case already built, so it still could not fail in any way that case does not. The payload therefore remains omitted, on one ground instead of two. Re-examining it is a separate decision."
|
|
}
|
|
],
|
|
"authored_payloads": [
|
|
{
|
|
"case_id": "hybrid-xss__script-tag--src-no-close",
|
|
"added_in": "0.3.0",
|
|
"added_date": "2026-08-11",
|
|
"input": "<script src=x.js>",
|
|
"authored_by": "llm-security-commons",
|
|
"$comment": "The FIRST case input authored in this repository rather than reproduced from a runtime's payload set, and it is flagged rather than folded into payload_provenance because that block's value is the claim that its inputs are verbatim upstream. That claim stays exactly as strong as it was — 83 of 83 — and this case sits outside it.",
|
|
"why_authored": "No runtime had a payload for it. The input has to distinguish `<script\\b[^>]*>` from `<script\\b[^>]*>[\\s\\S]*?<\\/script>`, and the guard's _LEX_PAYLOADS carries one payload per pattern id chosen to MATCH the pattern, not to discriminate between two candidate forms of it. Both witnesses for this axis were named by llm-security in their coord message of 2026-08-10 (`<script src=x.js>` and unclosed `<script>alert(1)`); this is the first of the two, and they offered to supply them.",
|
|
"why_not_authored_earlier": "It was declined on 2026-08-11 in a coord reply, on the ground that a fixture encoding a DISAGREEMENT is worse than an absent one: at that point the input matched both implementations and failed against commons' own published lexicon, so its expectation would have contradicted the data file it is scoped to. Lexicon 0.7.0 removed that contradiction. The stated order was 'settle the row, then the case is trivial to add', and this is that step.",
|
|
"measurement": {
|
|
"date": "2026-08-11",
|
|
"guard_commit": "0dce50f",
|
|
"guard_version": "0.5.0",
|
|
"method": "Measured through the guard's public API — scan_lexicon() and scan_active_content() imported from llm_ingestion_guard — not read off the regex. The same harness was run against the existing hybrid-xss__script-tag case in the same execution, and it reproduced that case's committed bytes (24) and sha256 exactly, which is what licenses trusting its output for the new one. Digest independently recomputed with shasum -a 256 over the file on disk: agrees.",
|
|
"guard_in_scope_result": [
|
|
"hybrid-xss:script-tag"
|
|
],
|
|
"guard_out_of_scope_result": [
|
|
"active:raw-html"
|
|
],
|
|
"llm_security_not_measured": "The llm-security side was verified at the PATTERN level only: its regex source at b1ba1fb is byte-identical to the lexicon's 0.7.0 pattern, and that pattern was compiled and tested against this input. Their runtime was NOT run over this fixture from here — this repository does not execute consumer code, and their own harness will report the verdict. Stated so that `observed_out_of_scope` naming only the guard reads as a measurement boundary rather than an oversight."
|
|
}
|
|
}
|
|
],
|
|
"payload_provenance": {
|
|
"$scope": "The 83 lexicon cases derived from _LEX_PAYLOADS. NOT all 84 lexicon-scoped cases as of 0.3.0 — the variant case hybrid-xss__script-tag--src-no-close was authored in this repository and is covered by `authored_payloads`, not by this block. The 6 active-content cases have their own provenance in `active_content_provenance` below — they come from a different structure in the same file, at a different commit, and folding them in here would let one pin stand for two measurements.",
|
|
"source_repo": "llm-ingestion-pipeline-security",
|
|
"source_file": "src/llm_ingestion_guard/coverage.py",
|
|
"source_export": "_LEX_PAYLOADS",
|
|
"source_commit": "0bf07295c2191d5061537834abf22929f7d50826",
|
|
"source_version": "0.3.4",
|
|
"$comment": "The inputs were authored by one of the two runtimes, as one payload per pattern id, and are reproduced verbatim. That asymmetry is stated rather than averaged away: what makes them usable as a cross-runtime corpus is not their origin but the measurement below, which ran them through the other runtime as well and found the same lexicon verdict on every one.",
|
|
"id_set_check": "The 83 payload keys and the 83 commons pattern ids are the same set — compared, not assumed.",
|
|
"stability_note": "llm-ingestion-pipeline-security states (coord message 2026-08-10T12:42:31Z) that _LEX_PAYLOADS and the 83 pattern ids are an internal surface on their side, with no README/CHANGELOG/docs statement promising id or payload stability - their own test suite enforces id coverage as their gate, not as a promise to this repository. Their stated position: if a payload changes upstream, this manifest's pin diverges and should be re-pinned; divergence is a re-pin signal, not a breach of a contract they never granted."
|
|
},
|
|
"measurement": {
|
|
"$scope": "The 83 lexicon cases derived from _LEX_PAYLOADS, measured 2026-08-10. The variant case added in 0.3.0 is measured separately in `authored_payloads` — it did not exist on this date, and stretching this header to cover it would misdate its measurement. The 6 active-content cases are measured in `active_content_measurement`.",
|
|
"date": "2026-08-10",
|
|
"method": "Each payload was run through both runtimes' PUBLIC entry point — not through a rebuilt regex table — and the resulting finding labels were mapped to commons pattern ids through the lexicon's own aliases block. Comparing at the entry point is deliberate: a table-level comparison produces a number that describes neither runtime.",
|
|
"runtimes": [
|
|
{
|
|
"name": "llm_security",
|
|
"repo": "ssh://git@git.fromaitochitta.com/open/llm-security.git",
|
|
"commit": "b0de0ca6d86ce697f39669d177c2c2654c280128",
|
|
"entry_point": "scanForInjection(text) — scanners/lib/injection-patterns.mjs",
|
|
"engine": "Node v25.8.2",
|
|
"covers": "normalisation, homoglyph folding, the rot13 variant and all four pattern arrays",
|
|
"measurement_limit": "This entry point is the injection scanner. Whether this runtime raises findings from other commons tables on these inputs was NOT measured, so observed_out_of_scope carries no entry for it — absence of a key means unmeasured, not measured-empty."
|
|
},
|
|
{
|
|
"name": "llm_ingestion_guard",
|
|
"repo": "llm-ingestion-pipeline-security",
|
|
"commit": "0bf07295c2191d5061537834abf22929f7d50826",
|
|
"version": "0.3.4",
|
|
"entry_point": "scan_output(text, source=Source.OUTPUT)",
|
|
"engine": "CPython 3.14.0",
|
|
"covers": "the whole output gate, which is more than the lexicon",
|
|
"measurement_limit": "Non-lexicon findings this gate raised are recorded per case in observed_out_of_scope as informative evidence, never as expectation."
|
|
}
|
|
],
|
|
"results": {
|
|
"cases": 83,
|
|
"asserted_id_present_in_both_runtimes": 83,
|
|
"lexicon_id_sets_identical_between_runtimes": 83,
|
|
"cases_with_non_lexicon_residue_in_the_guard": 7
|
|
},
|
|
"known_divergence": {
|
|
"$comment": "13 of the 83 patterns are recorded in docs/lexicon-port-divergence.md as behaviourally divergent between the two ports. That divergence is real and unresolved, and it is NOT visible here: it was measured on witness inputs — an attribute run padded past 256 characters, an interior '<', an unclosed <script> — and none of those shapes occurs in these payloads. All 13 produce identical lexicon id sets on their own case input, so their fixtures carry no marker and no caveat. A caveat would assert a doubt the measurement disproves for these inputs.",
|
|
"patterns_covered": 13,
|
|
"patterns_agreeing_on_their_case_input": 13,
|
|
"see": "docs/lexicon-port-divergence.md"
|
|
}
|
|
},
|
|
"active_content_provenance": {
|
|
"source_repo": "llm-ingestion-pipeline-security",
|
|
"source_file": "src/llm_ingestion_guard/coverage.py",
|
|
"source_structure": "the `active` group of `_build_cases()` — seven `_scan_case(...)` call sites, coverage.py:476-488",
|
|
"source_commit": "de09711",
|
|
"source_version": "0.4.0",
|
|
"extraction_method": "The payload strings were located by parsing coverage.py's AST for `_scan_case` calls whose first argument is `\"active\"`, and each payload expression was evaluated against that module's own namespace (which supplies the base64 constant one of them embeds). Retyping them here would have been the from-memory failure this repository forbids for detection data.",
|
|
"$comment": "A different structure and a different commit from `payload_provenance` above, which covers the 83 lexicon cases. Six of the seven extracted payloads became cases; the seventh is in `omitted_payloads` with its measured reason.",
|
|
"asymmetry": "These payloads were authored by the only runtime that implements the table they test, so unlike the lexicon corpus there is no second runtime whose agreement could be measured. That is a real limit on what these six cases prove, and it is stated rather than averaged away: they pin one runtime's behaviour as a contract a future implementer can be held to, which is less than the lexicon cases prove and more than nothing."
|
|
},
|
|
"active_content_measurement": {
|
|
"date": "2026-08-10",
|
|
"method": "Each payload was run through the guard's PUBLIC output gate — the same entry point the 83 lexicon cases were measured through, so the two halves of the corpus are comparable. Findings were split into in-scope and residue by MEMBERSHIP in signatures/active-content.json's published `pattern_id_space.ids`, not by the `active:` prefix (see spec/conformance-corpus.md section 4).",
|
|
"verification": "The generated fixtures were then re-read from disk by a separate checker that re-computed each digest, re-scanned the bytes, and applied `exact-within-scope` independently of the generator — a generator agreeing with itself proves nothing. 6 cases, 0 failed checks.",
|
|
"runtimes": [
|
|
{
|
|
"name": "llm_ingestion_guard",
|
|
"repo": "llm-ingestion-pipeline-security",
|
|
"commit": "de09711",
|
|
"version": "0.4.0",
|
|
"entry_point": "scan_output(text, source=Source.OUTPUT)",
|
|
"engine": "CPython 3.14.0",
|
|
"measurement_limit": "Findings outside signatures/active-content.json that this gate raised are recorded per case in observed_out_of_scope as informative evidence, never as expectation. Two of the six carry such residue, and in both it is a lexicon id."
|
|
},
|
|
{
|
|
"name": "llm_security",
|
|
"repo": "ssh://git@git.fromaitochitta.com/open/llm-security.git",
|
|
"commit": "b0de0ca6d86ce697f39669d177c2c2654c280128",
|
|
"status": "not-applicable",
|
|
"status_basis": "This runtime does not implement signatures/active-content.json, so under spec/conformance-corpus.md section 1.1 these six cases are `not-applicable` there — neither passes nor failures. It was NOT run against them; a measurement whose verdict the spec defines as inapplicable would produce a number that means nothing.",
|
|
"absence_evidence": "Measured at b0de0ca, not assumed. A case-insensitive tree-wide search for an active-content detector, class table or emitted `active:` label returns no implementation — only prose in `knowledge/` and an entropy-scanner test mentioning the markdown-image construct. `git log -S 'active_content'` and `git log -S 'active:markdown'` over `--all` return zero commits, closing the 'it was there once' reading.",
|
|
"not_a_coverage_claim": "Absent table is not absent capability: this runtime's entropy scanner reaches markdown-image URLs by a different route (host- and query-aware). What is measured absent is the table, which is all `not-applicable` asserts."
|
|
}
|
|
],
|
|
"results": {
|
|
"payloads_extracted": 7,
|
|
"cases_built": 6,
|
|
"payloads_omitted": 1,
|
|
"cases_verified_independently": 6,
|
|
"failed_checks": 0,
|
|
"cases_with_out_of_scope_residue_in_the_guard": 2
|
|
},
|
|
"guard_drift_note": "The guard's HEAD moved twice during this measurement (3c56d50 -> de09711 -> 398eb74). Measurement ran at de09711. Checked rather than hoped: 398eb74 touches only docs/PLAN-v1.md and tests/test_disposition.py, so no measured file changed under the measurement. active_content.py DID change between 0bf0729 — the commit signatures/active-content.json pins — and de09711; the change adds a scan-cap self-safety finding and touches no construct. See that file's `pattern_id_space.verified.at_commit_note`."
|
|
},
|
|
"count": 90,
|
|
"count_by_scope": {
|
|
"lexicon/injection-lexicon.json": 84,
|
|
"signatures/active-content.json": 6
|
|
},
|
|
"count_by_scope_$comment": "84 lexicon-scoped cases, of which 83 come from the guard's _LEX_PAYLOADS one-per-pattern-id (see payload_provenance) and one was authored here (see authored_payloads). The lexicon count therefore no longer equals the pattern count, and that is deliberate as of 0.3.0 — a pattern id may carry a variant case. See case_id_derivation.variant_suffix.",
|
|
"cases": [
|
|
"override__ignore-previous",
|
|
"override__forget-instructions",
|
|
"override__disregard",
|
|
"override__override-instructions",
|
|
"override__suspend-constraints",
|
|
"override__prior-constraints",
|
|
"spoofed-header__hash-system",
|
|
"spoofed-header__inst",
|
|
"spoofed-header__pipe-system",
|
|
"spoofed-tag__system-open",
|
|
"spoofed-tag__system-close",
|
|
"spoofed-header__instructions",
|
|
"identity__no-longer",
|
|
"identity__you-are-now",
|
|
"identity__new-role",
|
|
"identity__new-directive",
|
|
"identity__pretend",
|
|
"config__ignore-claudemd",
|
|
"config__override-system-prompt",
|
|
"config__bypass-safety",
|
|
"config__disable-filtering",
|
|
"normalization__prioritize-user",
|
|
"normalization__user-precedence",
|
|
"normalization__claudemd-conflict",
|
|
"normalization__skip-confirmation",
|
|
"reframing__actual-task",
|
|
"reframing__real-purpose",
|
|
"reframing__should-actually-do",
|
|
"hidden-comment__agent-directed",
|
|
"html-obfuscation__display-none",
|
|
"html-obfuscation__visibility-hidden",
|
|
"html-obfuscation__offscreen",
|
|
"html-obfuscation__zero-font",
|
|
"html-obfuscation__zero-opacity",
|
|
"html-obfuscation__zero-size-overflow",
|
|
"html-obfuscation__aria-label",
|
|
"evasion__educational",
|
|
"evasion__hypothetical",
|
|
"evasion__fictional",
|
|
"evasion__red-team",
|
|
"evasion__security-audit-sim",
|
|
"evasion__test-pretense",
|
|
"evasion__thought-experiment",
|
|
"evasion__research-purpose",
|
|
"evasion__academic-context",
|
|
"hitl-trap__approve-immediately",
|
|
"hitl-trap__no-need-review",
|
|
"hitl-trap__just-approve",
|
|
"hitl-trap__suppress-review",
|
|
"hitl-trap__brevity-skip",
|
|
"hitl-trap__too-long",
|
|
"hitl-trap__details-omitted",
|
|
"hitl-trap__scope-minimization",
|
|
"leetspeak__ignore-previous",
|
|
"leetspeak__forget-instructions",
|
|
"leetspeak__disregard",
|
|
"leetspeak__override",
|
|
"homoglyph__cyrillic-latin-mix",
|
|
"unicode__zero-width-in-word",
|
|
"indirect__instruction-to-ai",
|
|
"indirect__direct-address",
|
|
"indirect__trigger-based",
|
|
"multi-lang__french",
|
|
"multi-lang__spanish",
|
|
"multi-lang__german",
|
|
"markdown__link-ref-comment",
|
|
"data-uri__executable",
|
|
"markdown__link-anchor-injection",
|
|
"sub-agent__spawn-dangerous",
|
|
"sub-agent__delegate-bypass",
|
|
"nl-indirection__fetch-execute",
|
|
"nl-indirection__send-external",
|
|
"nl-indirection__read-dotfile",
|
|
"nl-indirection__extract-exfiltrate",
|
|
"nl-indirection__download-execute",
|
|
"hybrid-p2sql__inject-sql",
|
|
"hybrid-p2sql__sql-inject",
|
|
"hybrid-recursive__inject-output",
|
|
"hybrid-recursive__conditional-response",
|
|
"hybrid-xss__script-tag",
|
|
"hybrid-xss__script-tag--src-no-close",
|
|
"hybrid-xss__javascript-uri",
|
|
"hybrid-xss__event-handler",
|
|
"hybrid-xss__iframe-src",
|
|
"active__markdown-image",
|
|
"active__markdown-link",
|
|
"active__reference-link",
|
|
"active__autolink",
|
|
"active__raw-html",
|
|
"active__data-uri"
|
|
]
|
|
}
|