fix(custom-blocks): restrict iconUrl to https or internal serve paths#5613
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
PR SummaryLow Risk Overview A shared Tests cover rejection of Reviewed by Cursor Bugbot for commit 912bdf2. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR tightens custom-block icon URL validation. The main changes are:
Confidence Score: 5/5This looks safe to merge after a small tool-contract cleanup.
apps/sim/lib/copilot/tools/handlers/deployment/custom-block.ts Important Files Changed
Reviews (1): Last reviewed commit: "fix(custom-blocks): restrict iconUrl to ..." | Re-trigger Greptile |
Summary
iconUrlon the custom-block publish/update contracts now accepts only https URLs or internal/api/files/serve/paths — no data:/blob:/other schemes in org-wide block metadata rendered as<img>sourcesdeploy_custom_blockhandler's pass-through branch (workspacefiles/...ingestion already validated type/size)Companion: simstudioai/mothership#350
Type of Change
Testing
32 handler tests incl. new scheme rejection/acceptance cases; lint and check:api-validation:strict pass.
Checklist