Repository navigation
Scope Tinybird tokens per tenant and close SSRF in AI routes - #53
Merged
Merged
Conversation
- Don't sign a JWT for users without an org (empty org read every org) - In multi-tenant mode, give logged-out users no shared read token - Allowlist x-custom-tinybird-api-url to Tinybird API hosts - Never send the server token to a caller-chosen URL - Log llm_events with a new append-only TINYBIRD_EVENTS_TOKEN, not the admin token - Remove token and session logging from middleware - Add input caps and a per-IP rate limit to the AI routes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tinybird flags it as no longer needed: the current schema is compatible with the live one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the open code-scan findings for this repo.
What changes
High
organization: '', which the pipes treat as no filter. They now get no JWT and are treated like logged-out visitors.read_pipesin multi-tenant mode. WhenTINYBIRD_JWT_SECRETis set, logged-out users get nox-tinybird-token. Without it (single-tenant mode), everyone gets the read token and no JWT is signed, since there is no secret to sign it with. The?token=bring-your-own-token flow is unchanged.Medium
x-custom-tinybird-api-urlmust matchhttps://api.*.tinybird.co(plus localhost outside production). Otherwise the AI routes return 400.Low
extract-cost-parametersonly uses the env token with the env URL.llm_eventswrites. The AI routes now use a newTINYBIRD_EVENTS_TOKEN(append-only,llm_events_append, defined inllm_events.datasource). If it isn't set, logging is skipped. There is no fallback to the admin token. The onboarding snippet is updated too.debuggerstatements.live)ai-analytics-template, removeTINYBIRD_JWT_SECRETbefore merging. Otherwise the public demo shows an empty dashboard to logged-out visitors.llm_events_appendtoken.TINYBIRD_EVENTS_TOKENin Vercel to that token and redeploy.Checks
npm run lintpasses (4 existing warnings in untouched files).npm run buildpasses.🤖 Generated with Claude Code