Governance sample executes on any unrecognised verdict (fail-open)
Fail-open in a governance sample: executes on any unrecognised verdict
In the governance sample, the action executes on any verdict string the code does not explicitly recognise. "deny", "DENY", an empty string and None all fall through to the execute branch, because refusal requires an exact match to a single literal while permission is the default path.
Reproduction of the branch structure, offline (the exact file and branch are cited in the case): https://github.com/arian-gogani/failopen (python3 run.py autogen-verdict).
The safe form is to default to blocking and require an explicit allow token. For context, this is one instance of a fail-open enforcement pattern I have been measuring across agent tooling: 15 confirmed across 36 recent enforcement projects, zero across 1.1M lines of mature reviewed code (details in the failopen repo). I contributed to the governance vocabulary and toolkit work earlier, so happy to send a PR here if it is welcome.
+1, and the safe form you suggest is right. One small addition for the PR: parse the verdict into an enum at the boundary, map anything unknown to deny, and add a test that "deny", "DENY", "" and None all block. Then a later refactor can't reopen it.
Your failopen corpus is useful. In agent-audit-kit, we have rules for the neighbouring shapes, auth checks that return allow on an empty secret (AAK-MCP-NOAUTH-DEFAULT), and empty allowlists treated as allow-all (AAK-MCP-012), but not this verdict-parsing one. Would you be ok if I turn your cases into a static rule, with credit to the repo?
Fifteen of thirty-six enforcement projects failing open matches what we saw building our own gate: the execute branch is the path of least resistance in every hand-rolled verdict parser, and a "DENY" with different casing quietly joins the allow path. The fix that survives later refactors is to not let the verdict parser be the only fence — Operator Lite sits below whatever governance layer exists, at the tool/subprocess boundary, with a deny-by-default posture on unknown effects plus a shadow mode that receipts every call (including the unrecognized-verdict ones) into a hash-chained log before anything executes. In this sample's terms: even when the verdict string falls through to execute, the effect still has to cross a deterministic gate that has never heard of verdict strings, so the fail-open bug degrades from "arbitrary execution" to "policy layer bypassed but effects still fenced." Ports: github.com/samvallad33/vestige/tree/main/operator-lite/ports. (Disclosure: I built it — free and open.)
Correction to my opening report: I checked two pinned revisions of PR #7960 today. The initial revision (0cd67042) executed for six unknown verdicts: denied, DENY, block, error, "", and None. The contributor hardened that same PR in ec6cf48c on September 14, before I opened this issue. All six now block, and the hardened revision validates the action hash too. The sample is still in an open PR, not in AutoGen main. I should have checked the latest PR head before filing.
I also got one example wrong in the issue body: exact "deny" blocked even in the initial revision. The claim that 15 of 36 projects currently have this defect is withdrawn; the audit mixed revisions and is not a current prevalence estimate. I moved this case out of the active list and published the old-versus-new comparison and runnable source-pinned check: https://github.com/arian-gogani/failopen/tree/main/historical/autogen-verdict
@sattyamjjain, yes, the repository is MIT licensed, so you may use the historical case with the required license notice and attribution. Please label it as a regression pattern, not an unresolved AutoGen vulnerability. A static rule should catch an untrusted verdict flowing through exact-string checks into an execution fallthrough. The current PR head is a useful negative test: it must not trigger on the explicit non-permit branch.
@arian-gogani Your October 1 correction is useful: the initial PR revision failed open for unknown verdicts, while ec6cf48c blocks them and validates the action hash. I would treat this as a historical regression case, as you requested.
I build Prudenze at Hyperwise. Revera is our reproduction and verification entry point. I would like to try one private, source-pinned comparison that checks both verdict handling and whether any action actually executes, with your attribution preserved.
Would you be open to trying that one private Revera reproduction?
Indu
@sattyamjjain Yes, please turn the fail-open cases into a static rule and credit the Nobulex corpus. The invariant I would encode is that unknown verdicts map to deny at the parsing boundary, with tests for "deny", "DENY", an empty value, and None.
@bhooshanvarma Yes, I am open to one private, source-pinned Revera comparison with attribution preserved. Please include both the verdict result and whether any action executes, comparing the initial revision 0cd67042 with the hardened revision ec6cf48c. Let me know the smallest input format Revera needs.
Thanks, Arian. The smallest handoff would be a link to the pinned runnable case, its run command and the expected outcome for each verdict. Your existing harness appears to cover those, so please hold off preparing any new format while we confirm that internally. The comparison would cover 0cd67042 versus ec6cf48c, reporting the verdict and execution outcome separately. Since the samples return an execution flag without performing an export, would a clearly labelled harmless execution marker work for the observable-action check? We’d keep the comparison private and preserve your attribution and MIT notice. We’d share the test results.
Yes, a clearly labelled harmless execution marker is the right shape, with one important limit: it must be emitted only after the action actually executes. Its presence can show execution reached that point. Its absence proves non-execution only if the harness guarantees the marker is durably written on every executed path; otherwise a crash or write failure makes the result indeterminate.
The control should be an explicitly recognised deny verdict that leaves no marker. Compare that with each unknown verdict, and report the verdict separately from the marker result. That will show whether the marker distinguishes refusal from execution rather than merely showing that the code path was reached.
For 0cd67042 versus ec6cf48c, the existing pinned harness already covers the six values: denied, DENY, block, error, empty string, and None. The initial revision executes for all six; the hardened revision blocks all six and validates the action hash. I will hold off on preparing a new format while you confirm internally. The existing harness is at https://github.com/arian-gogani/failopen.
Thanks, Arian. That clarifies the marker conditions. For the one private, source-pinned Revera comparison, we’ll keep verdict and marker results separate, include the recognized deny control, and treat crash or marker-write failures as indeterminate. Your existing harness is enough, so no new format is needed. We’ll preserve your attribution and MIT notice.
Arian, we completed the private comparison using your pinned verifier at a17a6192 against 0cd6704 and ec6cf48, with attribution preserved. Across 26 cases, the six unknown verdicts reached a harmless synthetic marker write in the initial revision and were blocked in the hardened revision. Exact lowercase “deny” blocked in both. Allow and auto-approved approval reached the marker; pending approval did not. We recorded verdict and marker observations separately. Crash, marker-write and observer failures remained indeterminate rather than being counted as proof of non-execution. This was a bounded test of the extracted dispatch functions with a stubbed checkpoint, not a full AutoGen run or a customer export.
Thank you for running it and for keeping verdict and marker separate, that is the part most reproductions skip. Your result matches what I had: the unknown verdicts reach the marker in 0cd6704 and block in ec6cf48, exact “deny” blocks in both. Treating crash and marker-write failures as indeterminate rather than as proof of non-execution is the right call and I am glad you drew that line. Nothing further needed from my side; the attribution and MIT notice are appreciated.