Security Review
Use this skill when reviewing or planning code that touches a security-sensitive
surface in Langfuse. It collects the recurring findings the team has seen in
external security reports so that future agents catch them at design and review
time rather than after the fact.
When to Apply
Apply this skill when the change touches any of:
- a user-supplied URL, host, endpoint,
baseURL, or webhook target
- a new outbound HTTP request (
fetch, axios, AWS SDK client init with a
custom endpoint, OpenAI/Anthropic/Bedrock client init with a custom
baseURL, etc.)
- a new integration form under Settings -> Integrations or any
admin-configurable network destination
- a new tRPC procedure or public API route that mutates project-scoped data or
changes who can access it
- secrets, API keys, signing secrets, or encryption-at-rest fields
- redirect-following or cross-origin header handling
- file uploads, image proxies, or other binary data flowing in or out
- product analytics, browser monitoring, session replay, or another client-side
telemetry path that can transmit customer-controlled content
Apply this skill during plan mode when designing a new integration so the
correct validation surfaces land in the plan, not in a follow-up CVE.
How to Read This Skill
- Open references/checklist.md and run the mental
sweep against the change.
- For each bullet that fires, open the matching topic reference.
| Topic |
Open when |
File |
| SSRF and outbound URL validation |
The change accepts or fetches a user-supplied URL, host, or endpoint |
references/outbound-url-validation.md |
| Secret read paths |
The change shapes what a read route returns for an entity or config blob that also stores a credential |
references/secret-read-paths.md |
| Client telemetry and session replay |
The change records DOM, browser state, events, logs, or network data in a third-party system |
references/client-telemetry-privacy.md |
The catalog is intentionally short today. New topic files are added as new
finding classes recur (see "Extending This Skill").
Output Expectations (Review Mode)
When this skill is used during code review:
- List findings first, ordered by severity, with file and line references.
- For each finding, name the canonical helper or known-good call site the
author should copy.
- For SSRF-class findings, point at references/outbound-url-validation.md
rather than re-deriving the fix.
- Call out missing negative tests (private-IP, cross-tenant, missing-scope)
as findings, not as nice-to-haves.
Output Expectations (Design / Plan Mode)
When this skill is used while planning:
- Restate which surfaces the new feature exposes (forms, public API routes,
worker entrypoints).
- For each surface that matches a checklist trigger, name the validator or
helper that must be invoked and at which layer (save-time, use-time,
connection-time, redirect-time).
- Treat "we will validate later" as a design defect: validation belongs in the
same change that introduces the surface.
Extending This Skill
Add a new references/<topic>.md whenever a security finding recurs across
features or PR reviews. Keep each reference narrow and concrete:
- Threat in plain language (one paragraph).
- Canonical helpers in this repo, with paths.
- Known-good call sites that can be copied.
- Required defenses (save-time, use-time, transport-time, etc.).
- Anti-patterns to flag in review.
Then add a one-line trigger to references/checklist.md
pointing at the new topic file, and add a row to the table above.
Candidates for future references (do not add until a real finding recurs):
- Tenant isolation (
projectId filters across Prisma and ClickHouse)
- Redirect mishandling and sensitive-header propagation
- File upload validation and content-type sniffing
- RBAC scope drift on new tRPC/public API endpoints
- Signed URL scoping (expiry, path, method)
- Public API rate limiting and auth boundary checks
Integration With Other Skills
- The shared
code-review skill should defer here for any change that matches
the triggers above; see code-review/SKILL.md.
- The shared
backend-dev-guidelines skill should defer here when adding
outbound HTTP, integration config, or URL-accepting procedures; see
backend-dev-guidelines/SKILL.md.
- Confirmed issues with reproduction evidence go through
linear-bug-triage
for Linear handoff.
1---2name: security-review3description: Review Langfuse changes for SSRF, tenant isolation, secret handling, unsafe redirects or uploads, RBAC drift, and client telemetry privacy. Use when a design or change accepts URLs or host fields, handles secrets or cross-tenant data, makes outbound requests, adds an integration, follows redirects, widens permissions, or can send customer-controlled UI data through analytics, monitoring, or session replay.4---5
6# Security Review
7
8Use this skill when reviewing or planning code that touches a security-sensitive
9surface in Langfuse. It collects the recurring findings the team has seen in
10external security reports so that future agents catch them at design and review
11time rather than after the fact.
12
13## When to Apply
14
15Apply this skill when the change touches any of:
16
17- a user-supplied URL, host, endpoint, `baseURL`, or webhook target
18- a new outbound HTTP request (`fetch`, `axios`, AWS SDK client init with a
19 custom `endpoint`, OpenAI/Anthropic/Bedrock client init with a custom
20 `baseURL`, etc.)
21- a new integration form under Settings -> Integrations or any
22 admin-configurable network destination
23- a new tRPC procedure or public API route that mutates project-scoped data or
24 changes who can access it
25- secrets, API keys, signing secrets, or encryption-at-rest fields
26- redirect-following or cross-origin header handling
27- file uploads, image proxies, or other binary data flowing in or out
28- product analytics, browser monitoring, session replay, or another client-side
29 telemetry path that can transmit customer-controlled content
30
31Apply this skill during **plan mode** when designing a new integration so the
32correct validation surfaces land in the plan, not in a follow-up CVE.
33
34## How to Read This Skill
35
361. Open [references/checklist.md](references/checklist.md) and run the mental
37 sweep against the change.
382. For each bullet that fires, open the matching topic reference.
39
40| Topic | Open when | File |
41| ----------------------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
42| SSRF and outbound URL validation | The change accepts or fetches a user-supplied URL, host, or endpoint | [references/outbound-url-validation.md](references/outbound-url-validation.md) |
43| Secret read paths | The change shapes what a read route returns for an entity or config blob that also stores a credential | [references/secret-read-paths.md](references/secret-read-paths.md) |
44| Client telemetry and session replay | The change records DOM, browser state, events, logs, or network data in a third-party system | [references/client-telemetry-privacy.md](references/client-telemetry-privacy.md) |
45
46The catalog is intentionally short today. New topic files are added as new
47finding classes recur (see "Extending This Skill").
48
49## Output Expectations (Review Mode)
50
51When this skill is used during code review:
52
53- List findings first, ordered by severity, with file and line references.
54- For each finding, name the canonical helper or known-good call site the
55 author should copy.
56- For SSRF-class findings, point at [references/outbound-url-validation.md](references/outbound-url-validation.md)
57 rather than re-deriving the fix.
58- Call out missing **negative tests** (private-IP, cross-tenant, missing-scope)
59 as findings, not as nice-to-haves.
60
61## Output Expectations (Design / Plan Mode)
62
63When this skill is used while planning:
64
65- Restate which surfaces the new feature exposes (forms, public API routes,
66 worker entrypoints).
67- For each surface that matches a checklist trigger, name the validator or
68 helper that must be invoked and at which layer (save-time, use-time,
69 connection-time, redirect-time).
70- Treat "we will validate later" as a design defect: validation belongs in the
71 same change that introduces the surface.
72
73## Extending This Skill
74
75Add a new `references/<topic>.md` whenever a security finding recurs across
76features or PR reviews. Keep each reference narrow and concrete:
77
781. Threat in plain language (one paragraph).
792. Canonical helpers in this repo, with paths.
803. Known-good call sites that can be copied.
814. Required defenses (save-time, use-time, transport-time, etc.).
825. Anti-patterns to flag in review.
83
84Then add a one-line trigger to [references/checklist.md](references/checklist.md)
85pointing at the new topic file, and add a row to the table above.
86
87Candidates for future references (do not add until a real finding recurs):
88
89- Tenant isolation (`projectId` filters across Prisma and ClickHouse)
90- Redirect mishandling and sensitive-header propagation
91- File upload validation and content-type sniffing
92- RBAC scope drift on new tRPC/public API endpoints
93- Signed URL scoping (expiry, path, method)
94- Public API rate limiting and auth boundary checks
95
96## Integration With Other Skills
97
98- The shared `code-review` skill should defer here for any change that matches
99 the triggers above; see [code-review/SKILL.md](../code-review/SKILL.md).
100- The shared `backend-dev-guidelines` skill should defer here when adding
101 outbound HTTP, integration config, or URL-accepting procedures; see
102 [backend-dev-guidelines/SKILL.md](../backend-dev-guidelines/SKILL.md).
103- Confirmed issues with reproduction evidence go through `linear-bug-triage`
104 for Linear handoff.