Skip to content

fix: distinguish missing provider cli audit reason - #12468

Merged
iamwhatever merged 1 commit into
mainfrom
fix/provider-cli-audit-not-found-reason
Sep 22, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/provider-cli-audit-not-found-reason

Conversation

@pepmach

@pepmach pepmach commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

When gh or glab is not installed, the dashboard records the provider CLI denial as executable_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.py now carries a fixed, credential-free reason on SourceProviderError. A search that finds no candidate uses executable_not_found; a rejected override or found candidate keeps executable_untrusted. The provider audit forwards that reason without changing setup guidance, executable selection, or trust validation.

test_source_providers.py covers all three audit outcomes. security.md documents 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@pepmach
pepmach requested review from a team and cixuuz September 21, 2026 06:25
@pepmach

pepmach commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Intent: Record an absent provider CLI as executable_not_found while keeping provenance rejections as executable_untrusted.
Not a goal: Change provider CLI resolution, trust validation, sandboxing, or launch behavior.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 07ff19b56ecd32de129b4db599efdaa0b67af39e — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Nothing to check.

[DESIGN-REVIEWED] 07ff19b

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 07ff19b56ecd32de129b4db599efdaa0b67af39e — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 07ff19b

Verdict parsed from the review's SHA-scoped output markers for commit 07ff19b56ecd32de129b4db599efdaa0b67af39e.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 07ff19b56ecd32de129b4db599efdaa0b67af39e: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 07ff19b56ecd32de129b4db599efdaa0b67af39e — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 ships

Inventory (4 items) — 4 justified

Intent: make the Security Event Log say "CLI not installed" instead of "untrusted executable" when gh/glab is simply absent — a FIX.

  1. SEL records executable_not_found for an absent provider CLI, executable_untrusted only for real provenance rejections — justified
  2. SourceProviderError gains a reason attribute (one counted consumer: the audit call in _run_provider) — justified
  3. security.md documents the two resolution reasons in the same commit — justified
  4. Regression test covering all three audit outcomes — justified

[FIRST-PRINCIPLES-REVIEWED] 07ff19b

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 07ff19b56ecd32de129b4db599efdaa0b67af39e and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 07ff19b

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 07ff19b56ecd32de129b4db599efdaa0b67af39e: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Sep 21, 2026
@pepmach
pepmach force-pushed the fix/provider-cli-audit-not-found-reason branch from 492b94c to 8c798bc Compare September 21, 2026 06:57
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 21, 2026
Carry a credential-free resolver reason into the provider CLI audit so an absent executable is not reported as a trust rejection.
@pepmach
pepmach force-pushed the fix/provider-cli-audit-not-found-reason branch from 8c798bc to 07ff19b Compare September 22, 2026 16:00
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 22, 2026
@iamwhatever
iamwhatever enabled auto-merge (squash) September 22, 2026 17:22
@iamwhatever
iamwhatever merged commit fb0f7be into main Sep 22, 2026
93 checks passed
@iamwhatever
iamwhatever deleted the fix/provider-cli-audit-not-found-reason branch September 22, 2026 17:23
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 22, 2026
wknight1 pushed a commit to wknight1/KiroCrew that referenced this pull request Oct 5, 2026
Carry a credential-free resolver reason into the provider CLI audit so an absent executable is not reported as a trust rejection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provider CLI audit records executable_untrusted when gh is not installed at all

2 participants