-
Notifications
You must be signed in to change notification settings - Fork 578
🐛 Skip tag-only rulesets during Branch-Protection #4699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
makes sense, I made some updates to make it more future proof for when those features land |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4699 +/- ##
==========================================
+ Coverage 66.80% 68.29% +1.49%
==========================================
Files 230 249 +19
Lines 16602 18898 +2296
==========================================
+ Hits 11091 12907 +1816
- Misses 4808 5131 +323
- Partials 703 860 +157 🚀 New features to boost your workflow:
|
|
/scdiff generate Branch-Protection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but you'll need to fix DCO https://github.com/ossf/scorecard/pull/4699/checks?check_run_id=45863683831
…rulesets Signed-off-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Signed-off-by: Trask Stalnaker <trask.stalnaker@gmail.com>
This reverts commit df8855a. Signed-off-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Problem
Scorecard was incorrectly applying repository rulesets that target tags to branch protection analysis. This caused false positive warnings about admin enforcement when a repository had:
The issue occurred because the
repoRuleSetstruct was missing theTargetfield from the GraphQL query, causing all rulesets to be treated as if they applied to branches.Solution
Targetfield to therepoRuleSetstruct to capture the ruleset target from GitHub's GraphQL APIrulesMatchingBranchfunction to filter out rulesets whereTarget != "branch"targetfield in the rulesets queryTesting
Verified the fix by running Scorecard against the https://github.com/open-telemetry/opentelemetry-java-contrib repository.