Anti-AIClone

Log date · Thu

How do you secure Android Studio BYOA agents?

Check agent access and data handling, then review security-sensitive changes. A small manifest comparison shows why one line matters.

What should you check before connecting an agent?

Check what the agent can read and execute, and which changes require human review. Android Studio BYOA connects a coding agent of your choice; verify permissions and data handling for the chosen agent and your environment. In our two synthetic manifests, changing one line changed an activity’s exported value from false to true.

On 24 September 2026, Android announced the preview starting with Android Studio Rabbit 2 Canary, naming Claude Agent, Codex and Antigravity. [1] We used Python to inspect manifests as an illustration of a review boundary; this is not a test of the Android Studio preview or any agent.

Key questions and findings
QuestionFinding
What did one changed line alter?The sample activity changed from exported=false to true.
What did we inspect?Attributes in two synthetic XML files, not an installed app.
Does ACP establish a fixed permission set?No such conclusion follows; check the agent and environment.

What the announcement changes

The announcement says Android Studio supplies the project graph, build setup and platform details through the Agent Client Protocol (ACP), and connects build diagnostics, Compose previews, SDK tools and emulator control. Listed agent capabilities include reading and writing files, running shell commands and tests, searching the web and spawning subagents. It describes granular permissions that can pause riskier actions for approval. [1]

ACP is a communication protocol between editors and agents; its documentation also describes local agents running as editor subprocesses. [2] Protocol compatibility does not imply identical retention, permissions or network policies across providers. Before signing in or supplying an API key, check the selected service’s terms, organization settings and actual permission prompts.

Project context can help diagnose builds, but source, build configuration, logs and diagnostics may contain sensitive material. Define what may be shared, then determine which directories, environment variables and services the local process and its children can access. Moving a file outside the project helps organization, but alone does not prove a process cannot read it.

Why one changed line merits review

We wrote two minimal AndroidManifest XML files that differ only in the exported value. We displayed the change with diff, then used the Python 3.9.1 XML parser to read the attribute. There is no Android SDK build or application launch in this illustration.

Verbatim diff output.
--- before.xml
+++ after.xml
@@ -1,5 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android">
   <application>
-    <activity android:name=".InternalActivity" android:exported="false" />
+    <activity android:name=".InternalActivity" android:exported="true" />
   </application>
 </manifest>
Parser output.
before: .InternalActivity exported=false
after: .InternalActivity exported=true

Android documents exported as controlling whether components of other apps can launch a component, and recommends setting it explicitly because defaults have varied by component and platform version. [3] For the sample, true allows another app to launch the activity by class name under this setting; the practical impact also depends on the component code and other access controls.

A successful build or passing test does not establish that this change matches the design. Ask whether the component needs external callers, who those callers are, and whether permissions or input validation are required. Check the final merged manifest for the release variant as well as the source file.

Recommendations for permissions and review

These are engineering recommendations, not security effects measured by the illustration. Available controls depend on the agent, provider and organization policy.

Recommendations by operation
CaseRecommendation
Reading project and diagnosticsLimit the workspace and accessible data; check provider data terms first.
Commands, deletion or network accessRequire approval according to risk; inspect the command and destination.
Manifest, R8 or network configuration changesReview the diff separately and verify the release variant’s final configuration.
Signing keys and production credentialsUse controlled secret management and least privilege; verify the agent process cannot actually access them.

Approval requires more than checking the command name. Inspect arguments, working directory, paths read or written, and whether content will be sent elsewhere. For an uncertain command, ask the agent to explain its purpose and narrow its scope first. Review added files, dependencies and build scripts too; do not rely only on the conversational summary.

For secrets, avoid placing production values in an environment accessible to the agent. Scope CI injection to the signing step that needs it, and inspect logs and artifacts for leakage. If a credential has already been exposed, limit its permissions, rotate it and verify the old value no longer works under your team’s process.

Check your own project

Review pending changes in your own repository. The Git commands below read diffs only; adjust paths to your project. They do not replace checks of the final merged manifest, dependencies and runtime behavior.

Run the commands at your repository root and adjust paths.
git diff -- AndroidManifest.xml app/src/main/AndroidManifest.xml
git diff -- app/proguard-rules.pro app/src/main/res/xml

Add --cached when inspecting staged changes; for committed changes compare the appropriate baseline and commit. For each changed attribute or rule, establish the requirement, inspect the merged manifest and run relevant functional and security tests. Record the build identifier and review outcome, and repeat when the agent, permissions or build configuration changes.

Your checklist

  • Check the chosen agent’s data terms and accessible scope.
  • Require risk-based approval for commands, deletion and network access.
  • Isolate production credentials and verify actual process access.
  • Review manifest, R8 and network security changes separately.
  • Inspect the merged release manifest and run relevant tests.

Primary sources

All sources and reproduction status ↗