AgentConform — Open Agent Security Verification

Mathematical Framework · Source: research/formal-model.md

Formal Model & Remediation Invariants

This page preserves the original recovered mathematical notation alongside explicitly labeled proposed operational refinements. Equations are rendered at build time with KaTeX (HTML + MathML).

1. Original Recovered Permission Framework

Let CC be the configuration, aa the requested action, vv the agent version, and ee the execution environment. The normalized effective permission function maps each tuple into a four-valued domain:

Recovered original notation
P(C,a,v,e)∈{allow,deny,ask,unknown}P(C, a, v, e) \in \{\text{allow}, \text{deny}, \text{ask}, \text{unknown}\}
Normalized effective permission outcome for configuration C, action a, version v, and environment e.

A configuration repair or transformation TT yields a modified configuration C′C':

Recovered original notation
C′=T(C)C' = T(C)

For an independently justified property intended to remain unchanged, the preservation invariant requires matching known outcomes:

Recovered original notation
P(C,a,v,e)=P(T(C),a,v,e)P(C, a, v, e) = P(T(C), a, v, e)
Applies only to independently justified properties intended to remain unchanged, with known valid observations. Equality of unknown values is NOT evidence of preservation.

In the recovered security remediation correctness formulation, let GG denote the intended security objective and II the set of declared invariants to preserve:

Recovered original notation
G(C′)=trueand∀i∈I,i(C′)=i(C)G(C') = \text{true} \qquad \text{and} \qquad \forall i \in I,\quad i(C') = i(C)
A remediation must achieve its intended objective while preserving all declared unrelated invariants.

2. Proposed Operational Refinement (Known vs. Unknown)

To explicitly distinguish equality of known permission outcomes from equality of unknown observations, write p0(a)=P(C,a,v,e)p_0(a) = P(C, a, v, e) and p1(a)=P(T(C),a,v,e)p_1(a) = P(T(C), a, v, e), and define the known-outcome indicator:

Proposed operational refinement (not recovered verbatim)
K(a)=1 ⁣[p0(a)≠unknown  ∧  p1(a)≠unknown]K(a) = \mathbf{1}\!\left[p_0(a) \neq \text{unknown} \;\land\; p_1(a) \neq \text{unknown}\right]
Proposed operational refinement
DS={a∈S:K(a)=1∧p0(a)≠p1(a)},US={a∈S:K(a)=0}D_S = \{a \in S : K(a) = 1 \land p_0(a) \neq p_1(a)\}, \qquad U_S = \{a \in S : K(a) = 0\}
For a preservation set S, preservation is supported only when both violation set D_S and unknown set U_S are empty (and baseline/target observations are valid).

3. Evidence-Aware Verdict Precedence

Let GG be the finite set of required observation/assertion obligations for a case, with s(g)∈{pass,fail,unknown}s(g) \in \{\text{pass}, \text{fail}, \text{unknown}\}:

Formal restatement of current replay rule
V(G)={failif ∃g∈G:s(g)=fail,inconclusiveif ∄g∈G:s(g)=fail∧∃g∈G:s(g)=unknown,passif G≠∅∧∀g∈G:s(g)=pass.V(G) = \begin{cases} \text{fail} & \text{if } \exists g \in G : s(g) = \text{fail}, \\ \text{inconclusive} & \text{if } \nexists g \in G : s(g) = \text{fail} \land \exists g \in G : s(g) = \text{unknown}, \\ \text{pass} & \text{if } G \neq \varnothing \land \forall g \in G : s(g) = \text{pass}. \end{cases}
Empty or invalid obligation specifications return inconclusive rather than a vacuous pass. Confirmed violations take precedence over missing observations.

Central Measurement Principle

Absence of an attempted prohibited action is not proof of denial. A run where an action was denied and unattempted produces the same empty trace as a run where the action was allowed and simply never attempted. Controlled native probes and positive controls are required to resolve this ambiguity.

4. Original Synthetic Worked Example

Synthetic illustration · Not an executed experiment

In the recovered synthetic example, a proposed repair restores the intended approval requirement, but inadvertently weakens an unrelated private directory denial:

Property Before (C) After (C′) Evaluation
Approval required (intended objective) No Yes Objective met
Private directory access (preserved invariant) Denied Allowed Restriction lost
Network access (preserved invariant) Denied Denied Preserved

Result: Although the intended repair succeeds, an unrelated restriction is lost, so overall remediation fails. Try modifying outcomes interactively in the Mathematical Invariant Explorer.

5. Historical Finding Classes

Finding classification is distinct from the three-valued test verdict (pass / fail / inconclusive). Documented precedence is not inherently a vulnerability.

Finding Class Interpretation
Conformant behaviorDocumented security property preserved
Expected changeTransformation intentionally changes the property
Documented incompatibilityEstablished compatibility rule explains difference
Undocumented divergenceBehavior differs without sufficiently clear documentation
Confirmed regressionPreviously supported security property unintentionally lost
Remediation defectAdvice introduces unintended policy change
InconclusiveInsufficient evidence to establish verdict