Plugin Directory: Baseline security scans on the served release - #806
Closed
obenland wants to merge 3 commits into
Closed
Plugin Directory: Baseline security scans on the served release#806obenland wants to merge 3 commits into
obenland wants to merge 3 commits into
Conversation
A blocked or cooling-down release never reaches update_source, so diffing against the served release keeps a re-tagged blocked payload from becoming its own scan baseline. When the row already carries the scanned version (imports without a cooldown write it before the scan dispatches), the last-import meta remains the baseline, where a block cannot exist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Review fixes: drop the baseline when the candidate release is blocked (reachable through the last-import fallback when no update_source row exists), normalize empty served row columns to null, type the test HTTP mock, and remove an unread stable_tag fixture. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 free
to 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.
The release block introduced in #777 is deliberately scoped to one release, so an author can ship a genuine fix without reviewer intervention. But the scan's diff baseline (
previous_zip_url) came from thelast_stable_tag/last_versionpost meta, which updates on every import — including the import of a blocked version. Re-tagging a blocked payload under a new version therefore diffed against the blocked release itself: an empty diff, a clean verdict, and the block circumvented. Splitting a payload across several small releases exploited the same chained baseline.Builds on #777.
What it does
update_source) as the diff baseline. A blocked or cooling-down release never reaches that row, so a follow-up release is always diffed against the last version that actually shipped — or that a reviewer force-released, which is clean by definition. The payload of a re-tagged blocked release shows up in its own diff, every time, until a reviewer clears it.block_release()refuses served versions), so the fallback reopens nothing.API_Update_Updater::get_served_release()returns the served row'sversionandstable_tag(zips are named by tag, not by the version header);get_served_version()now delegates to it.Testing
tests/Gandalf_Scan_Baseline_Test.php(4 tests) captures the dispatched scan request and covers: the served release winning as baseline while a newer version is held (the circumvention case), the fallback when the row already serves the scanned version, the fallback without anupdate_sourcerow, and the trunk-served case dispatching with no baseline.🤖 Generated with Claude Code