René's URL Explorer Experiment


Title: deadCodeInjection intermittently drops a positional argument across a rest/spread forward (non-deterministic, minified input) · Issue #1423 · javascript-obfuscator/javascript-obfuscator · GitHub

Open Graph Title: deadCodeInjection intermittently drops a positional argument across a rest/spread forward (non-deterministic, minified input) · Issue #1423 · javascript-obfuscator/javascript-obfuscator

X Title: deadCodeInjection intermittently drops a positional argument across a rest/spread forward (non-deterministic, minified input) · Issue #1423 · javascript-obfuscator/javascript-obfuscator

Description: Summary With deadCodeInjection: true on already-minified input (bundler output where locals are 1-char identifiers, i.e. effectively the same as identifierNamesGenerator: 'mangled'), a positional argument is intermittently lost across a ...

Open Graph Description: Summary With deadCodeInjection: true on already-minified input (bundler output where locals are 1-char identifiers, i.e. effectively the same as identifierNamesGenerator: 'mangled'), a positional a...

X Description: Summary With deadCodeInjection: true on already-minified input (bundler output where locals are 1-char identifiers, i.e. effectively the same as identifierNamesGenerator: 'mangled'), a posi...

Opengraph URL: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1423

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"deadCodeInjection intermittently drops a positional argument across a rest/spread forward (non-deterministic, minified input)","articleBody":"## Summary\n\nWith `deadCodeInjection: true` on **already-minified input** (bundler output where locals are 1-char identifiers, i.e. effectively the same as `identifierNamesGenerator: 'mangled'`), a **positional argument is intermittently lost across a rest/spread forward** (`(...args) =\u003e fn(...args)`): the callee receives one argument as `undefined` even though the caller passed a defined value.\n\nThe corruption is **non-deterministic across builds from identical source**, because the default `seed: 0` re-randomises which AST fragments `deadCodeInjection` clones each run. The same source \"works\" in some builds and breaks in others.\n\nThis looks related to the historically-fixed scope/clone issues (#708, and the `NodeUtils.cloneRecursive` / `range` scope-resolution fix in v5.2.0), and to #262 (non-deterministic `undefined` / \"is not a function\" with `deadCodeInjection` + `mangled` + `seed: 0`), but I could not find an open issue with this exact signature (positional arg silently `undefined` through a spread forward).\n\n## Version\n\n- `javascript-obfuscator`: **5.4.3** (latest on npm)\n- Node: v24.15.0\n- Input: ESM chunk emitted by a bundler (rolldown/esbuild), already minified\n\n## Options\n\n```js\n{\n  compact: true,\n  controlFlowFlattening: true,\n  controlFlowFlatteningThreshold: 0.75,\n  deadCodeInjection: true,\n  deadCodeInjectionThreshold: 0.4,\n  stringArray: true,\n  stringArrayEncoding: ['base64'],\n  stringArrayThreshold: 0.75,\n  identifierNamesGenerator: 'mangled',\n  selfDefending: false,\n  debugProtection: false,\n  // seed: 0 (default) — non-deterministic\n}\n```\n\n## What we observed\n\nOur app dispatches IPC calls through a generic rest/spread forwarder. Source:\n\n```js\n// for each registered method:\nhandleIpc(state, `${group}:${method}`, (e, ...args) =\u003e\n  runWithRoute(routeFor(e.sender.id), searchParamsFor(e.sender.id), () =\u003e\n    methods[method](...args),   // \u003c-- args forwarded via spread\n  ),\n);\n```\n\nMinified input handed to the obfuscator (unbroken, semantically correct):\n\n```js\n(v,...b)=\u003eqi(o(v.sender.id),a(v.sender.id),()=\u003ep[h](...b))\n```\n\nObfuscated output from a **broken** build (`deadCodeInjection: true`):\n\n```js\n(H,...I)=\u003eqi(w(H[auH(0x3932)]['id']),x(H[auH(0x3932)]['id']),()=\u003eF[G](...I))\n```\n\nThe structure looks fine, yet at runtime a call made with **two** defined arguments arrives at `F[G]` (`p[h]`) with the **second argument `undefined`**.\n\nConcretely, we verified the boundary on both sides in the *same* broken build:\n\n- Caller side (before the boundary), logged args: `[\"/path/to/repo\", \"5c09f59b-…\"]` — both defined.\n- Callee side (after the spread forward): `arg0 = \"/path/to/repo\"`, `arg1 = undefined`.\n\nFlipping `deadCodeInjection: false` (everything else unchanged) makes the problem disappear across every build we tried; pinning a non-zero `seed` makes the outcome reproducible per seed.\n\n## Why we can't attach a minimal standalone repro (yet)\n\nWe tried hard to reduce it. Obfuscating the *isolated* chunk that contains the forwarder — byte-for-byte the real bundler output — and executing it across 200 seeds produced **zero** corruptions. The failure only appears when the **whole large chunk** (~950 KB, our Electron main-process bundle) is obfuscated as one unit. That strongly suggests the corruption is an **emergent property of `deadCodeInjection` cloning fragments from elsewhere in the same chunk** (it \"steals a part of code\" per #708), so a small extracted snippet has nothing to steal and never triggers it. The full bundle isn't runnable standalone (native `require`s), which is what has blocked a clean minimal repro.\n\nWe understand a non-reproducible report is hard to action. We're filing it because the signature (silent `undefined` through a spread forward, non-deterministic by seed, only with `deadCodeInjection` + mangled/minified input) seems like a real miscompile and may ring a bell given #262/#708/v5.2.0.\n\n## Offer to help\n\nWe can run **any instrumentation / logging / debug build you suggest** against our real bundle and report back, and we're happy to iterate to help you pin it down (e.g. bisecting seeds, dumping the pre/post AST for a specific node, trying a patched build). If a private channel would be easier for sharing a larger reproduction artifact, we can arrange that too. Just let us know what would be most useful.\n\n## Workaround (for anyone hitting this)\n\nDisable `deadCodeInjection` (it adds little real reverse-engineering resistance) and/or pin a fixed non-zero `seed` so builds are reproducible and a latent miscompile can't surface only in some releases.\n","author":{"url":"https://github.com/julianmesa-gitkraken","@type":"Person","name":"julianmesa-gitkraken"},"datePublished":"2026-07-07T11:57:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/1423/javascript-obfuscator/issues/1423"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:38a03c89-edb5-45f4-0b5d-9abb4cd258d5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id976A:B3B5C:11AB123:1836484:6A62DEDA
html-safe-nonce88cd3c3051639652a3b916fc67db21a51b57ee92d0044f5555de027750d0b7fd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzZBOkIzQjVDOjExQUIxMjM6MTgzNjQ4NDo2QTYyREVEQSIsInZpc2l0b3JfaWQiOiIzMDc4Mjk3MTI2OTA2ODE0MTcwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac2ba26a00a3250f57a209c091b8ac3296c86d100494c3067e3d10a9cca7ec1a76
hovercard-subject-tagissue:4828248752
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javascript-obfuscator/javascript-obfuscator/1423/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ae22ab3733e934adcbe6611cdf7a10f2e6680972141b60309f695f7b60cf9cc1/javascript-obfuscator/javascript-obfuscator/issues/1423
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ae22ab3733e934adcbe6611cdf7a10f2e6680972141b60309f695f7b60cf9cc1/javascript-obfuscator/javascript-obfuscator/issues/1423
og:image:altSummary With deadCodeInjection: true on already-minified input (bundler output where locals are 1-char identifiers, i.e. effectively the same as identifierNamesGenerator: 'mangled'), a positional a...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejulianmesa-gitkraken
hostnamegithub.com
expected-hostnamegithub.com
Nonedf33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd
turbo-cache-controlno-preview
go-importgithub.com/javascript-obfuscator/javascript-obfuscator git https://github.com/javascript-obfuscator/javascript-obfuscator.git
octolytics-dimension-user_id23015672
octolytics-dimension-user_loginjavascript-obfuscator
octolytics-dimension-repository_id58360147
octolytics-dimension-repository_nwojavascript-obfuscator/javascript-obfuscator
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id58360147
octolytics-dimension-repository_network_root_nwojavascript-obfuscator/javascript-obfuscator
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released41cd1bdb290013455c0ac430fa755621733f5eb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1423#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator%2Fissues%2F1423
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator%2Fissues%2F1423
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=javascript-obfuscator%2Fjavascript-obfuscator
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1423
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1423
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1423
Please reload this pagehttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1423
javascript-obfuscator https://github.com/javascript-obfuscator
javascript-obfuscatorhttps://github.com/javascript-obfuscator/javascript-obfuscator
Please reload this pagehttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1423
Notifications https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Fork 1.7k https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Star 16.2k https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Code https://github.com/javascript-obfuscator/javascript-obfuscator
Issues 15 https://github.com/javascript-obfuscator/javascript-obfuscator/issues
Pull requests 5 https://github.com/javascript-obfuscator/javascript-obfuscator/pulls
Discussions https://github.com/javascript-obfuscator/javascript-obfuscator/discussions
Actions https://github.com/javascript-obfuscator/javascript-obfuscator/actions
Projects https://github.com/javascript-obfuscator/javascript-obfuscator/projects
Security and quality 0 https://github.com/javascript-obfuscator/javascript-obfuscator/security
Insights https://github.com/javascript-obfuscator/javascript-obfuscator/pulse
Code https://github.com/javascript-obfuscator/javascript-obfuscator
Issues https://github.com/javascript-obfuscator/javascript-obfuscator/issues
Pull requests https://github.com/javascript-obfuscator/javascript-obfuscator/pulls
Discussions https://github.com/javascript-obfuscator/javascript-obfuscator/discussions
Actions https://github.com/javascript-obfuscator/javascript-obfuscator/actions
Projects https://github.com/javascript-obfuscator/javascript-obfuscator/projects
Security and quality https://github.com/javascript-obfuscator/javascript-obfuscator/security
Insights https://github.com/javascript-obfuscator/javascript-obfuscator/pulse
#1424https://github.com/javascript-obfuscator/javascript-obfuscator/pull/1424
deadCodeInjection intermittently drops a positional argument across a rest/spread forward (non-deterministic, minified input)https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1423#top
#1424https://github.com/javascript-obfuscator/javascript-obfuscator/pull/1424
https://github.com/julianmesa-gitkraken
julianmesa-gitkrakenhttps://github.com/julianmesa-gitkraken
on Jul 7, 2026https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1423#issue-4828248752
#708https://github.com/javascript-obfuscator/javascript-obfuscator/issues/708
#262https://github.com/javascript-obfuscator/javascript-obfuscator/issues/262
#708https://github.com/javascript-obfuscator/javascript-obfuscator/issues/708
#262https://github.com/javascript-obfuscator/javascript-obfuscator/issues/262
#708https://github.com/javascript-obfuscator/javascript-obfuscator/issues/708
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.