openssf-scorecard: Use merge base as baseline instead of branch tip #10
+22
−10
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.
Previously the action used the base branch tip (github.event.pull_request.base.sha) as the baseline for regression detection. This caused false failures when the base branch improved after a PR was created - the PR would appear to regress even though it didn't change anything security-related.
Now we compute the merge base between the base and head SHAs, which represents where the PR branched from the target branch. This ensures we're answering the right question: 'Did this PR introduce regressions?' rather than 'Is this PR as good as current main?'
The merge base is stable and won't change when the base branch advances, so PRs will only fail if they actually introduce regressions, not because they're missing improvements that landed on main after the PR was created.
Assisted-by: OpenCode (Claude Sonnet 4)