fix(feeds): allowlist war.gov + thenationalnews.com + trumpstruth.org — unblock feed-health activation (#4970)#4971
Merged
Conversation
… — unblock feed-health activation (#4970) Three server-catalog feeds (Pentagon, The National, Truth Social) had hosts absent from the RSS allowlist, tripping the CONFIG_DRIFT hard-fail in validate-rss-feeds.mjs --ci (exit 1) which — per the #4927 ordering — blocks feed-health/recall-benchmark publishing before it runs. Pre-existing drift (DoD rebranded defense.gov→war.gov; the other two were added to the catalog without allowlisting), surfaced by activating the publish path. Adds the three hosts to all mirrors: shared/rss-allowed-domains.json (source of truth) + its byte-identical scripts/shared mirror + the api/_rss-allowed-domains.js copy the validator and Edge SSRF guard actually read + vite.config.ts RSS_PROXY_ALLOWED_DOMAINS (dev proxy). The .cjs re-requires the JSON (no edit). Verified: isAllowedDomain() now returns true for www.war.gov, www.thenationalnews.com, trumpstruth.org (exact/bare/www rule); shared and api lists are byte-equal (339); edge-functions + scripts-shared mirror guards green (228). feed-validation.yml does not run on PRs (SSRF surface) — post-merge workflow dispatch is the end-to-end proof. Closes #4970 Claude-Session: https://claude.ai/code/session_01WmhkGjZrb9RbV7pV3muFxP
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
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.
Closes #4970. Unblocks the feed-health + recall-benchmark activation that #4927 wired (your UPSTASH secrets are confirmed reaching the workflow; this was the only thing standing in the way).
Problem
validate-rss-feeds.mjs --cihard-fails exit 1 on 3 catalog feeds whose hosts aren't allowlisted (Host not in allowlist), and the #4927 guardrail correctly refuses to publish health metadata on a drift-failing run. Pre-existing (files last touched by #4199/#3986/#3891 — none of the news-pipeline PRs); activating the publish path surfaced it.www.war.govdefense.gov→war.gov; allowlist had onlywww.defense.govwww.thenationalnews.comtrumpstruth.orgFix
Add the 3 hosts to every allowlist mirror:
shared/rss-allowed-domains.json(source of truth) → byte-identicalscripts/shared/mirror →api/_rss-allowed-domains.js(the copy the validator + Edge SSRF guard read) →vite.config.ts:RSS_PROXY_ALLOWED_DOMAINS(dev proxy)..cjsre-requires the JSON.Verification
isAllowedDomain()→truefor all three (exact/bare/www rule).tests/edge-functions.test.mjs+tests/scripts-shared-mirror.test.mjsgreen (228).feed-validation.ymldoes not run on PRs (SSRF surface — schedule/push/dispatch only), so PR checks won't exercise the full fetch. The end-to-end proof is a post-merge workflow dispatch: expect exit 0, the 3 out of theHost not in allowlistclass, feed-health published, and the two health keys flippending-activation→ monitored.Security note: this widens the RSS-proxy SSRF allowlist by 3 legitimate news hosts already present in the feed catalog — deliberate, reviewed.
https://claude.ai/code/session_01WmhkGjZrb9RbV7pV3muFxP