fix: validate URL protocols in data-driven href attributes to prevent XSS - #143
Conversation
|
@SebTardif is attempting to deploy a commit to the Jamie's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Codex review: needs changes before merge. Reviewed May 28, 2026, 10:39 PM ET / 02:39 UTC. Summary Reproducibility: yes. source-reproducible: current main maps testimonial, community-build, press, and author URL fields directly into href attributes. I did not run a local build during this read-only review, but the code path and the PR regression tests make the issue boundary clear. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land the sanitizer and regression tests after removing the release-owned changelog entry or having release ownership carry the release note separately. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main maps testimonial, community-build, press, and author URL fields directly into href attributes. I did not run a local build during this read-only review, but the code path and the PR regression tests make the issue boundary clear. Is this the best way to solve the issue? Yes for the mitigation: a shared allowlist sanitizer at the data-driven href call sites is narrow and tested. The changelog entry should be removed from the branch or handled by the release owner separately. Full review comments:
Overall correctness: patch is correct AGENTS.md: found, but no applicable review policy affected this item. Codex review notes: model gpt-5.5, reasoning high; reviewed against bc410810fe84. Label changesLabel justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Mossy Crabkin Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
d91b2e0 to
d016691
Compare
Co-authored-by: Sebastien Tardif <sebtardif@ncf.ca>
d016691 to
dfb9be6
Compare
Summary
Hardens data-driven external links before they are rendered into
hrefattributes.Current-main rewrite from the original PR:
sanitizeUrl()insrc/lib/sanitize-url.tsmainhttp/https/mailto/relative URLsProof