Fix placeholder content, payloadPath security, schema mismatch, and session init robustness#333
Merged
pethers merged 1 commit intocopilot/news-2026-02-19-v2-2f1ee22a2bc0c0c2from Feb 19, 2026
Conversation
Copilot
AI
changed the title
[WIP] Add 42 news articles for 2026-02-19
Fix placeholder content, payloadPath security, schema mismatch, and session init robustness
Feb 19, 2026
c53497c
into
copilot/news-2026-02-19-v2-2f1ee22a2bc0c0c2
1 check passed
This was referenced Feb 19, 2026
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.
PR #326 review identified incomplete AI-generated article stubs, a path traversal vulnerability, inconsistent error handling, and a schema drift between the metadata file and its writer.
Placeholder content (10 language files)
news/2026-02-19-opposition-motions-{ar,de,es,fi,fr,he,ja,ko,nl,zh}.html— Political Analysis and Outlook sections contain<p>...</p>stubs. Replaced with full translated content matching the English source.Security:
payloadPathpath traversal (mcp-client.js:568)Server-controlled
payloadPathwas passed directly tofs.readFileSyncwith no validation — arbitrary local file read. Fixed by resolving and validating the path is within an allow-listed directory before reading:Case-insensitive 'Too Many Requests' check (
mcp-client.js:547)Session re-init check used
errorMsg.includes('Too Many Requests')(mixed case) while the catch block already used.toLowerCase(). Normalized to.toLowerCase().includes('too many requests').Metadata schema drift (
generate-news-enhanced.js:751)last-generation.jsonwas written with old keys (timestamp,types,languagesGenerated) while the file on disk uses the new schema (lastGeneration,articleTypes,articlesGenerated). Updated the writer to emit the current schema.initializeSession()— unguardednotifications/initializedfetch (mcp-client.js:699)Second
fetchcall had nosignal(could hang) and noresponse.okcheck (silent failure). Addedcontroller.signaland a warning log on non-2xx response.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.