Formal model results
Formal model results
Generated by tools/formal_results.py from the Lean executables in formal/; the Lean CI
job regenerates this file and fails when it is stale. The model is a reference, not an
engine: a mismatch is a defect to fix before merge, never a known gap.
Corpus and profiles
| Run | Input | Result |
|---|---|---|
seclang-check | tests/unit/transformations | 39 files: 372 cases passed, 0 failed |
seclang-check | tests/unit/operators | 25 files: 3907 cases passed, 0 failed, 2 skipped (regex outside the Core subset, ADR-0018); not formalized: detectSQLi.json, detectXSS.json |
seclang-parse | tests/engine | 132 profiles, 0 mismatches |
seclang-eval | tests/engine | 211 stages, 0 mismatches, 10 unsupported profiles |
seclang-parse | OWASP CRS (crs_setup_version 4252) | 29 profiles, 0 mismatches |
seclang-eval | generated requests, what Coraza did (adapters/coraza/cmd/differential, seed 1, 30 per profile) | 2670 stages, 0 mismatches |
seclang-eval | OWASP CRS with generated requests, what Coraza did (tools/crs_profile.py, seed 1) | 20 stages, 0 mismatches |
Profiles outside the model
Reported as unsupported with the reason; the list is the model’s boundary, not a gap.
| Profile | Reason |
|---|---|
tests/engine/actions/ctl-auditlogparts-absolute.yaml | log assertions |
tests/engine/actions/sanitize.yaml | log assertions |
tests/engine/body/xml-no-xxe.yaml | variable XML |
tests/engine/logging/audit-noauditlog-listed.yaml | log assertions |
tests/engine/logging/audit-record-listing.yaml | log assertions |
tests/engine/logging/error-log-fields.yaml | log assertions |
tests/engine/logging/logdata-every-match.yaml | log assertions |
tests/engine/logging/logdata.yaml | log assertions |
tests/engine/operators/detect-sqli-xss.yaml | operator @detectSQLi |
tests/engine/variables/xml.yaml | variable XML |
Theorems
Proved over the model: formal/SecLang/Regex.lean (ADR-0027) and
formal/SecLang/Semantics.lean (processing model, ADR-0016, ADR-0017, ADR-0028, ADR-0029, body limits).
| Theorem | Statement |
|---|---|
findRow_case | ADR-0002: a row lookup sees a name only through its lower-case form. |
findNamed_case | ADR-0002: so does a lookup through the ADR-0004 aliases. |
names_case_insensitive | ADR-0002: directive, operator, action, transformation, variable and ctl: names are looked up ignoring case. |
dot_matches_newline | ADR-0027: under the default flags . matches a newline like any other byte. |
eol_only_at_end | ADR-0027: without (?m), $ matches at the end of the subject only, never before an inner newline (the v2 DOLLAR_ENDONLY reading the model follows). |
phase_default | ADR-0017: a rule without phase runs in phase 2. |
phase_not_inherited | ADR-0017: the phase never comes from the default actions in force. |
skipAfter_ends_with_phase | ADR-0016, by construction: every phase starts with no pending skipAfter and no skip count (this restates step; the flow-control state is not part of Tx). |
skipAfter_missing | ADR-0016: a pending label that no later marker carries leaves the transaction untouched for the rest of its phase (chains never carry a label, ADR-0028). |
later_phase_unaffected | ADR-0016, the consequence the ADR states: after a phase whose skipAfter label was never found, any later phase runs exactly as if that skipAfter had not fired. |
interrupted_phase_quiet | An interruption in an earlier phase: phases 2–4 evaluate nothing. |
body_limit_reject_quiet | A body limit with Reject (04#secrequestbodylimitaction): when the boundary hook sets the interruption at a phase other than 5, no rule of that phase is evaluated. |
skipAfter_ignores_chain | ADR-0028: while a skipAfter label is pending, a chain is passed over whatever its id; only a marker can end the skip. |
removed_by_tag_exact | ADR-0029: a ctl:ruleRemoveByTag parameter removes a chain exactly when it equals one of the chain’s tags (no substring or regular-expression match). |
off_is_final | ADR-0034: once the mode is Off, no further rule of the phase runs (and phaseRuns keeps every later phase from starting). |
key_selector_ignores_case | ADR-0008: a key selector picks a member exactly when the keys agree ignoring case. |
regex_selector_ignores_case | ADR-0008: a regular-expression selector always reaches the oracle case-insensitive. |
runItems_stopped | A stopped phase (ended, or the engine off) runs nothing more. |
other_phase_passed | A chain of another phase is passed over: it evaluates nothing and leaves the flow-control state as it was. |
phase_strict | ADR-0009: a phase runs exactly as if the configuration held only its own rules and the markers; no rule of another phase is evaluated early or late. |
negated_per_value | ADR-0030: a negated operator matches when some evaluation of some selected value fails it. |
plain_per_value | ADR-0030: a plain operator matches when some evaluation of some selected value passes it. |
negation_not_complement | ADR-0030: negation is per value, not the complement of the plain match: with one value that passes and one that fails, @op and !@op both match. |
negation_per_stage | ADR-0030 with multiMatch (08#multimatch): negation is per evaluation, so one value that fails the operator at one stage and passes it at another matches both @op and !@op. |
no_value_no_match | ADR-0030: with no value selected neither form matches. |
logging_phase_runs | Phase 5 runs whenever the engine is not off at its boundary, interrupted or not. |
unknown_directive_error | ADR-0005: a line whose directive name is not found (unknown, or Engine-specific) is a configuration error; it is never skipped. |
rule_without_id_error | ADR-0015: a rule that starts a chain without an id value is a configuration error. |
forM_check_ok | A check run over a list of entries passes exactly when every entry passes. |
ipMatch_all_entries | ADR-0024: an @ipMatch parameter is accepted exactly when every entry is a valid address with an optional in-range prefix; one bad entry rejects the configuration. |
isWs_bytes | ADR-0026: the whitespace of compressWhitespace and removeWhitespace is exactly the C isspace bytes (\t, \n, \v, \f, \r, space) plus 0xA0; no other byte, such as 0x85 or 0x1C, counts. Checked over all 256 byte values. |
Compile-time checks
#guard assertions evaluated by every lake build.