Plugin Directory: Sharpen the findings list in security scan alerts - #782
Plugin Directory: Sharpen the findings list in security scan alerts#782obenland wants to merge 1 commit into
Conversation
|
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. |
- Group the findings list in a blockquote rail to set it off from the headline and footer. - Pad risk scores to one decimal so 6.0 and 6.5 read as peers. - Restore the investigation result dropped in the restyle: reproduced and conditional findings now carry the result in their badge. - Link the "…and N more" overflow line to the full report. - Decode entity-encoded post titles before escaping; they rendered as literal & in Slack. Follow-up to WordPress#779 and WordPress#781. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
247d0b9 to
96430e7
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves the readability of the Plugin Directory’s Gandalf security-scan Slack alert by adding severity-driven visual cues and tightening up Slack mrkdwn formatting, while fixing double-encoded plugin titles in the message.
Changes:
- Decode entity-encoded plugin post titles before Slack escaping to prevent
&amp;-style double-encoding. - Add CVSS-band severity “dot” indicators and normalized 1-decimal risk-score badges (including restored investigation result markers).
- Wrap findings in a Slack blockquote and make the overflow line an italicized link to the full report, reusing a safely-escaped report URL.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Follow-up to #779 and #781. The restyled alert works, but the findings section still blurs together — wrapped titles and file lines run into each other with nothing binding the list,
6 errorand6.5 errormisalign, and two display defects slipped through the earlier passes. This tightens the mrkdwn (no emoji):>blockquote, giving the middle section a left rail that binds it into one visual unit and sets it off from the headline and footer.6.0 error, not6 error) so the bold badges line up across findings.(investigation: reproduced)marker from Plugin Directory: Include findings in security scan alerts #779. Acompletedinvestigation with areproducedorconditionalresult — the strongest "this is real" signal in the payload — now renders in the finding's bold badge:*9.8 error · reproduced*.…and 12 more in the full report.is now italic and links to the Gandalf report, since that line is the affordance for seeing the rest.htmlspecialchars()re-encoded the ampersand and Slack displayed literal&(visible today as Jetpack - WP Security, Backup, Speed, & Growth). Titles are nowhtml_entity_decode()d before the Slack escaping, so named and numeric entities render as their characters while<!channel>-style control sequences stay neutralized.Rendered with the example callback payload:
(where the
>lines render as one quoted block and the plugin name,path:linereferences, overflow line, and footer are links)Notes:
<!channel>/<!here>in titles,|and</>in file paths and the report URL) — escaping and link syntax hold in all cases.phpcs-changedagainst trunk reports no new violations; the full-file violations are pre-existing.slack_dm()— attachments/Block Kit (severity color bars, buttons) remain a possible follow-up requiring a transport change in the private repository.🤖 Generated with Claude Code