Most teams can tell you exactly which commit produced a release. Far fewer can tell you which obfuscation settings produced the protected file that users actually downloaded. That gap stays invisible until a protected build misbehaves in production and somebody asks, "What changed?"
Disclosure up front: I help promote MeowShield, a JavaScript obfuscation tool. The habit below is useful whichever tool you use, but I'll use MeowShield's levels and option names as the example.
Why the settings are part of the release
An obfuscator is a compiler pass. Two builds of the same source with different settings are two different programs from a debugging, performance, and compatibility point of view. In MeowShield, the starting choice alone is significant: Low, Medium, and High are different presets, and each exposes further options (for example ES5 Transform, KeepTopVar, Variable Renaming, ConstantSplitting with a rate, or the Medium control-flow mode hp-basic).
If you tweak those in the Playground until a build "looks right" and then ship it, the configuration lives only in someone's memory. The next release will drift.
What to record for every protected release
Keep a small, boring file next to your release notes. A JSON or YAML file in the repo is enough:
{ "release": "2.4.1", "sourceCommit": "<git sha>", "inputFile": "dist/app.bundle.js", "level": "low", "changedFromPresetDefaults": { "ConstantSplitting": "40%" }, "protectedSha256": "<hash of the file you uploaded>", "testedOn": ["Chrome stable", "Firefox stable", "Safari 17"], "notes": "Variable Renaming left at Normal" } The important fields:
- Level and only the options you changed from the preset. Writing down every default is noise; writing down the deltas tells reviewers exactly where you departed from the documented baseline.
- The input file. Protect the bundled JavaScript you actually ship, and record which artifact that was.
- A hash of the protected output. This ties the config to the exact bytes on your CDN, so you can prove which build a bug report came from.
- Where you tested it. A config that was never exercised in Safari is not "known good" for Safari.
As a nice side effect, the sample output on the MeowShield homepage begins with a header comment naming the obfuscation mode and generation time. Don't rely on a comment surviving every later step in your pipeline, but if it's there, it's a quick cross-check against your record.
If you automate with the API, the config is already code
MeowShield also has a separate, authorized API for backend or CI use. Its documented request body carries sourceCode, apiToken, and an options object whose mode is low, medium, or high. Check the current full options object in the API docs rather than copying field lists from blog posts, including this one.
The point for versioning: when the options object is in your repository, a code review sees every change to protection settings. Two rules:
- The token is not part of the config. Store
apiTokenas a CI or server-side secret. It must never appear in the committed file or in browser code. - Fail the build on a non-zero
error. The documented response includes anerrorvalue where 0 means success. Anything else should stop the release, not silently ship the unprotected input.
Changing settings between releases
When you want stronger protection, change one thing per release and write down why:
- Raise ConstantSplitting from 40% to 50%: re-run your performance check on the hot path.
- Move from Low to Medium: re-run the whole compatibility matrix, because control-flow changes affect more code.
If a release regresses, you now have a one-line diff to revert instead of a guessing game. MeowShield's own troubleshooting advice points the same way: lower the level or disable options, then add them back one at a time and re-test.
The limit to keep in mind
Recording settings makes builds reproducible; it doesn't make them stronger. MeowShield's FAQ says it plainly: no protection is absolute, and the goal is to increase analysis cost while preserving behavior. Secrets and authorization still belong on the server.
If you want to try this with a real file, start with a preset in the Playground at MeowShield, record the level you chose, and treat that record as part of the release from day one.
