Surface rulesets/secrets read failures as ERROR, not empty - #327
Merged
Conversation
Contributor
There was a problem hiding this comment.
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}/rulesetsfailures as "no rulesets" by removingok404=Trueand relying on the API's legitimate empty-list response for the none-case. - Stop treating
GET /repos/{owner}/{repo}/{actions|dependabot}/secretsfailures as "no secrets" by removingok404=Trueand relying on the API's legitimate{"secrets": []}response for the none-case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copilot findings on the #326 promotion, fixed forward: the rulesets and secrets endpoints return empty collections for the legitimate none-case, so
ok404there 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