Anti-AIClone

Log date · Sun

Can javascript-obfuscator remote presets affect builds?

Yes. Remote presets can change effective options; record build inputs and test the obfuscated artifact.

Can remote presets affect reproducible builds?

Yes. A remote preset can change behind the same alias, so a pinned source commit and alias alone do not identify the effective configuration. In our local javascript-obfuscator 5.8.1 comparison, two outputs with the same seed and options were identical at 95 bytes each; changing only compact produced 110 bytes. All four programs printed DEMO-PLAN:154.

Configuration is a build input, and one matching runtime result does not establish identical artifacts. Record the preset content or version when available, the merged configuration, tool version and artifact digest, and test the artifact itself.

Results of this comparison
QuestionObservation
Repeat with the same settings?The two compact outputs matched at 95 bytes each.
Change one option?Expanded was 110 bytes and differed from compact.
Runtime result?The source and all three outputs printed DEMO-PLAN:154.

What changed in 5.8.0

On 20 September 2026 at 20:23 UTC, the project released 5.8.0. Its notes say optionsPreset can name a custom preset saved in the obfuscator.io dashboard; obfuscatePro() and the CLI with --pro-api-token fetch the preset and merge its options. The CLI also changed handling of VM preset names such as vm-default: with a Pro token it passes the name to the API instead of rejecting it locally. [1]

The release notes describe configuration retrieval and routing, rather than a new transformation. An alias is a reference: if an authorized person edits its dashboard preset, a later build of the same commit may use different options. Determine precedence and effective settings from the version and service information actually available to your build; do not infer them from the alias alone.

Local experiment: hold inputs steady, then change an option

We wrote a small pricing sample and ran the free local CLI of javascript-obfuscator 5.8.1 with Node.js 20.19.5. We fixed seed at 42 and disabled stringArray, built compact=true twice, then changed only compact to false. This comparison illustrates how configuration can affect artifacts; it did not call the Pro API or test remote fetching or merging in 5.8.0.

The sample we wrote.
function quote(quantity) {
  return 'DEMO-PLAN:' + (120 + quantity * 17);
}
console.log(quote(2));

The following contiguous results are from the transcript. The versioned documentation describes a nonzero seed as useful for repeatable results and compact as controlling single-line output. [2] These byte counts describe this small sample, not a general estimate of size savings or protection strength.

Verbatim experiment output.
== output sizes (bytes) ==
      95 compact-a.js
      95 compact-b.js
     110 expanded.js
     300 total
== comparisons ==
compact-a vs compact-b: identical
compact-a vs expanded: different
== runtime ==
sample.js: DEMO-PLAN:154
compact-a.js: DEMO-PLAN:154
compact-b.js: DEMO-PLAN:154
expanded.js: DEMO-PLAN:154

Record the inputs that actually took effect

A fixed seed controls the tool’s random generator; it does not freeze remote configuration, dependency versions or the runtime environment. Associate the source commit, lockfile, tool and Node versions, preset alias, build time and artifact hash with each release. If the service provides an immutable version, an export or the merged configuration, retain it with the release record after checking it contains no tokens or other secrets.

Do not assume the local --config precedence rule is the Pro merge rule. The 5.8.1 documentation says options passed directly on the CLI override those in a local config file. [2] For a remote preset, check how that service and version merge settings and confirm using build records where possible; if the final configuration cannot be obtained, record that gap explicitly.

Build logs and diagnostic files need access controls too. Store the Pro API token in CI secret management, not in the repository, echoed commands or archived configuration. If generating a source map, restrict access and associate it with the exact artifact: it helps debugging but can expose source information. [2]

Recommendations by case

These are engineering recommendations, not effects measured by our experiment. Define release behavior on failure first, then rehearse it in a test environment.

Recommendations
CaseRecommendation
Remote preset can be exportedRecord alias and immutable version or content; verify and retain merged configuration.
Effective configuration unavailableRecord the gap and audit information; decide whether the reproducibility risk is acceptable.
API unavailableChoose in advance to pause release or use an approved, tested local configuration; never switch silently.
Preset updatedReview the change and test functionality, compatibility and performance on the actual obfuscated artifact.

A local fallback is not automatically equivalent to a remote configuration. Record its options and approval separately, and mark which path produced the release. After service recovery, do not silently bring an untested changed preset into a release. Obfuscation raises reading effort, but the client still holds code and data it must use; keep shared privileged secrets out of it.

Check your own build

First reproduce the idea in an isolated directory with your installed, pinned version, then substitute your own build input. The commands below use the local CLI; they do not request a remote preset. Retain both artifacts and exercise important paths with your project’s actual tests.

Replace input.js with your own executable sample; cmp is silent when files match.
npx --no-install javascript-obfuscator input.js --output out-a.js --seed 42 --compact true --string-array false
npx --no-install javascript-obfuscator input.js --output out-b.js --seed 42 --compact true --string-array false
cmp out-a.js out-b.js
shasum -a 256 out-a.js out-b.js
node out-a.js

If the comparison differs, check the input file, options, tool and dependency versions, seed and build environment one by one. A match establishes equality for those two builds, not that a remote configuration cannot change later. Before release, test the browser or target runtime, error paths, external interfaces and debugging workflow, and associate the results with the artifact digest in the same release record.

Your checklist

  • Pin tool and dependency versions and the seed.
  • Record the preset alias, available version or content, and merged configuration.
  • Store the API token in CI secret management.
  • Test functionality, compatibility and performance on the obfuscated artifact.
  • Rehearse the release policy for API outages.

Primary sources

All sources and reproduction status ↗