Plugin Directory: Block a release when a security scan reports a high risk score - #777
Open
obenland wants to merge 2 commits into
Open
Plugin Directory: Block a release when a security scan reports a high risk score#777obenland wants to merge 2 commits into
obenland wants to merge 2 commits into
Conversation
obenland
force-pushed
the
feature/gandalf-risk-score-suspension
branch
11 times, most recently
from
August 10, 2026 20:34
720e3d1 to
eae73fc
Compare
obenland
force-pushed
the
feature/gandalf-risk-score-suspension
branch
4 times, most recently
from
August 10, 2026 21:38
9f85496 to
e9fa87e
Compare
obenland
force-pushed
the
feature/gandalf-risk-score-suspension
branch
3 times, most recently
from
August 11, 2026 14:38
05834de to
c284616
Compare
This was referenced Aug 11, 2026
obenland
force-pushed
the
feature/gandalf-risk-score-suspension
branch
2 times, most recently
from
August 11, 2026 20:40
b1e5832 to
db30b40
Compare
obenland
force-pushed
the
feature/gandalf-risk-score-suspension
branch
4 times, most recently
from
August 12, 2026 13:07
dd5c180 to
2429313
Compare
obenland
force-pushed
the
feature/gandalf-risk-score-suspension
branch
2 times, most recently
from
August 12, 2026 18:47
8cd0daa to
1ebec61
Compare
This was referenced Aug 12, 2026
… risk score. Security scan callbacks now carry a max_risk_score and a bounded findings array. A completed scan at or above the threshold blocks the scanned release pending review — the previously served version keeps being served — and the plugin review team receives the findings as context via an internal note, a Slack alert, and a stored evidence snapshot. A verdict for a version already served, or superseded by a newer release, can't un-ship anything and stays advisory. Scanner retries are acknowledged idempotently under a canonical digest: an identical retry repeats no effects, and a completed verdict supersedes an earlier failure report for the same scan. Finding fields beyond the risk score are optional per the callback contract and read defensively. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
obenland
force-pushed
the
feature/gandalf-risk-score-suspension
branch
from
August 13, 2026 18:49
1ebec61 to
374f9c4
Compare
This was referenced Aug 13, 2026
obenland
marked this pull request as ready for review
August 13, 2026 20:37
|
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. |
The block guard confirmed only that the plugin's current version still matched the scanned version. When a newer release reused that version under a different tag, the guard passed and the scan's verdict blocked the superseding release, which was never scanned. Require the current stable tag to match the scanned release_ref as well, so a scan of one release can never block another; a mismatch fails open, as before. 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.
Security scan callbacks now include a
max_risk_score(0–10) and a boundedfindingsarray. This builds on the advisory integration and acts on that evidence.Builds on #779. Supersedes the scan-driven half of #720/#729.
What it does
max_risk_score >= 8.0(Plugin_Scan_Gandalf::BLOCK_RISK_SCORE, filterable) blocks the scanned release via Plugin Directory: Add an API to block a release from being served #785'sAPI_Update_Updater::block_release(), regardless of the plugin's install count: the version is held out of the update API — the previously served version keeps being served — until a reviewer force-releases it. The plugin itself stays published; nothing closes.Callback handling
max_risk_scoreis trusted as-is — the scanner is authoritative for it.scan_idunder a canonical (key-order-insensitive) digest: an identical retry is acknowledged without repeating effects, a different body for a consumed scan is rejected as a conflict, and a completed verdict supersedes an earlier failure report for the same scan — the pending entry survives a failure for exactly that reason. A short per-plugin lock (released even if processing throws) prevents concurrent callbacks from double-processing or clobbering each other's records.esc_html()for the wp-admin note,htmlspecialchars( …, ENT_NOQUOTES )for Slack (the idiom of the existing Slack integrations — Slack only decodes&/</>entities).Testing
tests/Security_Scan_Block_Test.php(20 tests) covers the threshold boundary, replay and conflict handling (including a re-marshalled retry with different key order), a completed verdict superseding a failure report, blocking refused for served and superseded versions, blocking independent of install count, a reported score blocking even without findings detail, the snapshot bound, escaping of hostile finding strings, the row holding the served version through a scan-driven block, and force-release closing the loop.🤖 Generated with Claude Code