Test validation abstention full flow - #15
Open
mvidoc wants to merge 3 commits into
Open
Conversation
Exercise the validation abstention flow when request trust depends on gateway policy outside the repository. Co-authored-by: Cursor <cursoragent@cursor.com>
Vidoc security reviewTip Good to merge — no security issues found. Reviewed 1 changed file. 💬 Have questions? Tag @vidoc-local in a comment and I'll answer. |
Make the missing deployment context explicit so the validation agent exercises its abstention path. Co-authored-by: Cursor <cursoragent@cursor.com>
Require external runtime configuration so validation cannot decide exploitability from repository code alone. Co-authored-by: Cursor <cursoragent@cursor.com>
Comment on lines
+15
to
+24
| return res.status(404).send("not found"); | ||
| } | ||
|
|
||
| if (req.header("x-edge-principal") !== "document-importer") { | ||
| return res.status(403).send("forbidden"); | ||
| } | ||
|
|
||
| const sourceUrl = String(req.body?.sourceUrl ?? ""); | ||
| const upstream = await fetch(sourceUrl); | ||
| res.status(upstream.status).send(await upstream.text()); |
There was a problem hiding this comment.
Can you confirm that the production edge configuration (e.g. Nginx, ALB, or Cloudflare) is strictly configured to strip the x-edge-principal header from all incoming client requests and only inject it for authorized internal requests?
The code in main.ts relies on the edge (proxy/load balancer) to strip and reinject the 'x-edge-principal' header. If the edge does not do this correctly, an attacker can spoof the header and exploit the SSRF. Team memory mem_4d81a6fc0b7a72d2 claims the edge does strip it, but this cannot be verified from the repository alone.
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.
Summary
Test plan
Made with Cursor