🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
Security Review Checklist
Run this list mentally on every relevant change. For each bullet, either find that it does not apply, or confirm the listed mitigation is present in the diff. Each bullet links to the topic reference that owns the detail.
User-Supplied URLs and Outbound Requests
Does the change accept a URL, host,
endpoint,baseURL, webhook target, or any field that becomes the destination of an outbound HTTP request?- If yes, see outbound-url-validation.md.
- Required: a save-time validator on the mutation/API route and use-time
or connection-time validation when the request is issued, including
redirects. Raw
fetch(userUrl)or SDK init withendpoint: userUrlwithout that wiring is a finding.
Does the change add a new "integration" (Settings -> Integrations, new webhook destination, new storage backend, new LLM provider, new image proxy) that lets an admin configure a host?
- If yes, see outbound-url-validation.md.
- Required: new env-driven allowlist trio (host / IPs / IP segments) for self-hosted, plus strict Cloud enforcement.
Does the change follow redirects on a user-controlled URL with plain
fetch()?- If yes, see outbound-url-validation.md
(Redirect Handling). Required:
fetchWithSecureRedirectswith the matching validator.
- If yes, see outbound-url-validation.md
(Redirect Handling). Required:
Tenant Isolation
- Does every new Prisma query on a project-scoped table include
projectIdin thewhereclause? - Does every new ClickHouse query on a project-scoped table include
project_id = {projectId: String}? - Does every new tRPC procedure use
protectedProjectProcedure(or equivalent) and callthrowIfNoProjectAccesswith the right scope? - Does every new public API route go through
withMiddlewares+createAuthedProjectAPIRoute(or the equivalent organization variant) with the right scope?
These are enforced today by the repo-wide review checklist in ../../code-review/references/review-checklist.md; restate them here so the security sweep stays self-contained.
Secrets and Credentials
Are new secrets stored encrypted at rest (e.g. via
encrypt/decryptfrom@langfuse/shared/encryption) and never returned throughget/list endpoints?Are secrets omitted from API responses (
select/omitin Prisma) and from logs?Are new env vars added to
.env*.examplefiles and validated via the packageenv.mjs/ts, not read fromprocess.envdirectly?Does the change add a field to a config blob or entity that a read route returns, or add a branch to a converter that shapes such a response?
- If yes, see secret-read-paths.md.
- Required: one shared converter for every read route and mutation
response, exhaustive dispatch over the type union (
neverdefault), an allowlist-built result, and a read-path negative test as VIEWER. A catch-all branch that returns the stored value for "other types" is a finding, as isas Safe*in place of a sanitizer.
Audit Logging
- Do sensitive mutations (integration config changes, role or scope changes,
exports, deletions) emit
auditLogwith the rightactionandresourceType? Match existing wiring inweb/src/features/blobstorage-integration/blobstorage-integration-router.tsand similar routers.
Client Telemetry and Session Replay
- Can analytics, browser monitoring, replay, logs, or network capture transmit
customer-controlled values or identifiers to a third party?
- If yes, see client-telemetry-privacy.md. Required: an explicit data boundary, deployment/compliance allowlisting, protection at shared render boundaries including portals and attributes, negative tests, and inspection of the emitted payload.
Negative Tests
- Does the change include tests that prove blocked inputs are rejected (private IPs, cross-tenant IDs, missing scope, http: on Cloud)? Missing negative coverage on a security-sensitive surface is a finding.
Extending
When a new finding class starts to recur in PR reviews or security reports,
add a one-line bullet here pointing at a new references/<topic>.md. Do not
restate the detail in this checklist; keep it as the trigger surface.