Skip to content

Surface rulesets/secrets read failures as ERROR, not empty - #327

Merged
ptr727 merged 1 commit into
developfrom
audit-404-semantics
Jul 16, 2026
Merged

Surface rulesets/secrets read failures as ERROR, not empty#327
ptr727 merged 1 commit into
developfrom
audit-404-semantics

Conversation

@ptr727

Copy link
Copy Markdown
Owner

Copilot findings on the #326 promotion, fixed forward: the rulesets and secrets endpoints return empty collections for the legitimate none-case, so ok404 there converted access failures into false missing-ruleset/missing-secret DEFECTs. A 404 now raises and becomes the repo's per-repo ERROR finding.

🤖 Generated with Claude Code

)
Both endpoints return empty collections for the legitimate none-case, so a
404 there means the call failed and must become the repo's ERROR finding
instead of cascading into false missing-ruleset/missing-secret DEFECTs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings July 16, 2026 16:06

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the live fleet audit to distinguish true "no data" cases from GitHub API access/route failures by ensuring rulesets and secret-store listing failures surface as per-repo ERROR findings instead of being interpreted as empty collections (which previously cascaded into incorrect missing-ruleset/missing-secret DEFECT findings).

Changes:

  • Stop treating GET /repos/{owner}/{repo}/rulesets failures as "no rulesets" by removing ok404=True and relying on the API's legitimate empty-list response for the none-case.
  • Stop treating GET /repos/{owner}/{repo}/{actions|dependabot}/secrets failures as "no secrets" by removing ok404=True and relying on the API's legitimate {"secrets": []} response for the none-case.

@ptr727
ptr727 merged commit 1ba7c39 into developJul 16, 2026
7 checks passed
@ptr727
ptr727 deleted the audit-404-semantics branch July 16, 2026 16:08
Sign up for freeto 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.

2 participants

@ptr727