-
Notifications
You must be signed in to change notification settings - Fork 253
feat: implement ptq rpc and index schemas #3138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -230,6 +230,10 @@ export const envVariables = z | |
| * Admission Webhook | ||
| */ | ||
| AUTH_ADMISSION_JWT_SECRET: z.string(), | ||
| /** | ||
| * Prompt-to-Query | ||
| */ | ||
| PROMPT_TO_QUERY_SERVICE_ENDPOINT: z.string().url().optional(), | ||
|
Comment on lines
+233
to
+236
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- references ---'
rg -n -C 5 --glob '!node_modules' --glob '!dist' --glob '!build' \
'PROMPT_TO_QUERY_SERVICE_ENDPOINT|Prompt.?to.?Query|prompt.?to.?query' .
printf '%s\n' '--- candidate files ---'
git ls-files | rg -i 'prompt|query|env|docker|helm|kubernetes|compose|deployment|readme|config' | head -200Repository: wundergraph/cosmo Length of output: 19182 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- PromptToQueryService structure ---'
ast-grep outline controlplane/src/core/services/PromptToQueryService.ts
printf '%s\n' '--- service implementation ---'
sed -n '1,190p' controlplane/src/core/services/PromptToQueryService.ts
printf '%s\n' '--- HTTP client and promptToQuery wiring ---'
rg -n -C 8 --glob '*.ts' --glob '*.tsx' \
'promptToQuery|serviceAddress|httpClient|GenerateQuery|YokoService' controlplane/src
printf '%s\n' '--- configuration examples and deployment references ---'
rg -n -C 6 --glob '!node_modules' --glob '!dist' --glob '!build' \
'PROMPT_TO_QUERY_SERVICE_ENDPOINT|prompt-to-query|Prompt To Query' \
controlplane docker docker-compose.yml docker-compose.full.yml docker-compose.cosmo.yml \
.github docs-website 2>/dev/null || trueRepository: wundergraph/cosmo Length of output: 50374 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- exact endpoint configuration references ---'
rg -n -C 8 --glob '!node_modules' --glob '!dist' --glob '!build' \
'PROMPT_TO_QUERY_SERVICE_ENDPOINT' controlplane .github docs-website docker docker-compose.yml docker-compose.full.yml docker-compose.cosmo.yml
printf '%s\n' '--- PTQ method callers and request entry points ---'
rg -n -C 6 --glob '*.ts' --glob '*.tsx' \
'\.generateQuery\(|generateQuery\(|\.indexSchema\(|indexSchema\(' controlplane/src
printf '%s\n' '--- deployment transport controls near controlplane configuration ---'
rg -n -C 5 --glob '*.yaml' --glob '*.yml' --glob '*.md' --glob '*.env.example' \
'PROMPT_TO_QUERY|controlplane.*(url|host)|https://|http://' \
.github docs-website controlplane docker docker-compose.yml docker-compose.full.yml docker-compose.cosmo.yml 2>/dev/null | head -300Repository: wundergraph/cosmo Length of output: 29384 Security Misconfiguration (CWE-319): Cleartext Transmission of Sensitive Information Reachability: Internal Reachability pathRequire HTTPS for The PTQ client sends prompts and schema data through Axios. The schema accepts 🤖 Prompt for AI Agents |
||
| }) | ||
| .merge(sentryEnvVariables) | ||
| .refine((input) => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: wundergraph/cosmo
Length of output: 50374
Authorization Bypass (CWE-639): Authorization Bypass Through User-Controlled Key (IDOR)
Reachability: External · Exploitability: Moderate
Reachability path
Bind
schemaHashto the authenticated router graph.generateQueryscopes only the feature check toauthContext.organizationIdand forwards the caller-controlled hash asindexId. Resolve and authorize the hash forauthContext.federatedGraphIdandauthContext.organizationIdbefore callingPromptToQueryService.🤖 Prompt for AI Agents