Back to skill

Security audit

android-lab

Security checks for vulnerabilities and agentic risk

Overview

This Android development skill needs review because its emulator helpers receive broader control over your computer than its permissions explain.

Before using emulator commands, treat the helper images as trusted software with broad Docker-host authority. Prefer a dedicated VM without sensitive host mounts. Review the selected release's installer and container code, which were not bundled for this assessment. The documented Gradle-only command avoids the Docker socket. Keep .android-lab out of Git because it contains signing material and saved device data.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

The emulator setup grants containers access to the host Docker daemon without warning about the resulting host-level privileges.

High
Category
Output Handling
Confidence
97% confidence
Finding

The documentation acknowledges that the helper needs the Docker socket but does not explain that this defeats project-only filesystem isolation. The non-root user option can suggest a stronger boundary than actually exists because daemon access can authorize host mounts and privileged containers.

Content

No source excerpt is available for this finding.

Device-helper containers receive the host Docker socket, exceeding the declared project-directory filesystem access.

High
Category
Excessive Agency
Confidence
98% confidence
Finding

The helper receives usable access to the host Docker daemon, which permits creating containers with mounts outside the declared project directory. Although container orchestration is legitimate for this skill, a compromised helper could access host files or obtain host-root-equivalent execution on a typical rootful Docker installation, exceeding the stated filesystem scope.

Content

No source excerpt is available for this finding.

Docker Socket Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

Adding the Docker socket's group deliberately makes the mounted daemon socket usable by the otherwise non-root helper. In combination with the socket mount, this enables host-level Docker operations if the helper is compromised; it is part of the same exposure reported at line 35, not an independent attack.

Content

Scanner excerpt · references/setup.md (reported line 28)May include surrounding context.

md
local command="$1"
  shift
  docker run --rm --init --user "$(id -u):$(id -g)" \
    --group-add "$(stat -c %g /var/run/docker.sock)" \
    -e HOME=/tmp -e ANDROID_LAB_WORKSPACE="$PWD" \
    -e ANDROID_LAB_DEV_IMAGE="android-lab:$LAB_VERSION" \
    -e ANDROID_LAB_EMULATOR_IMAGE="android-lab:$LAB_VERSION-emulator-api36" \

Docker Socket Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

Mounting /var/run/docker.sock exposes the host Docker API to the helper container. This is functionally motivated by emulator orchestration, but a compromised helper can use a typical rootful daemon to mount arbitrary host paths or launch privileged containers, bypassing the intended project-directory boundary.

Content

Scanner excerpt · references/setup.md (reported line 35)May include surrounding context.

-e ANDROID_LAB_UID="$(id -u)" -e ANDROID_LAB_GID="$(id -g)"
-e ANDROID_LAB_VNC_HOST_PORT="${ANDROID_LAB_VNC_HOST_PORT:-61326}"
"$@"
-v "$PWD:$PWD" -v /var/run/docker.sock:/var/run/docker.sock -w "$PWD"
"android-lab:$LAB_VERSION" android-lab "$command" }

text

Docker image referenced without tag or digest: 'docker run --rm'.

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Docker image referenced without tag or digest: 'docker run --rm'.

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.