René's URL Explorer Experiment


Title: fix(security): harden glob matching, archive parsing, redaction and media handling by waleedlatif1 · Pull Request #6030 · simstudioai/sim · GitHub

Open Graph Title: fix(security): harden glob matching, archive parsing, redaction and media handling by waleedlatif1 · Pull Request #6030 · simstudioai/sim

X Title: fix(security): harden glob matching, archive parsing, redaction and media handling by waleedlatif1 · Pull Request #6030 · simstudioai/sim

Description: Summary Security hardening split out of #6013 so it can be reviewed and merged on test evidence alone. No dependency changes — every fix stands on staging's existing re2js and tldts. Glob matching (copilot VFS) — match with RE2 instead of micromatch's backtracking engine. The translation layer is hand-written, so it also rejects what RE2 would read differently: picomatch passes a user's \A/\z/\p{L} through verbatim and RE2 reads those as anchors and Unicode classes, which made \A**/** select every path and let \p{Any} consume the segment markers that encode the dot:false guarantee. Class ranges straddling the marker block are rejected for the same reason. Archive parsing — the EOCD scan now covers the whole buffer. JSZip and SheetJS scan to offset 0 while only yauzl honours the spec's trailing window, so a single prepended byte plus 64 KiB of junk hid a 495x bomb. A resolvable-but-empty central directory is now unverifiable rather than fail-open, and scanning is bounded by a shared record budget. Stray EOCD byte sequences in non-ZIP documents stay a no-op so the OLE2 and plaintext fallbacks still run. Redaction — fixes quadratic acronym-boundary backtracking (73s → 1ms at 400k chars) and catches plural, value-suffixed, and one-shot locator keys. Other — YAML alias-expansion guard in the JSON/YAML chunker; fal.ai queue polling pinned to its origin with a capped body; ffmpeg drawtext values passed via file instead of the filtergraph; redirects resolved against the registrable domain with credential headers dropped across sites; file-preview error boundary retries instead of latching. Type of Change Bug fix Testing 2,837 tests pass across 162 files; tsc, biome and check:api-validation clean. Every security fix is pinned by a test proven to fail against the pre-fix code — the guards were verified by constructing working exploits, not by inspection. Two vacuous tests found during that process (one passed with the guard call deleted) were rewritten to discriminate. 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 Security hardening split out of #6013 so it can be reviewed and merged on test evidence alone. No dependency changes — every fix stands on staging's existing re2js and tldts. Glob matc...

X Description: Summary Security hardening split out of #6013 so it can be reviewed and merged on test evidence alone. No dependency changes — every fix stands on staging's existing re2js and tldts. Glob ...

Opengraph URL: https://github.com/simstudioai/sim/pull/6030

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:21689505-9a70-55e3-6def-822030652115
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC478:F0D9C:93D13:D129E:6AFB4573
html-safe-noncec6f1735c85e6b7485a38ed02fad8e87c29667f23a2cd10ec44eaae75e2663193
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDc4OkYwRDlDOjkzRDEzOkQxMjlFOjZBRkI0NTczIiwidmlzaXRvcl9pZCI6IjgyMDY1NzU4ODAzNTcyMzQwMzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9c668aa5927379fa0d44858bf9558eba8e28da79bd7d1a375376461d07c206e5
hovercard-subject-tagpull_request:4156005648
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6030/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Security hardening split out of #6013 so it can be reviewed and merged on test evidence alone. No dependency changes — every fix stands on staging's existing re2js and tldts. Glob matc...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6030/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6030%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6030%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6030/files
Reloadhttps://github.com/simstudioai/sim/pull/6030/files
Reloadhttps://github.com/simstudioai/sim/pull/6030/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests199 (199)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
security-hardeninghttps://github.com/simstudioai/sim/tree/security-hardening
Conversation 5 https://github.com/simstudioai/sim/pull/6030
Commits 1 https://github.com/simstudioai/sim/pull/6030/commits
Checks 19 https://github.com/simstudioai/sim/pull/6030/checks
Files changed https://github.com/simstudioai/sim/pull/6030/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6030/files
fix(security): harden glob matching, archive parsing, redaction and media handling https://github.com/simstudioai/sim/pull/6030/files#top
Show all changes 1 commit https://github.com/simstudioai/sim/pull/6030/files
34ff739 fix(security): harden glob matching, archive parsing, redaction and m… waleedlatif1 Jul 28, 2026 https://github.com/simstudioai/sim/pull/6030/commits/34ff739d653f37e46ab5b15daaa4ad6bec69d30f
Clear filters https://github.com/simstudioai/sim/pull/6030/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6030/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6030/files
route.ts https://github.com/simstudioai/sim/pull/6030/files#diff-b9a5bdd12d50013cd1000ab2df913b85491a1309d44811acc15e86cae01b8ed4
route.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-51d787fcbf919986678a615a6fd6ee9940b0337a5e5a99ec4b1fcbd76d68b824
route.ts https://github.com/simstudioai/sim/pull/6030/files#diff-7dd35e6df1faa7042be0b6447db05bd30976793e4595023fa6ea06e5a896d7ea
file-viewer.tsx https://github.com/simstudioai/sim/pull/6030/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
preview-shared.test.tsx https://github.com/simstudioai/sim/pull/6030/files#diff-f49e02f1557a079e3a42a9a1cfa3e6dda8fcd3c4b0f75d6f57a6866931ce96d3
preview-shared.tsx https://github.com/simstudioai/sim/pull/6030/files#diff-b9f27b1882b6b0a833b1e4fc4b81f9b1a34f6df9cca678980fdc767c1bd4807f
loop.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-2967459b5bb42c2319e5515b3aeccdcbb93f42824e35c5623cc1bd1591061d8d
loop.ts https://github.com/simstudioai/sim/pull/6030/files#diff-112bfce09777d1c73cccd2a5bf9870750f5d7e380332c8af3cdc0fbccc21e98f
json-yaml-chunker.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-5a7b642e155f67d0b9fdc470a12a5ddb39574a63f2bc77d701dbd8af14b03c73
json-yaml-chunker.ts https://github.com/simstudioai/sim/pull/6030/files#diff-d48559e3b932828168d549e929266ed45803ec682ca11013609292f26b248db5
vfs.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-647d6c8e56d7d16b2aaccdbcb1e31ecb122ce72195e2f7bfd52e02a45ebab3d7
vfs.ts https://github.com/simstudioai/sim/pull/6030/files#diff-c7e07b2123ef85e28f2ccdcb848fdf71ba061ef32bdc805e25d3101188796bf6
document-style.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-88c471d4148ec501ee91d844d98b92814b2f7e7c6a0154120267fc1434cf6bc4
document-style.ts https://github.com/simstudioai/sim/pull/6030/files#diff-b28c1694febda74c30953986607f7b7eec56e192728f57eab7d890fd8ec612be
operations.glob-semantics.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-eb040c293cff710904bdd651cc97ae9b1be3ad2d84dc545abe699b1d8e0d4d44
operations.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-3388b10cebb367c28ccc299787f3edea1cf1eacc061588e0e001ed8a232cefff
operations.ts https://github.com/simstudioai/sim/pull/6030/files#diff-ef1926568df87416883c211a18478c8799e3700f76a9f87d671709fdbb7a851b
input-validation.server.ts https://github.com/simstudioai/sim/pull/6030/files#diff-6aff011dd9656fc3e2283ce7a33580a51622749a977dcacb0b75050284426798
redaction.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-f3b18986571adb4d1269549a7ba12e1ca9ba6d212e6be8f21d08ebb7ba5ddf63
redaction.ts https://github.com/simstudioai/sim/pull/6030/files#diff-0d2ebc88b5841088f3ee5384ed4d041c41c3abe142273a3844c3bb2488093bc7
secure-fetch-redirect.server.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-07e221308bb4ee1872121b9373479770395a3f5b72cee9e0f17a75eb00c14f12
doc-parser.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-636baec61c335570e8c4c131648286c2870368751f2cdf0a73b59d057ccf4a42
doc-parser.ts https://github.com/simstudioai/sim/pull/6030/files#diff-cdfc927b24e9d2666bd93713a077b86bbded2c33e752f1a6f298e0fcf5c48032
xlsx-parser.ts https://github.com/simstudioai/sim/pull/6030/files#diff-2d008d967e1c9e51820d451dcb43f90f82ce8dab768a3a3db8a9afd5594f5bff
zip-guard.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-b8a14e85c6ff70831de6efe4b18e53eb3dd16020b3eed3d7139e6b37fa9a4f51
zip-guard.ts https://github.com/simstudioai/sim/pull/6030/files#diff-82ff22d430d10a3c394c674c4b75b7ba2ce0b74c14e84fdc08ff7b489015b767
falai.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-877f7081cfb1235e890b96aca58d2202e5bfc19b2965140ab15bfd4e624cb60f
falai.ts https://github.com/simstudioai/sim/pull/6030/files#diff-c077a3538059a85cadfbb40e3e8ca623a7ddf7a2a87dce07d59357130ebda678
ffmpeg.test.ts https://github.com/simstudioai/sim/pull/6030/files#diff-84d6454b1747ffe231fb651f9c2f250ca9c9ffca1b44c177c5c5930d7f68bc1e
ffmpeg.ts https://github.com/simstudioai/sim/pull/6030/files#diff-4cb239d09c65948f5097877c0984c0a2063556969163ff7c4316dd2de35ca7a9
apps/sim/app/api/tools/onedrive/upload/route.tshttps://github.com/simstudioai/sim/pull/6030/files#diff-b9a5bdd12d50013cd1000ab2df913b85491a1309d44811acc15e86cae01b8ed4
View file https://github.com/simstudioai/sim/blob/34ff739d653f37e46ab5b15daaa4ad6bec69d30f/apps/sim/app/api/tools/onedrive/upload/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6030/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6030/files#diff-b9a5bdd12d50013cd1000ab2df913b85491a1309d44811acc15e86cae01b8ed4
apps/sim/app/api/tools/video/route.test.tshttps://github.com/simstudioai/sim/pull/6030/files#diff-51d787fcbf919986678a615a6fd6ee9940b0337a5e5a99ec4b1fcbd76d68b824
View file https://github.com/simstudioai/sim/blob/34ff739d653f37e46ab5b15daaa4ad6bec69d30f/apps/sim/app/api/tools/video/route.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6030/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/6030/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6030/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.