Uh oh!
There was an error while loading. Please reload this page.
fix(csp): allow https images in markdown preview and html sandbox - #4394
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview This replaces the previous hardcoded Reviewed by Cursor Bugbot for commit 4c08519. Configure here. |
Greptile SummaryThis PR simplifies the Confidence Score: 5/5Safe to merge — the csp.ts changes are coherent and the intentional policy broadening is well-scoped to img-src only. Single file changed, no logic errors or dead variables introduced. The https: wildcard for img-src is a deliberate and documented trade-off; connect-src, script-src, and all other directives remain unchanged and tight. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Browser requests image] --> B{img-src CSP check}
B -- "Before: domain allowlist" --> C["'self' data: blob:\nhttps://*.googleusercontent.com\nhttps://*.s3.amazonaws.com\n... 10+ more domains"]
B -- "After: https wildcard" --> D["'self' data: blob: https:"]
C --> E{Matches allowlist?}
D --> F{Is HTTPS?}
E -- Yes --> G[Image loads]
E -- No --> H[CSP violation - blocked]
F -- Yes --> G
F -- No --> H
G --> I[Rendered in markdown / app]
Reviews (4): Last reviewed commit: "fix(csp): revert html preview img-src to..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
May 2, 2026
waleedlatif1
commented
May 2, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
May 2, 2026
waleedlatif1
commented
May 2, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
…ect-src none isolation
waleedlatif1
commented
May 2, 2026
waleedlatif1
commented
May 2, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7a18f1f. Configure here.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4c08519. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Type of Change
Testing
Tested manually — external images now render in markdown preview; all 25 CSP unit tests pass
Checklist