SafeLine — Self-Hosted Web Application Firewall
SafeLine is a self-hosted WAF and reverse proxy that protects web applications from attacks using semantic analysis. It detects SQL injection, XSS, and other threats with near-zero false positives through AI-powered traffic inspection.
Installation avec revue préalable
Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.
npx -y tokrepo@latest install 84b25adf-39db-11f1-9bc6-00163e2b0d79 --target codexDry-run d'abord, confirmez les écritures, puis lancez cette commande.
What it is
SafeLine is a self-hosted Web Application Firewall by Chaitin Technology. Unlike traditional WAFs that rely on regex pattern matching, SafeLine uses semantic analysis to understand the intent of HTTP requests. This approach catches sophisticated attacks that rule-based systems miss while dramatically reducing false positives.
It targets DevOps engineers, security teams, and small-to-medium organizations that want WAF protection without paying for commercial cloud WAF services. SafeLine runs as a reverse proxy in front of your web applications.
How it saves time or tokens
Traditional regex-based WAFs require constant rule tuning to balance detection accuracy against false positives. SafeLine's semantic engine understands the structure of SQL, JavaScript, and shell commands, so it distinguishes between legitimate user input containing SQL-like syntax and actual injection attempts. This eliminates the hours spent writing and maintaining custom WAF rules.
One-line installation means you go from zero to protected in minutes rather than the hours or days required for configuring ModSecurity or AWS WAF rule sets.
How to use
- Install SafeLine with the official one-liner:
bash -c "$(curl -fsSLk https://waf.chaitin.com/release/latest/setup.sh)"
- Open the dashboard at
https://your-ip:9443and complete the setup wizard.
- Configure upstream servers -- point SafeLine at your web application backends and it begins inspecting traffic immediately.
Example
After installation, SafeLine exposes a management API for automation:
# Check SafeLine status
curl -k https://localhost:9443/api/v1/health
# List protected sites
curl -k -H 'Authorization: Bearer YOUR_TOKEN' \
https://localhost:9443/api/v1/sites
The dashboard provides real-time attack visualization, blocked request logs, and traffic analytics without additional tooling.
Related on TokRepo
- Security Tools -- Security scanners and vulnerability detection tools for your infrastructure
- Self-Hosted Tools -- Run security and monitoring tools on your own servers
Common pitfalls
- SafeLine acts as a reverse proxy, so your application sees SafeLine's IP rather than the client IP. Configure X-Forwarded-For header forwarding to preserve original client addresses.
- The default admin credentials should be changed immediately after installation. The setup wizard prompts for this, but scripted installations may skip it.
- Resource sizing matters: semantic analysis is more CPU-intensive than regex matching. For high-traffic sites (10K+ requests per second), allocate at least 4 CPU cores and 8GB RAM.
Questions fréquentes
SafeLine detects SQL injection, cross-site scripting (XSS), command injection, code injection, SSRF, path traversal, and other OWASP Top 10 attack vectors. Its semantic engine analyzes the structure of payloads rather than matching fixed patterns.
Regex WAFs match known attack strings, which attackers can bypass with encoding tricks or novel syntax. Semantic analysis parses the actual language structure (SQL grammar, JavaScript AST) to detect malicious intent regardless of obfuscation, resulting in fewer false positives and better detection of zero-day payloads.
Yes. SafeLine supports multiple site configurations, each pointing to a different upstream server. You define listener ports, upstream addresses, and per-site security policies through the dashboard or API.
Yes. SafeLine can terminate TLS connections and forward decrypted traffic to upstream servers. You upload your SSL certificates through the dashboard. It also supports Let's Encrypt auto-renewal for managed certificates.
SafeLine requires Docker and Docker Compose. Minimum specs are 2 CPU cores and 4GB RAM for light traffic. For production workloads with high request volumes, 4+ cores and 8GB+ RAM are recommended due to the computational cost of semantic analysis.
Sources citées (3)
- SafeLine GitHub— SafeLine uses semantic analysis for attack detection with near-zero false positi…
- OWASP Foundation— OWASP Top 10 web application security risks
- Chaitin Technology— WAF semantic analysis vs regex-based detection approaches
En lien sur TokRepo
Fil de discussion
Actifs similaires
BentoPDF — Privacy-First Self-Hosted PDF Toolkit
BentoPDF is a self-hosted web application that provides a comprehensive set of PDF tools including merging, splitting, converting, and OCR without sending files to external services.
ConvertX — Self-Hosted File Converter Supporting 1000+ Formats
ConvertX is a self-hosted web application for converting files between formats including documents, images, audio, video, and more.
ArchiveBox — Self-Hosted Web Archiving Platform
ArchiveBox is an open-source self-hosted web archiver that saves URLs as local HTML, PDF, screenshots, WARC, and more. Feed it bookmarks, browser history, or RSS feeds and it preserves everything for offline access.
Dockge — Fancy Self-Hosted Docker Compose Manager
Dockge is a reactive, self-hosted Docker Compose management UI from the creator of Uptime Kuma. It lets you create, edit, start, stop, and monitor docker-compose.yaml stacks through a beautiful real-time web interface.