Skip to content
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

RunInputResult
seclang-checktests/unit/transformations39 files: 372 cases passed, 0 failed
seclang-checktests/unit/operators25 files: 3907 cases passed, 0 failed, 2 skipped (regex outside the Core subset, ADR-0018); not formalized: detectSQLi.json, detectXSS.json
seclang-parsetests/engine132 profiles, 0 mismatches
seclang-evaltests/engine211 stages, 0 mismatches, 10 unsupported profiles
seclang-parseOWASP CRS (crs_setup_version 4252)29 profiles, 0 mismatches
seclang-evalgenerated requests, what Coraza did (adapters/coraza/cmd/differential, seed 1, 30 per profile)2670 stages, 0 mismatches
seclang-evalOWASP 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.

ProfileReason
tests/engine/actions/ctl-auditlogparts-absolute.yamllog assertions
tests/engine/actions/sanitize.yamllog assertions
tests/engine/body/xml-no-xxe.yamlvariable XML
tests/engine/logging/audit-noauditlog-listed.yamllog assertions
tests/engine/logging/audit-record-listing.yamllog assertions
tests/engine/logging/error-log-fields.yamllog assertions
tests/engine/logging/logdata-every-match.yamllog assertions
tests/engine/logging/logdata.yamllog assertions
tests/engine/operators/detect-sqli-xss.yamloperator @detectSQLi
tests/engine/variables/xml.yamlvariable 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).

TheoremStatement
findRow_caseADR-0002: a row lookup sees a name only through its lower-case form.
findNamed_caseADR-0002: so does a lookup through the ADR-0004 aliases.
names_case_insensitiveADR-0002: directive, operator, action, transformation, variable and ctl: names are looked up ignoring case.
dot_matches_newlineADR-0027: under the default flags . matches a newline like any other byte.
eol_only_at_endADR-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_defaultADR-0017: a rule without phase runs in phase 2.
phase_not_inheritedADR-0017: the phase never comes from the default actions in force.
skipAfter_ends_with_phaseADR-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_missingADR-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_unaffectedADR-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_quietAn interruption in an earlier phase: phases 2–4 evaluate nothing.
body_limit_reject_quietA 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_chainADR-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_exactADR-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_finalADR-0034: once the mode is Off, no further rule of the phase runs (and phaseRuns keeps every later phase from starting).
key_selector_ignores_caseADR-0008: a key selector picks a member exactly when the keys agree ignoring case.
regex_selector_ignores_caseADR-0008: a regular-expression selector always reaches the oracle case-insensitive.
runItems_stoppedA stopped phase (ended, or the engine off) runs nothing more.
other_phase_passedA chain of another phase is passed over: it evaluates nothing and leaves the flow-control state as it was.
phase_strictADR-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_valueADR-0030: a negated operator matches when some evaluation of some selected value fails it.
plain_per_valueADR-0030: a plain operator matches when some evaluation of some selected value passes it.
negation_not_complementADR-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_stageADR-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_matchADR-0030: with no value selected neither form matches.
logging_phase_runsPhase 5 runs whenever the engine is not off at its boundary, interrupted or not.
unknown_directive_errorADR-0005: a line whose directive name is not found (unknown, or Engine-specific) is a configuration error; it is never skipped.
rule_without_id_errorADR-0015: a rule that starts a chain without an id value is a configuration error.
forM_check_okA check run over a list of entries passes exactly when every entry passes.
ipMatch_all_entriesADR-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_bytesADR-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.

ModuleChecks
formal/SecLang/Digest.lean6
formal/SecLang/Names.lean19
formal/SecLang/Operators.lean30
formal/SecLang/Regex.lean41
formal/SecLang/Request.lean51
formal/SecLang/Semantics.lean49
formal/SecLang/Syntax.lean81
formal/SecLang/Transformations.lean81
Total358