Back to skill

Security audit

Android Moblink Integration

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a genuine MobLink Android integration helper, but it needs Review because it adds an unpinned Gradle build plugin and handles app secrets in plaintext project files.

Review before installing. Use only on a MobLink-specific Android project, pin the MobSDK Gradle plugin to a reviewed version, enable dependency verification or locking where possible, keep MobLink_Config.xlsx and any local credential files out of version control, avoid printing appSecret in logs or diffs, and delete the completed workbook after configuration is transferred. Treat any appSecret already committed or shipped in an APK as exposed and rotate it if needed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T08 · Insecure Dependencies

Error
Location
SKILL.md:190
Finding
Unpinned MobSDK Gradle Plugin Allows Unreviewed Supply-Chain Updates<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:190-198` **Additional Locations**: `SKILL.md:55`, `assets/generate_excel_template.py:97`, `templates/MOBLINK_README.md:8` **Vulnerability Type**: Dynamic, unpinned third-party build dependency **Risk Level**: High ### Vulnerable Code ```groovy buildscript { dependencies { classpath "com.mob.sdk:MobSDK2:+" } } ``` The same dynamic dependency is also prescribed elsewhere: ```text com.mob.sdk:MobSDK2:+ ``` ### Technical Analysis The `+` version selector instructs Gradle to resolve the latest available `MobSDK2` release from the configured external MobTech Maven repository. Consequently, the dependency used by a build can change without any modification to the audited project. A Gradle plugin is executable build logic rather than a passive library. Once resolved, plugin code runs inside the Gradle process with the permissions of the developer or CI account performing the build. The workflow does not require dependency locking, checksum verification, repository content filtering, or review of newly resolved versions. This does not demonstrate that the current MobSDK package is malicious. The vulnerability is that the Skill automatically introduces future, unreviewed code into a privileged build environment. ### Attack Path 1. A user follows the Skill and adds `https://mvn.mob.com/android` as a Maven repository. 2. The user adds the dynamic dependency `com.mob.sdk:MobSDK2:+`. 3. An attacker compromises the upstream publishing account, repository, distribution infrastructure, or a future package release. 4. The attacker publishes a version newer than the previously reviewed release. 5. A subsequent local or CI build resolves the new version automatically. 6. Gradle loads and executes the plugin code with the build account's privileges. 7. Malicious plugin code could access source code, environment variables, signing material, build credentials, and writable files available to t ...[truncated 569 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the dynamic selector with a specific, reviewed version: ```groovy buildscript { dependencies { classpath "com.mob.sdk:MobSDK2:REVIEWED_VERSION" } } ``` 2. Record the approved version centrally and require a security review before upgrading it. 3. Enable Gradle dependency locking so dependency resolution cannot change unexpectedly. 4. Enable Gradle dependency verification and commit trusted checksums or signatures. 5. Restrict the MobTech Maven repository with Gradle content filters so it can only provide expected MobTech groups. 6. Prevent CI builds from silently refreshing dependencies and fail builds when verification metadata does not match. 7. Run Android builds under a least-privileged account without unnecessary access to unrelated credentials or files. 8. Update all documentation and templates that currently recommend `MobSDK2:+` so users do not reintroduce the dynamic version. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:220
Finding
MobTech Application Secret Is Collected and Embedded in Plaintext Project Files<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:220-227` **Additional Locations**: `SKILL.md:117-148`, `SKILL.md:308`, `assets/generate_excel_template.py:42-48`, `README.md:16` **Vulnerability Type**: Plaintext sensitive-data storage and client-side secret embedding **Risk Level**: Medium ### Vulnerable Code The Skill directs the Agent to insert the secret directly into the application module configuration: ```groovy MobSDK { appKey "{appKey}" appSecret "{appSecret}" MobLink { uriScheme "{uriScheme}" appLinkHost "{appLinkHost}" } } ``` It also provides an application initialization example that embeds the same value in source code: ```java MobSDK.init(this, "{appKey}", "{appSecret}"); ``` The Excel generator creates a plaintext field for collecting the secret: ```python def create_basic_info_sheet(wb): headers = ["配置项", "说明", "您的信息(必填)"] data = [ ["appKey", "MobTech 应用 Key,从 MobTech 官网注册应用获取", ""], ["appSecret", "MobTech 应用密钥,与 appKey 一同获取", ""], ["packageName", "Android 应用包名,例如 com.example.app", ""] ] ``` ### Technical Analysis The workflow requires a user to enter `appSecret` into `MobLink_Config.xlsx`, which is copied into the Android project root. The Agent then reads that value and writes it into Gradle configuration or Android application source code. The Skill does not require the workbook or any local secret-properties file to be excluded from version control. It also provides no cleanup procedure, output redaction rule, file-permission requirement, or CI secret-management guidance. A value embedded in Android source or build configuration can also be incorporated into generated application artifacts. Android applications execute on user-controlled devices, so values packaged in an APK should not be treated as confidential server-side secrets. Obfuscation alone would not provide a reliable security boundary. ### Attack Path 1. The Skill generates `MobLink ...[truncated 1299 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Determine whether MobTech requires `appSecret` in the Android client. If it does not, remove it from the workbook, Gradle configuration, and application source entirely. 2. If the SDK requires the value client-side, explicitly document that it cannot be considered a confidential server secret and ensure its permissions are minimized. 3. Store build-time credentials in a dedicated local properties file excluded from version control, or inject them through a CI secret manager. 4. Add generated files such as `MobLink_Config.xlsx` and local credential files to `.gitignore` before collecting any values. 5. Delete the completed workbook after validated configuration has been transferred. 6. Restrict local file permissions while the workbook exists. 7. Prohibit the Agent from printing, logging, or including the secret in generated documentation and diffs. 8. Add automated secret scanning to pre-commit hooks and CI pipelines. 9. Avoid embedding privileged credentials in APKs. Move privileged operations to a controlled backend and expose only narrowly scoped application-facing endpoints. 10. Rotate any credential that has already been committed, logged, published, or included in a publicly distributed artifact. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The code is not an interactive guide or workflow assistant. Its primary function is to programmatically create a formatted Excel template file named 'MobLink_Config_Template.xlsx' containing fields and instructions related to MobLink integration. While the content domain matches MobLink Android integration, the behavior is materially different: it generates a document artifact on disk rather than guiding a user interactively. This is a meaningful description-behavior mismatch because the primary purpose and capability of the code are template generation and file output, which are not reflected in the declared description.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The README instructs the agent and user to handle sensitive values including appKey, appSecret, package/signing identifiers, privacy consent state, and a user-provided Excel configuration, but it does not include any guidance on secret handling, storage minimization, redaction, or safe disposal. In an agent-driven workflow, this omission can lead to credentials being copied into project files, logs, prompts, or generated artifacts, increasing the risk of accidental disclosure and privacy non-compliance.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The listed triggers include phrases like '我要在app中增加深度链接能力' and the guidance says to prioritize this skill whenever the question is related to Android deep links, scene restore, or compliance. These requests are broader than MobLink integration specifically and can overlap with many unrelated Android deep-link tasks, increasing the risk of unintended invocation.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs users to place sensitive values such as appKey, appSecret, package identifiers, and signing metadata into an Excel workbook stored in the project directory, without warning about secrecy, access controls, or cleanup. This increases the chance that credentials are exposed through source control, backups, shared folders, or accidental disclosure during support workflows.

Session Persistence

Medium
Category
Rogue Agent
Content
["useMobCustomController", "是否使用 App 数据采集主动控制器:是/否", "否"],
        ["allowLocationData", "是否允许 MobLink 主动采集地理位置信息:是/否", "是"],
        ["allowDeviceIdData", "是否允许 MobLink 主动采集 OAID/Advertising ID/Android ID:是/否", "是"],
        ["allowAppListData", "是否允许 MobLink 主动采集应用列表信息:是/否", "是"],
        ["allowNetworkData", "是否允许 MobLink 主动采集 WIFI/基站/IP 等网络状态信息:是/否", "是"],
    ]
    return create_sheet_with_header(wb, "隐私合规", headers, data)
Confidence
75% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Session Persistence

Medium
Category
Rogue Agent
Content
["useMobCustomController", "是否使用 App 数据采集主动控制器:是/否", "否"],
        ["allowLocationData", "是否允许 MobLink 主动采集地理位置信息:是/否", "是"],
        ["allowDeviceIdData", "是否允许 MobLink 主动采集 OAID/Advertising ID/Android ID:是/否", "是"],
        ["allowAppListData", "是否允许 MobLink 主动采集应用列表信息:是/否", "是"],
        ["allowNetworkData", "是否允许 MobLink 主动采集 WIFI/基站/IP 等网络状态信息:是/否", "是"],
    ]
    return create_sheet_with_header(wb, "隐私合规", headers, data)
Confidence
75% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
The instructions, prompts, and trigger phrases are entirely in Chinese, which effectively imposes a specific language for user interaction. The file does not state that the skill is China-specific only, nor does it offer an opt-in or alternative language choice.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The document content is entirely Chinese-language and does not indicate that the skill is intended only for a Chinese-speaking or region-specific audience, nor does it offer an alternative language option. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Static analysis

No suspicious patterns detected.