
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
safe-markdown-react
Advanced tools
Safe, GFM-friendly Markdown → React renderer with sanitation, link policy, and image allowlists.
Safe, GFM-friendly Markdown → React renderer with sanitation, link policy, and image allowlists.
Perfect for rendering AI / user-generated content without inviting XSS or layout chaos.
rehype-sanitize (strict schema)rel="nofollow noopener noreferrer" and target="_blank"h1..h3 only)npm i safe-markdown-react
# peer deps: react >= 18
import { SafeMarkdown } from 'safe-markdown-react';
export default function Article({ content }: { content: string }) {
return (
<SafeMarkdown
markdown={content}
allowedImageHosts={['images.example.com', 'cdn.jsdelivr.net']}
maxHeadingLevel={3}
linkTarget="_blank"
/>
);
}
import { SafeMarkdown } from 'safe-markdown-react';
const components = {
h2: (props) => <h2 className="text-2xl font-semibold" {...props} />,
code: (props) => <code className="rounded bg-zinc-950/90 px-1 py-0.5" {...props} />,
};
<SafeMarkdown markdown={md} components={components} />;
<SafeMarkdown />Props:
markdown: string — the raw Markdown textallowedImageHosts?: string[] — host allowlist for <img src>. Defaults to [] (block external images).allowedSchemes?: string[] — URL schemes to permit in href/src. Defaults to ['http', 'https', 'mailto'].maxHeadingLevel?: 1|2|3|4|5|6 — cap headings to at most this level (default 3).linkRel?: string — rel attribute for links (default 'nofollow noopener noreferrer').linkTarget?: string — target for links (default '_blank').components?: Record<string, React.ComponentType<any>> — map element names to your components.rel and target by default.http, https, mailto) are allowed by default.MIT
FAQs
Safe, GFM-friendly Markdown to React renderer with sanitation, link policy, and image allowlists.
We found that safe-markdown-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.