Zen, your in-app firewall for peace of mind– at runtime.
Zen is an embedded Web Application Firewall that autonomously protects your Python apps against common and critical attacks.
Zen protects your Python apps by preventing user input containing dangerous strings, which allow SQL injections. It runs on the same server as your Python app for simple installation and zero maintenance.
Zen will autonomously protect your Python applications from the inside against:
- 🛡️ NoSQL injection attacks
- 🛡️ SQL injection attacks
- 🛡️ Command injection attacks
- 🛡️ Path traversal attacks
- 🛡️ Server-side request forgery (SSRF)
- 🛡️ Attack wave detection
Zen operates autonomously on the same server as your Python app to:
- ✅ Secure your app like a classic web application firewall (WAF), but with none of the infrastructure or cost.
Zen for Python 3 is compatible with:
- ✅
mysqlclient^1.5 - ✅
PyMySQL^0.9 - ✅
pymongo^3.10 - ✅
psycopg2^2.9.2 - ✅
psycopg^3.1 - ✅
asyncpg^0.27 - ✅
motor(Seepymongoversion) - ✅
clickhouse-driver - ✅
sqlite3
Zen instruments the following AI SDKs to track which models are used and how many tokens are consumed, allowing you to monitor your AI usage and costs:
Zen is compatible with Python 3.8-3.14 and can run on Windows, Linux, and Mac OS X.
We recommend testing Zen locally or on staging before deploying to production.
pip install aikido_zen
# or
poetry add aikido_zen
# or
uv add aikido_zenFor framework-specific instructions, check out our docs:
- Troubleshooting — common issues and how to debug Zen
- Set the current user — identify users for rate limiting, blocking, and attack reports
- Track custom events — trigger events that Playbooks can act on
- Proxy / IP headers — configure client IP detection behind load balancers
- Logging — enable debug logging
- Background process — how Zen's background process communicates over IPC
Aikido is your no nonsense application security platform. One central system that scans your source code & cloud, shows you what vulnerabilities matter, and how to fix them - fast. So you can get back to building.
Zen is a new product by Aikido. Built for developers to level up their security. While Aikido scans, get Zen for always-on protection.
You can use some of Zen’s features without Aikido, of course. Peace of mind is just a few lines of code away.
But you will get the most value by reporting your data to Aikido.
You will need an Aikido account and a token to report events to Aikido. If you don't have an account, you can sign up for free.
Here's how:
- Log in to your Aikido account.
- Go to Zen.
- Go to apps.
- Click on Add app.
- Choose a name for your app.
- Click Generate token.
- Copy the token.
- Set the token as an environment variable,
AIKIDO_TOKEN
By default, Zen will only detect and report attacks to Aikido.
To block requests, set the AIKIDO_BLOCK environment variable to true.
See Reporting to Aikido to learn how to send events to Aikido.
Configure Zen using environment variables for authentication, mode settings, debugging, and more.
This program is offered under a commercial and under the AGPL license. You can be released from the requirements of the AGPL license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the Zen software without disclosing the source code of your own applications.
For more information, please contact Aikido Security at this address: support@aikido.dev or create an account at https://app.aikido.dev.
We run a benchmark on every commit to ensure Zen has a minimal impact on your application's performance.
See benchmarks
Our bug bounty program is public and can be found by all registered Intigriti users here
See CONTRIBUTING.md for more information.
See CODE_OF_CONDUCT.md for more information.
See SECURITY.md for more information.