Microsoft AntiSSRF Library for Python
The Microsoft AntiSSRF Library for Python is a security-developed, exhaustively-tested library that provides robust URL validation to protect Python applications from Server-Side Request Forgery (SSRF) vulnerabilities. It integrates seamlessly with Python requests library, allowing developers to secure outbound HTTP requests with minimal code changes.
How to Use
The AntiSSRF Library provides validation for different scenarios based on your trust requirements:
| Use Case | Description | Documentation Link |
|---|---|---|
| General Case | The untrusted URL can belong to any domain or an untrusted domain. | AntiSSRFPolicy |
| Azure Key Vault Domain | The untrusted URL must be an Azure Key Vault endpoint. | URIValidator.in_azure_keyvault_domain |
| Azure Storage Domain | The untrusted URL must be an Azure Storage endpoint. | URIValidator.in_azure_storage_domain |
| Allowlist of Trusted Domains | The untrusted URL must belong to a specific, trusted domain. | URIValidator.in_domain |
Key Features
-
SSRF Attack Prevention - Blocks malicious server-side request forgery attempts
-
Private Network Protection - Separate built-in configuration options for internal vs. external address HTTP clients
-
DNS Rebinding Protection - Guards against DNS-based attacks
-
Redirect Protection - Re-validates on all redirects to prevent bypass attempts
-
Protocol Validation - Ensures only safe protocols are used
-
Fully Customizable - Configure domain allowlists, IP ranges, headers, and validation policies
Additional Documentation
Explore our comprehensive documentation to get the most out of Microsoft AntiSSRF:
Getting Started
- Microsoft AntiSSRF Documentation
- Quick Start Guide
- Security Best Practices
- Frequently Asked Questions
- Changelog
API Documentation
Feedback & Contributing
We welcome feedback and contributions from the community! Here's how you can get involved:
- Report Issues: GitHub Issues - Report bugs or request new features
- Contribute: Contributing Guide - Learn how to contribute to the project
- Contact: antissrf-oss@microsoft.com - Direct email for questions and feedback
Support Policy
For support inquiries, contact antissrf-oss@microsoft.com.
Metadata
Release files for microsoft-antissrf 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| microsoft_antissrf-1.0.0.tar.gz | 15.4 kB | Without provenance | Details for microsoft_antissrf-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| microsoft_antissrf-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for microsoft_antissrf-1.0.0-py3-none-any.whl |
Total release size: 32.0 kB
Release files / microsoft_antissrf-1.0.0.tar.gz
| Download URL | microsoft_antissrf-1.0.0.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52cdffe741878d3eb67b151d5c550b2bad95897d59ed5f4a844c853ec153fabb
|
|
BLAKE2b-256 checksum How to use checksums |
0cbefe3e69c34f09f04cd70f21349d1ad61b68edf32186278fa2f44871abb179
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / microsoft_antissrf-1.0.0-py3-none-any.whl
| Download URL | microsoft_antissrf-1.0.0-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0214e3f46f2161a2f37bf33494960939875aa55f86874edb4cb0d6d63d76b8f
|
|
BLAKE2b-256 checksum How to use checksums |
5aabafb204904f8747e8149aeae39af17ac29f0f26822afcbb3b01e17a60aec2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Security for microsoft-antissrf 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.