debuggable_app
Reports android:debuggable="true" in a manifest of the release build. Leave the attribute out and let the build set it.
- Kind
- project-file check
- Tier
- advisory
- Host
- command-line program only (
assay project-files) - Lowest preset
- every preset (on unless switched off)
- Fix
- none
- Security class
- CWE-489 · mobile risk M8 (security misconfiguration) · severity 6.5
What it reports
Section titled “What it reports”android:debuggable="true" on the <application> of a manifest that a release build is made of: android/app/src/main/AndroidManifest.xml, or the release build type’s android/app/src/release/AndroidManifest.xml. The value is read as Android’s build reads a boolean, in any case and with white space around it.
The result stands at the attribute: “android:debuggable is true in a manifest of the release build: whoever has the app on a device can attach a debugger to it and read and change what it holds.”
Where both manifests write the attribute, a release build takes the release one’s: true in the main manifest and false in the release one is no result. (The manifest merger lets the build type’s manifest win where tools:replace asks it to, and fails the build otherwise.)
It does not report:
- an absent attribute, which is what Flutter’s template writes: the build makes a debug build debuggable and a release build not. The platform’s default is
false; - the manifests of the
debugandprofilesource sets (android/app/src/debug/,android/app/src/profile/), which a release build does not hold; false, or a reference to a resource (@bool/debuggable), which the check does not follow.
A debuggable app lets anyone with the device and a cable attach a debugger. They can read the app’s memory, its tokens and keys among it, step through its code and change what it does, and, for apps that target Android 12 and later, copy its data with adb backup.
A value written in the manifest is taken by every build, the release build among them. Android’s own lint calls a hard-coded value fatal, and stops a release build where that lint runs. A build that does not run it, or switches it off, ships the app debuggable.
Example
Section titled “Example”<application android:label="shop" android:debuggable="true"><application android:label="shop">Configuration
Section titled “Configuration”Under assay.project_files of the project’s root analysis_options.yaml:
| Key | Default | Effect |
|---|---|---|
enabled |
true |
false (or the short form debuggable_app: false) switches the check off. |
exclude |
[] |
Path globs, from the project root, where the check places no result. |
How to run it
Section titled “How to run it”assay project-files runs it with the other project-file checks, and assay project-files debuggable_app runs it alone. The gate and the baseline commands run it too, as an advisory result that never fails the gate (see Project-file checks). assay check does not.
Security class
Section titled “Security class”In SARIF, the check’s descriptor carries the tags security, external/cwe/cwe-489 and external/owasp-mobile-2024/m8, and the security-severity 6.5. No other report changes.
Keeping a result
Section titled “Keeping a result”No suppression comment applies. Keep a manifest that is debuggable on purpose, such as that of an app for tests only, in the baseline, or switch the check off for that project.