medium · M8 · MASVS-PLATFORM-3 · PTKD-AC-CODE-OBFUSCATION

    JavaScript obfuscation in the build

    The project obfuscates its JavaScript (javascript-obfuscator, Jscrambler…). Guideline 2.5.19 names code obfuscation as a way of hiding features, and obfuscated bundles get closer scrutiny.

    How it is exploited

    Not an attack: metro runs javascript-obfuscator on the release bundle 'to protect the API key'. Apple lists obfuscation as a way of hiding features, and the key is still in the bundle for anyone patient.

    Why it matters

    Closer review and possible rejection under 2.5.19 / 2.3.1, with no real protection for the secret.

    How to fix it

    1. Remove the obfuscation step from the release build.
    2. Move secrets to a server or edge function; give the app short-lived, user-scoped tokens instead.
    3. If you must keep obfuscation (licensed code), say so and why in the App Review notes.

    Does your app have this?

    PTKD checks your build or your source project for PTKD-AC-CODE-OBFUSCATION and every other check in this knowledge base.

    Scan your app

    References

    Related checks (M8)