KGCS Documentation

⚙ Rule Engine Specification v1.0


1. Purpose of the Rule Engine

The Rule Engine provides deterministic computation of derived relationships that:

It ensures that:


2. Hard Boundary

The Rule Engine:

If output cannot be reproduced from Core + Asset + rules → it is invalid.


3. Rule Categories

The Rule Engine operates in three deterministic phases:


3.1 Configuration Resolution

3.1.1 Objective

Determine whether a PlatformConfiguration matches a specific Platform.

3.1.2 Inputs

3.1.3 Output

PlatformConfiguration ── matches ──▶ Platform

3.1.4 Rule Type

Deterministic boolean evaluation.


3.2 Asset Exposure Derivation

3.2.1 Objective

Determine whether an Asset is affected by a Vulnerability.

3.2.2 Authoritative Core Relation

PlatformConfiguration ── affected_by ──▶ Vulnerability

3.2.3 Derived Rule

FOR each Asset A:
    FOR each AssetConfiguration AC of A:
        IF AC.maps_to = PC
        AND PC.affected_by = V
        THEN create derived edge:
            A ── affected_by ──▶ V

3.2.4 Characteristics


3.3 Causal Propagation

3.3.1 Objective

Propagate exposure along the Core causal backbone.

3.3.2 Core Backbone

Vulnerability ── caused_by ──▶ Weakness
Weakness ── exploited_by ──▶ AttackPattern
AttackPattern ── implemented_as ──▶ Technique

3.3.3 Derived Weakness Exposure

IF A affected_by V
AND V caused_by W
THEN A exposed_to W

3.3.4 Derived Attack Surface

IF A exposed_to W
AND W exploited_by AP
AND AP implemented_as T
THEN A exploitable_by T

3.3.5 Defensive Mapping

IF A exploitable_by T
AND T mitigated_by D
THEN A mitigable_by D

IF A exploitable_by T
AND T detected_by DA
THEN A detectable_by DA

4. Derived Relationship Registry

All derived relationships must be registered and classified.

Derived Edge Type Source Recomputable
Asset → Vulnerability Exposure Config + Core Yes
Asset → Weakness Causal Core Yes
Asset → Technique Causal Core Yes
Asset → DefensiveTechnique Propagated Core Yes
Asset → DetectionAnalytic Propagated Core Yes

No derived edge may exist without explicit rule definition.


5. Rule Execution Model

The engine must support:


5.1 Batch Mode

Triggered when:

Recomputes full derived graph.


5.2 Incremental Mode

Triggered when:

Recomputes only impacted paths.


6. Materialization Policy

Derived edges may be:

If materialized:


7. Provenance Model

Each derived edge must store:

Example metadata:

{
  "derived": true,
  "rule": "R-Asset-Vulnerability-1",
  "core_version": "1.0",
  "computed_at": "2026-02-21T10:32:00Z"
}

8. Invariants

  1. Derived edges must never contradict authoritative edges.
  2. Derived edges must be reproducible.
  3. Derived edges must never introduce new semantic meaning.
  4. No derived edge may bypass PlatformConfiguration.
  5. No derived edge may introduce probability or likelihood.
  6. Derived graph must remain acyclic along causal backbone.

9. What the Rule Engine Explicitly Does NOT Do

Those belong to separate extensions.


10. Canonical End-to-End Computation Example

Given:

Execution:

1. AC maps_to PC
2. PC affected_by V
3. V caused_by W
4. W exploited_by AP
5. AP implemented_as T

Derived output:

A affected_by V
A exposed_to W
A exploitable_by T

Optionally:

A mitigable_by DefensiveTechnique
A detectable_by DetectionAnalytic

All deterministic. All reproducible.


11. Separation of Responsibility

Layer Responsibility
Core Ontology Authoritative semantics
Asset Extension Organizational context
Rule Engine Deterministic derivation
Graph Projection Performance optimization
Risk Extension Scoring and prioritization
Incident Extension Temporal modeling

12. Guarantee

The Rule Engine guarantees: