Skip to main content

How Scanara's rules are built and verified

This page is for engineers and compliance leads who want to judge how reliable Scanara's rules are. Each rule traces to one article, paragraph and point of the EU AI Act, and a ruleset release must pass six checks. The last section states what the numbers do not measure.

Measured on 9 September 2026.

How rules are built

Scanara's rule pipeline parses the text of Regulation (EU) 2024/1689 as amended and anchors every rule to its exact article, paragraph, and point. A single mapping file assigns every obligation one of three outcomes: detectable in code, checkable in a policy document, or not machine-detectable and left to a guided assessment.

The release gate ladder

The ruleset runs through six gates in series, from broad structural checks down to an exact diff against known-good output. All six gates run in Scanara's CI pipeline.

L2.5

Catalog parity

Checks that the article catalog, the obligation map, and any overlap-suppression rules stay in sync with each other.

L1/L2

Corpus structure

Structural checks across the rule corpus: article coverage, no duplicate patterns, complete metadata, valid enum values, unique rule IDs, and stub-rule limits.

L3

Per-obligation fixtures

For every code-detectable obligation, a positive fixture must trigger at least one finding and a negative fixture must trigger zero — in every supported language.

L4

KPI thresholds

17 coverage, completeness, and determinism thresholds — see the table below.

L5

Golden snapshots

An exact diff of every finding against a committed expected result, for the 27 test applications that have a golden snapshot, pinned to a specific ruleset version.

R1

Remediation gate

Confirms that a bare fixture triggers an unsatisfied finding, and that the same fixture with the recommended remediation applied is recognized as satisfied.

How Scanara evaluates documentation with OPA and Rego

Scanara's document-level checks run on Open Policy Agent (OPA). OPA evaluates technical documentation against EU AI Act obligations. This is a policy-as-code approach: declarative rules and deterministic evaluation, so the same document gives the same result every time. It runs alongside Scanara's source-code scanning. Code scanning checks what the code does. OPA checks what the documentation says.

Each documentation file goes through the same steps. First, Scanara parses it and detects its language (8 EU languages are supported). Then it normalizes the file into a structured input document: sections, headings, extracted text. OPA evaluates this structured document against a compiled Rego policy bundle.

Scanara generates these policies from a canonical mapping between EU AI Act article text and machine-checkable requirements. No policy is hand-written per repository. Every rule traces back to one specific article, paragraph, and point. Evaluation produces one finding per obligation: satisfied, missing, or partial. These findings feed into the compliance report together with the source-code findings.

The example below shows the pattern, simplified for public documentation. The production ruleset is larger and also handles several document languages and severity weighting.

package eu_ai_act.example.article_11

# Illustrative pattern only — simplified for public documentation.
# Scanara's production ruleset is larger and also handles several document
# languages and severity weighting.

default satisfied := false

# A document satisfies this (illustrative) Article 11 check when its parsed
# sections include the required topic, with non-empty content.
satisfied if {
	some section in input.document.sections
	section.topic == "risk_management_process"
	count(trim_space(section.content)) > 0
}

finding := {
	"article": "11",
	"obligation": "technical_documentation.risk_management_process",
	"status": "satisfied",
} if satisfied

finding := {
	"article": "11",
	"obligation": "technical_documentation.risk_management_process",
	"status": "missing",
	"severity": "high",
} if not satisfied

In the snapshot of 24 August 2026, automated rules cover 66 of 113 articles (about 58%). Code rules cover 43 articles and document rules cover 23, in 8 EU document languages. The other articles are handled through guided assessments and generated documentation, or bind authorities rather than operators. The counts are a dated snapshot and change with each rule-generation run. Findings from both engines feed the compliance report, and each finding traces back to an actual scan result, not a self-reported checklist.

Current measured values

MetricThresholdCurrent
Articles accounted for in the rule pipeline (119 in the Act)100%100%
Real-pattern coverage of code-eligible articles100%100%
Document/policy articles with OPA coverage100%100%
Code-detectable obligations with at least one rule100%100%
Rules carrying risk-level metadata100%100%
Rules carrying actor metadata100%100%
Rules carrying structured remediation guidance100%100%
Spread in rule count across the 12 supported languages≤ 10
Duplicate rule IDs00
Stub rules (no code pattern) per article≤ 10
L4 KPI thresholds passing17/1717/17

What these numbers do not measure

The 100% values for article coverage mean that the rule pipeline accounts for every article; they do not mean that every article is checked automatically. These metrics measure coverage, completeness, and determinism: how much of the regulation is mapped and how consistently the pipeline behaves across languages and releases. There is no precision, recall, or false-positive-rate KPI, because that requires a human-labelled ground-truth corpus that Scanara does not have. The structural evidence against false positives is this: every per-obligation negative fixture must produce zero findings, and a dedicated minimal-risk test application, with every high-risk, general-purpose AI and limited-risk rule suppressed, must also produce zero findings.

Scanara detects the code-level and document-level gaps its rules cover. It can miss custom, non-standard or obfuscated code, and a passing scan does not mean an organization is compliant. Classification and legal interpretation stay with you and your counsel.

Related pages