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.

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.
- 01
Reproduced the zero-required-stage chain with an optional non-advisory ALLOW result.
- 02
Traced the decision path to empty-set containment and identified vacuous truth as the source.
- 03
Added an explicit guard that denies the chain before general completion logic executes.
- 04
Verified that resolution, request state, and execution authorization all remain denied.
- 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.