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

89Health
Library npm

DOMPurify

DOM-only, uber-tolerant XSS sanitizer for HTML, MathML, and SVG that runs in the browser and on the server.

17,413
Apache 2.0
Used by 135
84Health
Library npm

sanitize-html

Allowlist-based HTML sanitizer that strips XSS vectors from untrusted markup while preserving the tags and attributes you choose to keep.

4,630
MIT
Used by 42
45Health
Library PyPI

markupsafe

Escapes untrusted strings for safe use in HTML and XML markup, preventing injection attacks in templated output.

697
BSD 3
Used by 20
81Health
Library npm

isomorphic-dompurify

Isomorphic wrapper for DOMPurify that sanitizes HTML identically on server and client.

598
MIT
Used by 12
53Health
Library PyPI

slowapi

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

2,064
MIT
Used by 6
23Health
Library Cargo

sanitize-filename

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

38
MIT
Used by 4
48Health
Library PyPI

Flask-Limiter

Rate limiting for Flask applications with pluggable storage backends and per-route limits

1,207
MIT
Used by 3
45Health
Library PyPI

django-csp

Content-Security-Policy header management for Django, with per-view overrides and nonce support.

624
BSD 3
Used by 3
76Health
Tool PyPI

Bandit

A static analysis tool that scans Python code for common security issues.

8,285
Apache 2.0
Used by 2
51Health
Library PyPI

python-ipware

Retrieve a client's real IP address from HTTP request headers, with proxy handling.

43
MIT
Used by 2
89Health
Library PyPI

Presidio Analyzer

The PII detection engine behind Presidio, combining NER, regex, and checksum recognizers

11,062
MIT
Used by 1
65Health
Library PyPI

RestrictedPython

Compiles a restricted subset of Python so you can define a trusted boundary for running untrusted code.

743
Other
Used by 1
70Health
Library PyPI

simpleeval

A single-file Python library for safely evaluating user-supplied expressions without exposing full eval() access.

613
MIT
Used by 1
54Health
Library Cargo

svg-hush

A Rust library and CLI that strips scripting, cross-origin links, and other XSS vectors from untrusted SVG files.

433
Other
Used by 1
42Health
Library PyPI

pathvalidate

A zero-dependency Python library that sanitizes and validates filenames, file paths, and LTSV labels across Windows, Linux, macOS, and POSIX platforms.

296
MIT
Used by 1
31Health
Library PyPI

confusable_homoglyphs

Detect dangerous Unicode homoglyphs and mixed-script strings to stop impersonation attacks

166
MIT
Used by 1
77Health
Library Cargo

decancer

Rust library that strips unicode confusables, homoglyphs, and leetspeak from text for moderation and search normalization.

131
MIT
Used by 1
24Health
Library Composer

HTMLawed

A single-file PHP library that sanitizes HTML input to block XSS attacks and enforce standards-compliant markup.

42
Other
Used by 1
32Health
SDK PyPI

altcha

Create and verify ALTCHA proof-of-work CAPTCHA challenges in Python with a zero-dependency, fully typed library.

33
MIT
Used by 1

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