Skip to content

Conversation

haydenbleasel
Copy link
Collaborator

This pull request focuses on improving image security in the Streamdown markdown rendering system. The main change is to restrict which image sources are allowed, both in the website and the core Streamdown component, to prevent loading images from untrusted origins.

Image Security Hardening:

  • Added a changeset entry documenting the image security hardening update.
  • Updated the Section component in apps/website/app/components/styles.tsx to explicitly allow images only from https://placehold.co via the streamdownProps.allowedImagePrefixes property.
  • Changed the default image prefix in the Block component within packages/streamdown/index.tsx from allowing all ('*') to only allowing images from the same origin ('self'). Also, set the default origin to the current window's origin if not provided.

Copy link
Contributor

vercel bot commented Aug 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
streamdown Ready Ready Preview Comment Aug 28, 2025 4:13pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant