Repository navigation
fix(security): security batch to staging - #257
Conversation
…tificate page crash - Cover proxy answers only raster image types and sends nosniff plus a sandboxing content policy, so it cannot serve active content from our origin. - UX Core content goes through an allowlist sanitiser after raw HTML parsing. - Certificate page no longer crashes when the visitor context is not loaded; the user name is encoded in the request path. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ing certificate answers 404 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…be a CMS path Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Claude finished @manager's task in 26s —— View job Review of PR #257 (security batch to staging)
SummaryMost of the batch is sound, but the sanitiser still has one XSS hole. I'd fix it before it reaches staging. I only read the code; I ran no build, lint or tests. Needs a fix
Minor
Looks good
No UX Core bias data, slugs or schema are touched. |
| }, | ||
| protocols: { | ||
| ...defaultSchema.protocols, | ||
| url: ['http', 'https'], |
There was a problem hiding this comment.
XSS gap: download / trello url is not validated. protocols in rehype-sanitize only applies to href, src, cite and longDesc. A url key does nothing here, so url on <download> and <trello> passes through unchecked. useContentType.tsx renders it as <a href={url}> (lines 117 and 133), so <trello url="javascript:alert(1)">x</trello> in persona text becomes a clickable javascript: link. Inside accordions the string is rebuilt and sanitised again, with the same result.
Add a pattern for the two tags, like the one used for file:
const SAFE_URL = /^(https?:\/\/|\/(?![\/\\]))/i;
// ...
download: [['url', SAFE_URL]],
trello: [['url', SAFE_URL]],You can then drop the url entry from protocols, which is a no-op.
| @@ -12,6 +8,9 @@ import { | |||
| Span, | |||
There was a problem hiding this comment.
The import reorder in this file, in ContentParser.tsx and in certificate.tsx goes against the AGENTS.md import order: third-party first, then aliases grouped, then relative imports, then styles. It looks like an auto-sort with the wrong config. Run eslint --fix with the repo config to restore the order. It also makes the diff harder to review.
|
Review dispositions.
|
The three commits of #256 on top of the staging branch: raster-only cover proxy, sanitised UX Core markup, certificate page fixes, style filter that refuses CSS escapes, accordion file limited to a CMS path.
Rollout to staging authorized by Wolf on 2026-11-11.
🤖 Generated with Claude Code