← Selected work
Microsoft open sourceIndependent contribution · PR #3448
Merged upstreamAI governance · authorization correctness

Fail-closed
by design.

Correcting a subtle empty-set approval condition in Microsoft's Agent Governance Toolkit with an explicit security invariant and end-to-end regression coverage.

Fail-closed by design: Ribbsaeter Systems technical case study for merged Microsoft pull request 3448

Independent open-source contribution · Microsoft PR #3448

26

tests passed

+57 / −3

focused diff

2

files changed

#3448

merged PR

01 · The problem

Mathematically valid.
Operationally unsafe.

An approval chain could be configured with zero required stages. The evaluator used set containment to decide whether every required stage had completed.

Because the empty set is a subset of every set, the condition evaluated as satisfied. An optional, non-advisory ALLOW decision could therefore influence authorization even though no meaningful required approval stage existed.

In a governance system, incomplete policy configuration should never become authorization.

02 · Failure mode

From vacuous truth to an explicit invariant

Before · implicit set logic

required_stages = ∅
∅ ⊆ completed_stages  →  true

After · explicit guard

required_stages.length == 0
→ deny resolution and execution

03 · The correction

Deny ambiguous policy state.

  1. 01

    Reproduced the zero-required-stage chain with an optional non-advisory ALLOW result.

  2. 02

    Traced the decision path to empty-set containment and identified vacuous truth as the source.

  3. 03

    Added an explicit guard that denies the chain before general completion logic executes.

  4. 04

    Verified that resolution, request state, and execution authorization all remain denied.

  5. 05

    Kept the upstream patch focused for maintainable review and cross-implementation consistency.

04 · Public evidence

Verified beyond the local return value

Upstream status

Merged by Microsoft maintainer

Human review

Approved

Focused tests

26 passed

Patch scope

2 files · +57 / −3

Invariant

Zero required stages → deny

Verified path

Resolution · request · execution

Engineering principle

Critical invariants should be explicit—not accidental consequences of general-purpose logic.

Independent open-source contribution by Ribbsaeter Systems. No partnership or employment affiliation is implied.