Repository navigation
fix: distinguish missing provider cli audit reason - #12468
Conversation
|
Intent: Record an absent provider CLI as |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 07ff19b |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify the linked issue #12452 actually reports this mislabel — the description's only other provenance is its own test claim. What this change shipsInventory (4 items) — 4 justifiedIntent: make the Security Event Log say "CLI not installed" instead of "untrusted executable" when gh/glab is simply absent — a FIX.
[FIRST-PRINCIPLES-REVIEWED] 07ff19b |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
492b94c to
8c798bc
Compare
Carry a credential-free resolver reason into the provider CLI audit so an absent executable is not reported as a trust rejection.
8c798bc to
07ff19b
Compare
Carry a credential-free resolver reason into the provider CLI audit so an absent executable is not reported as a trust rejection.
Problem / Motivation
When
ghorglabis not installed, the dashboard records the provider CLI denial asexecutable_untrusted. Missing software is not a trust rejection.Why it matters
The wrong reason makes the Security Event Log report a trust failure that did not happen. Repeated sidebar refreshes can then obscure real executable provenance denials.
What changed (motivation → approach → change)
source_providers.pynow carries a fixed, credential-free reason onSourceProviderError. A search that finds no candidate usesexecutable_not_found; a rejected override or found candidate keepsexecutable_untrusted. The provider audit forwards that reason without changing setup guidance, executable selection, or trust validation.test_source_providers.pycovers all three audit outcomes.security.mddocuments the two resolution reasons.Security posture
This changes audit fidelity only. Executable provenance checks, deny decisions, sandboxing, and provider launch behavior are unchanged. The audit reason remains a fixed credential-free literal; it never includes an exception message or path.
Backwards compatibility
Compatible: existing provider behavior and public interfaces are unchanged; only the SEL reason for an absent provider CLI becomes accurate.
Tests
The regression test first failed only for the missing-executable case while the two trust-rejection cases stayed green. After the fix, all three cases pass. The diff-scoped gate passed 7,986 backend tests and 8,224 frontend cross-surface tests. Black, subprocess encoding, isort, and flake8 pass. The current whole-tree mypy red is inherited from
main.Manual verification
N/A — the observable is the deterministic audit call, covered directly without invoking a real provider CLI.
Related Issues
Fixes #12452
Pattern harvest
Rule candidate: review-prompt
Pattern: carry a stable decision-point reason into audit code instead of assigning one catch-all label to distinct failures.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)