If you discover a security vulnerability, please report it responsibly:
Email: hello@herakles.dev
Do not open public issues for security vulnerabilities.
- Input validation — Content is validated as legal/TOS text before reaching the LLM. Non-legal content is rejected with a descriptive error.
- System prompt hardening — The Gemini system prompt constrains output format (JSON schema) and explicitly instructs the model to ignore embedded instructions in user content.
- Output validation — LLM responses are parsed against a strict Zod schema. Any response that doesn't match the expected structure is rejected.
- Nginx layer — IP-based rate limiting at the reverse proxy level
- Redis layer — Atomic Lua scripts enforce per-IP rate limits with sliding windows. No race conditions.
- Daily Gemini API token budget caps prevent runaway costs
- Configurable via
DAILY_TOKEN_BUDGETenvironment variable - Automatic rejection of requests when budget is exhausted
- Analysis content is hashed (SHA-256) for deduplication — duplicate TOS documents return cached results
- No user accounts or personal data collected
- Analysis results expire after 30 days (configurable)
- Shared links use non-sequential UUIDs
- PostgreSQL with Prisma ORM (parameterized queries, no SQL injection surface)
- Redis connections via
iorediswith TLS support - Docker deployment with non-root container user
- HTTPS enforced via Cloudflare + nginx
| Version | Supported |
|---|---|
| Latest (main) | Yes |