René's URL Explorer Experiment


Title: fix(condition): stop a secret value from breaking or forging a condition by icecrasher321 · Pull Request #6705 · simstudioai/sim · GitHub

Open Graph Title: fix(condition): stop a secret value from breaking or forging a condition by icecrasher321 · Pull Request #6705 · simstudioai/sim

X Title: fix(condition): stop a secret value from breaking or forging a condition by icecrasher321 · Pull Request #6705 · simstudioai/sim

Description: Problem Condition expressions pasted every environment variable value into the expression as source. Block references in the same expression go through a proper escape (\, ', \n, \r, U+2028/9) and get quoted — env vars went through neither. Verified against the real resolver: Expression Resolved to Result === 'hello world' 'hello world' === 'hello world' ✅ true {{NAME}} === 'hello world' hello world === 'hello world' ❌ SyntaxError '{{NAME}}' === 'bob', NAME=O'Brien 'O'Brien' === 'bob' ❌ SyntaxError '{{NAME}}' === 'bob', NAME=x' || true || ' 'x' || true || '' === 'bob' ❌ true — forged {{N}} === 123, N='123' 123 === 123 ✅ true Three defects: a bare string placeholder is a SyntaxError (so the form the Function block docs recommend can't be used here at all); an apostrophe or newline in a legitimate value fails the run; and the quoted form lets a secret value forge a true branch out of a comparison that should be false. Fix Inline only structurally inert literals — numbers, booleans, null, with optional space/tab padding. Every other value keeps its {{NAME}} placeholder and is bound as a string by compileCodePlaceholders, the same execution-boundary compiler Function blocks and Custom Tools already use. No change to the shared compiler, no new flag through the tool/route/contract. The whole implementation is one predicate plus a two-line call-site change in the condition-only resolution path (resolveTemplateWithoutConditionFormatting, which has exactly one caller). Every character the predicate admits is inert in both places a placeholder can land: in expression position none introduces an operator or comment, and inside a string literal none terminates it. Line terminators are excluded — a raw newline would break a single-quoted string. Nothing breaks Full apps/sim suite: 25,076 passed, 0 failures. Type-check and Biome clean, check:api-validation passes. The legacy outcomes are preserved, and there's a new test that proves it end to end — resolver → compiler → the same Boolean(...) wrapper condition-handler.ts builds: {{COUNT}} === 3 → still true (inlined literal, unchanged) {{ENABLED}} === true → still true (inlined literal, unchanged) "Bearer {{API_KEY}}" === "Bearer token" → still true, now via compiled concatenation instead of a pasted value null, negative, and exponent values all still compare as literals Padding is admitted rather than trimmed so the inlined text stays byte-identical to the stored value — whitespace is meaningless bare but significant inside quotes, and only the untrimmed value is correct in both. Env var values aren't trimmed on save, so this is reachable; covered by a test. The 4 new tests were confirmed to fail against the old behavior and pass against the new. The end-to-end outcomes test passes under both, which is the point — it's the regression guard. The one deliberate behavior change A value whose text is itself a quoted JS literal — a secret stored as 'foo', a plausible workaround someone may have found for the bare-string SyntaxError — now compares as the 5-character string rather than as source. That form is precisely the injectable one, so it can't be kept. Worth a note in release comms. Also: the placeholder type contract in docs A customer hit a related silent break after the resolver lift in #6247 moved Function blocks from source inlining to value binding. A workspace secret holding a JS array of regex literals started arriving as a 411-character string, their guardrail threw, and requests fell through to a fallback billed on GPT output tokens. That change is correct and stays — it closed arbitrary code execution from a secret value. But the docs described the mechanism ("bound separately from the source") and never the consequence, while function.mdx actively recommends the bare form whose meaning changed. Added the contract and the conversions: {{KEY}} in Function/Custom Tool code always evaluates to a string a bare if ({{FLAG}}) is always true, because "false" is truthy a list must be stored as JSON to parse back into an array Every docs snippet was run through the real compiler before being written down. Test plan bun run test (full apps/sim) — 25,076 passed bun run type-check bunx biome check on changed files bun run check:api-validation New tests verified to fail against pre-fix behavior 🤖 Generated with Claude Code

Open Graph Description: Problem Condition expressions pasted every environment variable value into the expression as source. Block references in the same expression go through a proper escape (\, ', \n, \r, U+2028/9) ...

X Description: Problem Condition expressions pasted every environment variable value into the expression as source. Block references in the same expression go through a proper escape (\, ', \n, \r, U+2028...

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

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:444570bc-84fe-4cec-61a9-2a791d0c19a8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8248:34FC0A:9E0688:D828D3:6AFB4E14
html-safe-nonce06e249de85febbd8d45d1b42cba37fe9160df33cc1479021fdae64b6fd4f1bc7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjQ4OjM0RkMwQTo5RTA2ODg6RDgyOEQzOjZBRkI0RTE0IiwidmlzaXRvcl9pZCI6IjM3OTkwNTE4Nzk2Njk1MTc4NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac867f794df474727babcaad98b1963aff8c8bde4039a7d2950053ecfeb163128a
hovercard-subject-tagpull_request:4282936784
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/6705/files
twitter:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
og:image:altProblem Condition expressions pasted every environment variable value into the expression as source. Block references in the same expression go through a proper escape (\, ', \n, \r, U+2028/9) ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1
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
release26504db649b58525278f77a52b80ba5f10d5f4de
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6705/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6705%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%2F6705%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/6705/files
Reloadhttps://github.com/simstudioai/sim/pull/6705/files
Reloadhttps://github.com/simstudioai/sim/pull/6705/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)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
icecrasher321https://github.com/icecrasher321
staginghttps://github.com/simstudioai/sim/tree/staging
fix/condition-secret-placeholdershttps://github.com/simstudioai/sim/tree/fix/condition-secret-placeholders
Conversation 3 https://github.com/simstudioai/sim/pull/6705
Commits 1 https://github.com/simstudioai/sim/pull/6705/commits
Checks 30 https://github.com/simstudioai/sim/pull/6705/checks
Files changed https://github.com/simstudioai/sim/pull/6705/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6705/files
fix(condition): stop a secret value from breaking or forging a condition https://github.com/simstudioai/sim/pull/6705/files#top
Show all changes 1 commit https://github.com/simstudioai/sim/pull/6705/files
d2fbd20 fix(condition): stop a secret value from breaking or forging a condition Aug 14, 2026 https://github.com/simstudioai/sim/pull/6705/commits/d2fbd202cc5eeb9809c21e5fa7d9dbd545d7ca01
Clear filters https://github.com/simstudioai/sim/pull/6705/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6705/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6705/files
condition.mdx https://github.com/simstudioai/sim/pull/6705/files#diff-820b4cf15d604a73c2afc78fcdb399bbac4d0377bffa8a84bd3d236091faf1a3
function.mdx https://github.com/simstudioai/sim/pull/6705/files#diff-35307e60b2bca3b679e8c7d32efface78c0b5affa6fae36d3f3cc17b3f0812ec
variables.mdx https://github.com/simstudioai/sim/pull/6705/files#diff-be428d77a94ac1aa9db01430ee226099abfdb26a37ffad8fbc1160f430fbed3e
resolver.test.ts https://github.com/simstudioai/sim/pull/6705/files#diff-2fa26b2dbc26ddf18b930cacd45e8f8785bea1a3c1183192cbb19678ea81b649
resolver.ts https://github.com/simstudioai/sim/pull/6705/files#diff-689d75b70daf1f65a0914798bb39ad228e6918dc990978d09a349acfe0ca22f6
apps/docs/content/docs/en/workflows/blocks/condition.mdxhttps://github.com/simstudioai/sim/pull/6705/files#diff-820b4cf15d604a73c2afc78fcdb399bbac4d0377bffa8a84bd3d236091faf1a3
View file https://github.com/simstudioai/sim/blob/d2fbd202cc5eeb9809c21e5fa7d9dbd545d7ca01/apps/docs/content/docs/en/workflows/blocks/condition.mdx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6705/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6705/files#diff-820b4cf15d604a73c2afc78fcdb399bbac4d0377bffa8a84bd3d236091faf1a3
https://github.com/simstudioai/sim/pull/6705/files#diff-820b4cf15d604a73c2afc78fcdb399bbac4d0377bffa8a84bd3d236091faf1a3
apps/docs/content/docs/en/workflows/blocks/function.mdxhttps://github.com/simstudioai/sim/pull/6705/files#diff-35307e60b2bca3b679e8c7d32efface78c0b5affa6fae36d3f3cc17b3f0812ec
View file https://github.com/simstudioai/sim/blob/d2fbd202cc5eeb9809c21e5fa7d9dbd545d7ca01/apps/docs/content/docs/en/workflows/blocks/function.mdx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6705/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6705/files#diff-35307e60b2bca3b679e8c7d32efface78c0b5affa6fae36d3f3cc17b3f0812ec
https://github.com/simstudioai/sim/pull/6705/files#diff-35307e60b2bca3b679e8c7d32efface78c0b5affa6fae36d3f3cc17b3f0812ec
apps/docs/content/docs/en/workflows/variables.mdxhttps://github.com/simstudioai/sim/pull/6705/files#diff-be428d77a94ac1aa9db01430ee226099abfdb26a37ffad8fbc1160f430fbed3e
View file https://github.com/simstudioai/sim/blob/d2fbd202cc5eeb9809c21e5fa7d9dbd545d7ca01/apps/docs/content/docs/en/workflows/variables.mdx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6705/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6705/files#diff-be428d77a94ac1aa9db01430ee226099abfdb26a37ffad8fbc1160f430fbed3e
https://github.com/simstudioai/sim/pull/6705/files#diff-be428d77a94ac1aa9db01430ee226099abfdb26a37ffad8fbc1160f430fbed3e
apps/sim/executor/variables/resolver.test.tshttps://github.com/simstudioai/sim/pull/6705/files#diff-2fa26b2dbc26ddf18b930cacd45e8f8785bea1a3c1183192cbb19678ea81b649
View file https://github.com/simstudioai/sim/blob/d2fbd202cc5eeb9809c21e5fa7d9dbd545d7ca01/apps/sim/executor/variables/resolver.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6705/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6705/files#diff-2fa26b2dbc26ddf18b930cacd45e8f8785bea1a3c1183192cbb19678ea81b649
https://github.com/simstudioai/sim/pull/6705/files#diff-2fa26b2dbc26ddf18b930cacd45e8f8785bea1a3c1183192cbb19678ea81b649
https://github.com/simstudioai/sim/pull/6705/files#diff-2fa26b2dbc26ddf18b930cacd45e8f8785bea1a3c1183192cbb19678ea81b649
https://github.com/simstudioai/sim/pull/6705/files#diff-2fa26b2dbc26ddf18b930cacd45e8f8785bea1a3c1183192cbb19678ea81b649
https://github.com/simstudioai/sim/pull/6705/files#diff-2fa26b2dbc26ddf18b930cacd45e8f8785bea1a3c1183192cbb19678ea81b649
apps/sim/executor/variables/resolver.tshttps://github.com/simstudioai/sim/pull/6705/files#diff-689d75b70daf1f65a0914798bb39ad228e6918dc990978d09a349acfe0ca22f6
View file https://github.com/simstudioai/sim/blob/d2fbd202cc5eeb9809c21e5fa7d9dbd545d7ca01/apps/sim/executor/variables/resolver.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6705/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6705/files#diff-689d75b70daf1f65a0914798bb39ad228e6918dc990978d09a349acfe0ca22f6
https://github.com/simstudioai/sim/pull/6705/files#diff-689d75b70daf1f65a0914798bb39ad228e6918dc990978d09a349acfe0ca22f6
https://github.com/simstudioai/sim/pull/6705/files#diff-689d75b70daf1f65a0914798bb39ad228e6918dc990978d09a349acfe0ca22f6
https://github.com/simstudioai/sim/pull/6705/files#diff-689d75b70daf1f65a0914798bb39ad228e6918dc990978d09a349acfe0ca22f6
Please reload this pagehttps://github.com/simstudioai/sim/pull/6705/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.