Packages

Input Sanitization & Security Packages

Input sanitization, XSS prevention, and application-security utilities that clean untrusted input before it reaches your rendering or storage layer (DOMPurify).

123 packages

Packages in Input Sanitization & Security

70Health
Library Cargo

secrecy

Rust wrapper types that keep secrets out of logs, debug output, and Clone/Copy, and securely wipe them from memory on drop

580
Other
Used by 7
78Health
Library Composer

enshrined/svg-sanitize

A PHP SVG/XML sanitizer that strips malicious markup from untrusted SVGs

552
Other
Used by 7
59Health
Library Go

secure

Standard net/http middleware that adds HSTS, CSP, X-Frame-Options, and other security headers to any Go web app in a few lines.

2,359
MIT
Used by 6
56Health
Library PyPI

slowapi

Rate limiting for Starlette and FastAPI endpoints, adapted from Flask-Limiter.

2,069
MIT
Used by 6
77Health
Library npm

@fastify/rate-limit

A low-overhead rate limiter for Fastify routes, with in-memory or Redis-backed request tracking.

603
MIT
Used by 6
78Health
Library npm

RE2JS

Linear-time, ReDoS-safe regular expression engine for JavaScript

208
MIT
Used by 6
24Health
Library PyPI

lxml_html_clean

Standalone HTML cleaner extracted from lxml.html.clean for stripping scripts, styles, and unsafe attributes from untrusted HTML.

13
BSD 3
Used by 6
84Health
Tool npm

Anthropic Sandbox Runtime

Wraps any command in OS-native filesystem and network sandboxing, without requiring a container.

6,043
Apache 2.0
Used by 5
66Health
Library Go

cors

Configurable CORS middleware for the Gin web framework in Go, with fine-grained origin, header, and credential rules.

2,001
MIT
Used by 5
66Health
Library npm

zxcvbn-ts

A TypeScript rewrite of Dropbox's zxcvbn password strength estimator, with pluggable dictionaries and async matcher support.

1,236
MIT
Used by 5
40Health
SDK npm

react-google-recaptcha

React component wrapper for Google reCAPTCHA v2, handling script loading, widget rendering, and the execute/reset API out of the box.

1,083
MIT
Used by 5
74Health
Library npm

altcha

Privacy-first, self-hosted CAPTCHA replacement that proves a visitor is human with invisible proof-of-work instead of puzzles, tracking, or third-party APIs.

2,846
MIT
Used by 4
58Health
Library npm

hono-rate-limiter

Rate limiting middleware for Hono with pluggable memory, Redis, Cloudflare, and Unstorage backends, plus WebSocket support.

656
MIT
Used by 4
42Health
Library Composer

Purify

A Laravel wrapper around HTMLPurifier that sanitizes untrusted HTML through a fluent facade, Eloquent casts, and configurable purification profiles.

538
MIT
Used by 4
43Health
Library npm

remark-html

A remark plugin that compiles markdown syntax trees directly into sanitized HTML strings.

336
MIT
Used by 4
33Health
Library npm

safe-regex

Detects regular expressions prone to catastrophic backtracking (ReDoS) using AST-based star-height analysis.

194
MIT
Used by 4
39Health
Library npm

check-password-strength

A lightweight, fully-typed password strength checker built on plain JavaScript regex rules.

191
MIT
Used by 4
64Health
Library npm

proxy-addr

Determine the real client IP address behind trusted proxies, with full IPv4, IPv6, and CIDR support.

142
MIT
Used by 4
22Health
Library npm

csrf-sync

Stateful CSRF protection for Express using the Synchronizer Token Pattern, built to replace the deprecated csurf package.

42
Other
Used by 4
41Health
Library Cargo

sanitize-filename

A basic filename sanitizer for Rust, ported from Node's sanitize-filename

38
MIT
Used by 4
27Health
Library npm

is-localhost-ip

Checks whether a hostname or IPv4/IPv6 address resolves to the local machine or a private network

27
MIT
Used by 4
67Health
Library PyPI

re2

A fast, safe Python binding for Google's RE2 regular expression engine, offering a near drop-in replacement for the re module with a linear-time matching guarantee.

9,827
BSD 3
Used by 3
83Health
Library PyPI

disposable-email-domains

A community-maintained blocklist of disposable email domains for filtering throwaway signups.

5,614
Other
Used by 3
77Health
Library Composer

HTML Purifier

A standards-compliant PHP library that filters untrusted HTML through robust whitelists to block XSS while keeping rich formatting intact.

3,347
Other
Used by 3

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers