Title: fix(custom-blocks): restrict iconUrl to https or internal serve paths by TheodoreSpeaks · Pull Request #5613 · simstudioai/sim · GitHub
Open Graph Title: fix(custom-blocks): restrict iconUrl to https or internal serve paths by TheodoreSpeaks · Pull Request #5613 · simstudioai/sim
X Title: fix(custom-blocks): restrict iconUrl to https or internal serve paths by TheodoreSpeaks · Pull Request #5613 · simstudioai/sim
Description: Summary
follow-up to #5532 (merged before this landed): iconUrl on 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 sources
same check in the copilot deploy_custom_block handler's pass-through branch (workspace files/... ingestion already validated type/size)
addresses the P2 review finding; the underlying exposure predates the tool (REST accepted arbitrary strings) and was advisory-only in practice (img@src is a non-scripting sink, CSP already allows data:), so this is hardening, not an exploit fix
Companion: simstudioai/mothership#350
Type of Change
Bug fix
Testing
32 handler tests incl. new scheme rejection/acceptance cases; lint and check:api-validation:strict pass.
Checklist
Code follows project style guidelines
Self-reviewed my changes
Tests added/updated and passing
No new warnings introduced
I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary follow-up to #5532 (merged before this landed): iconUrl on the custom-block publish/update contracts now accepts only https URLs or internal /api/files/serve/ paths — no data:/blob:/other ...
X Description: Summary follow-up to #5532 (merged before this landed): iconUrl on the custom-block publish/update contracts now accepts only https URLs or internal /api/files/serve/ paths — no data:/blob:/other ...
Opengraph URL: https://github.com/simstudioai/sim/pull/5613
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:102a786a-1838-ae26-b8e2-7eaf6e64a7e3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 89AA:266203:2B44EB:3B0652:6A6397AA |
| html-safe-nonce | f6c07198995979b4477e231d18538b98b8f36da2820017aa7ec1964471a4672b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUFBOjI2NjIwMzoyQjQ0RUI6M0IwNjUyOjZBNjM5N0FBIiwidmlzaXRvcl9pZCI6IjQ1MTY2MjY3OTMyNDUxNTMxOTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | eb770d6a85396220701091ff108b898aeb584560f9cd565ea933ef844ad0ba2b |
| hovercard-subject-tag | pull_request:4037518896 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5613/files |
| twitter:image | https://avatars.githubusercontent.com/u/19564703?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/19564703?s=400&v=4 |
| og:image:alt | Summary follow-up to #5532 (merged before this landed): iconUrl on the custom-block publish/update contracts now accepts only https URLs or internal /api/files/serve/ paths — no data:/blob:/other ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ca676e17c4da4532dc68541e9fc874034ae840c26b5f34da7f1c42d9a600659 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3a0a9f049e072eb8e5795dfddcefdba9e277501d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width