Scan your whole stack
From OX Research Newsroom
Are you using camada?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.4.0
camada was last scanned on 24 Nov 2026 at version 0.4.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.4.0 LATEST | 24 Nov 2026 | No rules fired |
| 0.3.0 | 26 Oct 2026 | No rules fired |
| 0.2.7 | 19 Oct 2026 | No rules fired |
| 0.2.6 | 12 Oct 2026 | Not shown |
| 0.2.5 | 9 Oct 2026 | Not shown |
Findings for v0.4.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.4.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
camada for Python: enforces the tenant snapshot inline (your ordered custom rules, then allow,
block, challenge), serves a first-party proof-of-work challenge page and beacon, records the
outcomes your handlers know (track()), and ships wire events in batches off the request path.
One package on PyPI with an ASGI middleware (the first-class tier: it keeps the wire's header
order), a WSGI middleware, and integrations for FastAPI, Django and Flask (the sentry-sdk
model). Fails open by design: a camada outage or bug never 5xxes your app.
Install from PyPI with pip install camada. Python 3.10 or newer (regex is the one runtime
dependency). For local SDK work, install from a sibling checkout with
pip install -e ../camada-python, as camada-python-example does.
# FastAPI / Starlette
from camada.fastapi import CamadaMiddleware
app.add_middleware(CamadaMiddleware) # last, so it runs outermost
# Django — settings.py
MIDDLEWARE = ["camada.django.CamadaMiddleware", *MIDDLEWARE] # first
# Flask
from camada.flask import init_app
init_app(app) # wraps app.wsgi_app, so camada answers before routing
# any ASGI 3 or WSGI app
from camada.asgi import CamadaASGI # application = CamadaASGI(application)
from camada.wsgi import CamadaWSGI # application = CamadaWSGI(application)
Env (the key is printed once when you create a project in the app):
CAMADA_KEY=<ingest_token>.<snap_token>
CAMADA_INGEST_URL=http://localhost:8787 # dev only; defaults to production ingest
The integrations share one lazy engine built from the environment on the first request. That
build starts the snapshot poll on a thread and never blocks, so the request that triggered it is
answered cold: it passes (fail open), and so does anything else that arrives before that first
poll lands (a few hundred milliseconds against a local analyst; snapshot-size and network bound).
To enforce from request 1, warm the engine in a startup hook by waiting for the boot poll.
snap.refresh() alone is not it, because the boot poll already holds the single-in-flight lock:
import time
import camada
from camada.snapshot.match import MatchInput
engine = camada.get_default() # builds the engine; the boot poll is already running on its thread
if engine.snap: # None when CAMADA_KEY is unset or CAMADA_DISABLED=1
deadline = time.monotonic() + 5
while engine.snap.verdict(MatchInput(ip="0.0.0.0")).reason == "cold" and time.monotonic() < deadline:
time.sleep(0.01) # bounded: an unreachable analyst leaves it cold, and the app still fails open
snap.refresh() is not the warm-up: the boot poll holds the single-in-flight lock, so a
synchronous refresh() called right after get_default() returns at once and the engine is
still cold.
Without CAMADA_KEY the engine is inert (one log line, no requests, no enforcement). An app that
reads its own config builds the engine itself and hands it in:
from camada import Camada
engine = Camada(env={"CAMADA_KEY": MY_KEY, "CAMADA_INGEST_URL": MY_INGEST})
app.add_middleware(CamadaMiddleware, engine=engine) # init_app(app, engine=engine) for Flask
Keeps the snapshot fresh. A Python server is a long-lived process, so the default is a daemon
poll thread at the cadence your tenant config sets (poll_seconds), with ETag/304 and gzip on
the wire. CAMADA_SERVERLESS=1 switches to a per-request staleness check with no thread. Every
poll and event batch carries x-camada-sdk: @camada/python/<version>, and polls ask for
snapshot v5 (x-camada-snapshot: 5), the container that carries your ordered custom rules.
Resolves the client from the socket peer (REMOTE_ADDR / scope["client"]), combined with
X-Forwarded-For only under your tenant's trusted-proxy config (or CAMADA_TRUSTED_PROXY
locally). A forwarded header on its own is never the ip: any caller can set it. Entries may carry a
port (ip:port, [v6]:port, as Azure Application Gateway writes them) or the ::ffff:a.b.c.d form,
and are trimmed of spaces and tabs only. The resolved ip is always a valid address or none. Under
cidrs (and the Cloudflare option, stored as cidrs) the socket peer must itself be one of the
trusted ranges or a loopback address (a local front end such as App Engine's 127.0.0.1); otherwise
the peer is the client and X-Forwarded-For is ignored, so a direct hit on your origin cannot pick its
own ip. A peer that is not an ip (a socket path, ip:port) could not be read: the ip is then none and
X-Forwarded-For is never walked. Only an empty or absent REMOTE_ADDR / scope["client"] (a
gunicorn, uwsgi or uvicorn listener bound to a unix socket path) means no peer: the walk then runs
over X-Forwarded-For alone and trusts your network edge, so the app must not be reachable around
it. Behind Cloudflare, pick
the Cloudflare option in project settings: CF-Connecting-IP is then read, but only when the hop in front
of the client is one of Cloudflare's published edges, so a direct hit on your origin cannot forge it.
Servers and middleware that rewrite the peer from X-Forwarded-For. camada needs the real socket
peer. Some servers and middleware replace it with an entry from X-Forwarded-For. If they trust every
hop, that is the leftmost entry, which the client wrote. camada then takes that forged value as the
peer, and so as the client ip.
uvicorn: proxy headers are on by default. With FORWARDED_ALLOW_IPS='*' (or
--forwarded-allow-ips '*'), scope["client"] becomes the leftmost X-Forwarded-For entry. Run
with --no-proxy-headers, or restrict forwarded-allow-ips to the address of the proxy in front
of you. Never use *. The default, 127.0.0.1, trusts only a local proxy.
werkzeug ProxyFix (Flask): apply it before camada.flask.init_app(app), so camada wraps
outside it and reads REMOTE_ADDR before ProxyFix rewrites it. Your app still sees the rewritten
address.
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1)
camada.flask.init_app(app) # last: camada is outermost
Enforces before anything else, beacon endpoints included: your ordered custom rules first (first
match wins; they read ip, path, user-agent and request headers), then allow → block → challenge.
A block answers 403 Forbidden with x-block-reason, x-block-version and, when a rule
decided, x-block-rule; its event ships with blk (and rl). A warn rule passes and stamps
wrn; a skip rule passes with nothing stamped. Cold (no snapshot yet) passes: fail open.
Challenge: a challenge verdict gets the self-contained proof-of-work page on a page load. Any other
request passes to your app signalled: x-camada-challenge: 1, cache-control: no-store and the CDN cache headers (replacing
yours) and chs: 1 on its event, which ships whatever sample and exclude say; POST /__camada/challenge verifies the solution, sets _cch (bound to the
ip, one hour) and 302s back. A request whose ip cannot be resolved is never challenged. The page
carries its own Content-Security-Policy (its inline solver and style by hash, nothing else)
and replaces any policy your app or middleware set on it, so a strict site CSP cannot block it.
Serves the beacon: GET /_cam/b.js (the @camada/browser build, vendored) and POST /_cam/fp
(≤ 32 KB, relayed onto the event batch as a sig: 1 row with the ip camada resolved). Both
fall through to your app when the tenant switched the beacon off.
Runs your app with x-rid and the _sfp session cookie on its response, and when the response
is done ships one redacted event: method, host, path, scrubbed query (and Referer query and
fragment), status, latency, header
names/sizes/order, the auth scheme (never the credential), cookie count (never values). An
exception in your app ships as st: 500 and propagates unchanged.
Camada(...) keyword arguments; everything credential-shaped comes from the environment.
| option | default | meaning |
|---|---|---|
env |
os.environ |
where CAMADA_* are read from |
transport |
urllib | the HTTP callable that reaches the analyst (tests inject a fake) |
refresh_s |
server-steered | poll cadence; set, it is pinned |
challenge |
True |
serve the proof-of-work page for challenge verdicts (CAMADA_CHALLENGE=0 too) |
challenge_path |
/__camada/challenge |
where the page posts its solution |
snapshot_version |
5 |
4 drops your custom rules; 3 the allow/challenge sides too |
script_path / fp_path |
/_cam/b.js / /_cam/fp |
the beacon endpoints; keep them in one directory |
token_hash |
None |
enable credential hashing with True, override the environment with False |
token_header |
None |
optional header to try before Authorization |
Env: CAMADA_KEY (or CAMADA_TOKEN + CAMADA_SNAPSHOT_TOKEN), CAMADA_INGEST_URL,
CAMADA_SNAPSHOT_URL, CAMADA_TRUSTED_PROXY (none | vercel | hops:N | cidrs:a,b),
CAMADA_SERVERLESS=1, CAMADA_CHALLENGE=0, and the kill switch CAMADA_DISABLED=1 (checked per
request; set at boot, no threads start at all).
Set token_hash=True or leave it unset and set CAMADA_TOKEN_HASH=1 to enable
credential hashing. Set token_header to a dedicated API-key header name, or
use CAMADA_TOKEN_HEADER when the option is unset or empty. The SDK tries
that header first and falls back to Authorization when it finds no usable
credential there.
The SDK ships tk on request rows as a 32-character lowercase hex
HMAC-SHA256 digest of the credential, keyed by the ingest token. The
credential value stays in your app. When hashing is off or no hash can be
computed, the row omits tk. Enable it only for random tokens or API keys.
Keep it off for human passwords sent over Basic authentication.
With Apache mod_wsgi, set WSGIPassAuthorization On to expose
Authorization to the SDK.
from camada.fastapi import script_tag # camada.django: script_tag(request); camada.flask: script_tag()
return HTMLResponse(f"<html><head>{script_tag(request)}</head>…")
The tag is <script src="/_cam/b.js?r=<rid>" async>, so the beacon joins the page view that
served it. Move both paths with script_path / fp_path when /_cam/ is not yours; the script
derives the post path from its own URL, so the two must share a directory.
The SDK vendors a tagged @camada/browser release, never a build of camada-browser main. CI reads
the version from BEACON_VERSION in src/camada/beacon_js.py, checks out camada-browser at
v<version>, builds it and compares it byte for byte with the vendored copy, so beacon changes on
main cannot turn this CI red. To take a new beacon, re-sync from its release tag (see the testing
notes below) and commit; the version bump moves CI to the new tag.
from camada.fastapi import track # camada.django: track(request, ...); camada.flask: track(event, user=...)
track(request, "login_failed", user=email)
The identifier is HMAC-hashed in-process with your ingest token; the raw value never reaches the
queue. track() never raises. Outside the middleware (a request it did not run for) the outcome
still ships, with no rid/sid/ip to join on, and it builds the default engine from the
environment if nothing has yet. The event name is free-form; the analyst's app-context rules read
this vocabulary:
| event | when |
|---|---|
login_failed / login_succeeded |
a login attempt settled; pass user= so attempts per account can be counted |
signup |
an account was created |
password_reset |
a reset was requested |
mfa_failed |
a second factor was rejected |
payment_failed / payment_succeeded |
a payment authorisation settled |
coupon_failed |
a promo/voucher code was rejected |
A route you gate yourself: serve_challenge(request) (Flask: serve_challenge()) returns the
page as a framework response to return from the handler until the browser holds a valid _cch,
then None. A non-page (non-HTML) request also gets None and is signalled
(x-camada-challenge: 1, no-store, chs: 1).
sdk-python is an in-app tap: status, latency, session, the beacon's browser signals and your
outcomes. Under ASGI the event also carries the wire's header order (hord); WSGI's environ
loses it, which is why ASGI is the first-class tier. camada resolves ASN and country itself. Enforcement at this position covers ip, path, user-agent and
header conditions: ASN, country and TLS entries fail open in-app. matches patterns are JS
regexes read by Python's re (named groups, [^] and \cX are translated, \d/\w/\b stay
ASCII); a spelling re still rejects never matches here, while it does at the edge. An astral
character (an emoji, say) is one character here and two UTF-16 units at the edge, so a pattern
that counts characters around one (^.$, .{2}, [^a], \S) or puts one in a class or before
a quantifier can disagree; .* and a bare emoji agree. A path regex is case-insensitive, but only ASCII
letters fold here (regex.ASCII keeps \d/\w/\b as JS reads them), so /é$ does not match /É
where JS /i does. This is an accepted gap (camada-all-6oof).
poll_seconds keeps the cadence honest across a fleet.--preload or uWSGI the SDK notices the fork
(os.register_at_fork) and restarts its poll and flush threads in each worker.CAMADA_SERVERLESS=1. A cold invocation fails open and catches up on the next one.Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.