-
Notifications
You must be signed in to change notification settings - Fork 0
Security
sylvain legland edited this page Feb 25, 2026
·
1 revision
-
AuthMiddleware: Bearer token (MACARON_API_KEY) - GET endpoints: public
- Mutations (POST/PATCH/DELETE): require valid token
- Nginx: basic auth layer (Azure prod)
- HSTS (Strict-Transport-Security)
- X-Frame-Options: DENY
- Content-Security-Policy
- X-XSS-Protection
- Referrer-Policy: strict-origin-when-cross-origin
-
XSS: Jinja2 autoescaping + CSP
connect-src 'self' -
SQL Injection: Parameterized queries (
?placeholders, zero f-strings) - Prompt Injection: L0 + L1 adversarial guards
-
Secrets: Externalized
~/.config/factory/*.key, chmod 600 -
Docker: Non-root
macaronuser, minimal image
Multi-vendor, multi-stage code review:
- L0: Deterministic checks (test.skip, @ts-ignore, empty catch) → VETO
- L1: LLM semantic (slop, hallucination, logic errors) → VETO
- L2: Architecture (RBAC, validation, API design) → VETO + ESCALATION
- Rule: "Code writers cannot declare their own success"
- Retry: 5 attempts max → FAILED
- PostgreSQL-backed per-IP + per-token
- Survives container restart
- Configurable:
LLM_RATE_LIMIT_RPM=50