feat: expand Message Center posts inline instead of linking to the admin centre - #5
Merged
Merged
Conversation
…min centre A Message Center permalink only opens for someone with tenant admin access, so for a public reader those cards were a headline and a dead link. The post body now travels with the article and the site shows it inline. No separate tab: a tab would split the timeline and hide these posts from the search, date and bookmark filters that already work across every source. Instead they carry a Microsoft Message Center product tag, which the existing machinery turns into both a card tag and a filter pill for free, so "just the Message Center" is one click and everything stays in one stream. The tag is assigned by source rather than by text matching (an unreachable weight threshold keeps the classifier from ever awarding it on wording), so it means "this came from the Message Center" rather than "this mentions it". The expand button appears only on articles that actually carry a body, so it never promises more than the RSS sources can deliver. Bodies are stored and rendered as PLAIN TEXT, never HTML. Links are extracted from the original markup and re-rendered as anchors after a scheme check at both ends. That keeps the front end's existing rule intact: everything reaches the DOM through textContent, so hostile upstream feed content has no route in. Verified under jsdom against the real index.html and app.js: 14 checks covering the tag, the pill, the expand button only where a body exists, paragraph splitting, the dialog lifecycle, and hostile markup in the title, body and link labels rendering as literal text with no element or attribute created.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
Answering the question directly: no separate tab. A tab would split the timeline and cut these posts off from the search, date, sort and bookmark filters that already work across every source. Message Center posts are news like everything else, they just happen to be the only ones with a body worth reading in place.
What this does
A
Microsoft Message Centertag. Added as a product, which the existing machinery turns into both a card tag and a filter pill for free, so "just the Message Center" is one click and nothing leaves the main stream.It is assigned by source, not by text matching. An unreachable weight threshold stops the classifier ever awarding it on wording, so the tag means "this came from the Message Center" rather than "this mentions it".
An expand button, opening a popout. Only on articles that actually carry a body. Every RSS source has nothing beyond a 300 character summary, so an expand button there would promise more than it could deliver.
Why it is worth doing at all
A Message Center permalink is
admin.microsoft.com/#/MessageCenter/..., which only opens for someone with admin access to the tenant it was published to. For a public reader on security.libredevops.org those 12 cards were a headline, a summary and a dead link. Now the full post is readable in place, and the outbound link is labelled honestly as admin-only rather than looking like a normal article link.Security
This is the part that mattered most, given the site aggregates untrusted upstream content and
SECURITY.mdnames stored XSS through a title or summary as the plausible finding.feeds.json, and the dialog builds every node withtextContent.http(s)only in the Python, then re-validated throughisSafeUrlinsanitiseArticlerather than trusted from the feed.sanitiseArticlestill whitelists fields, sobodyandlinksare passed through explicitly with their own caps rather than arriving by accident.<dialog>, so focus trapping, Escape and the backdrop come from the platform instead of hand-rolled JS.app.jsSRI on deploy as usual.Verification
Driven under jsdom against the real
index.htmlandapp.js, with hostile markup (<img src=x onerror=...>) planted in the title, the body and a link label, plus ajavascript:URL in the links array. All 14 checks pass:The bodies themselves could not be generated locally: the Azure CLI delegated token still 403s, because consent was granted to the application's service principal rather than to the CLI client for the signed-in user. The pipeline's federated identity is unaffected, so real bodies land on the next feed run.