Back to skill

Security audit

Mob Android Sharesdk Integration

Security checks for vulnerabilities and agentic risk

Overview

The skill appears intended for ShareSDK Android setup, but it asks users to handle app secrets in project files and recommends dynamic build dependencies that deserve review before installation.

Review before installing. Use placeholder values in chat, keep the populated Excel file and any secret-bearing Gradle/properties files out of version control, prefer pinned Gradle plugin versions and trusted repositories, and approve any project edits or Gradle commands only after seeing the exact files and changes.

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

Warning
Location
SKILL.md:513
Finding
Mutable Gradle Plugin Dependency from External Repositories## Vulnerability Details **File Location**: `SKILL.md:168-178`, `SKILL.md:513-552` **Vulnerability Type**: Supply-chain risk caused by an unpinned Gradle plugin and external repositories **Risk Level**: Medium **Vulnerable Code**: ```groovy pluginManagement { repositories { gradlePluginPortal() google() mavenCentral() maven { url "https://mvn.mob.com/android" } } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) repositories { gradlePluginPortal() google() mavenCentral() maven { url "https://mvn.mob.com/android" } } } ``` ```groovy buildscript { dependencies { classpath "com.mob.sdk:MobSDK2:+" } } ``` For older Android Gradle Plugin versions, the Skill also recommends: ```groovy allprojects { repositories { maven { url "https://mvn.zztfly.com/android" } } } buildscript { repositories { maven { url "https://mvn.zztfly.com/android" } } dependencies { classpath "com.mob.sdk:MobSDK2:+" } } ``` ### Technical Analysis The dynamic version selector `MobSDK2:+` instructs Gradle to resolve the latest matching release at build time. Consequently, the effective plugin artifact can change after this Skill has been reviewed, even when neither the Skill nor the target project has changed. This is particularly sensitive because Gradle plugins execute code during project configuration and build operations. A malicious or compromised release can therefore execute with the permissions of the developer or CI account running Gradle. The legacy configuration also introduces `mvn.zztfly.com`, a repository outside the primary vendor domain used elsewhere in the Skill, increasing the number of supply-chain trust points. The Skill subsequently recommends running `./gradlew --refresh-dependencie ...[truncated 1481 chars]
Remediation
## Remediation Suggestions 1. Replace `com.mob.sdk:MobSDK2:+` with a specific, reviewed version. 2. Establish a controlled upgrade process in which new versions are reviewed and tested before changing the pin. 3. Use the official vendor repository only. Remove `mvn.zztfly.com` unless its ownership, necessity, and artifact integrity have been independently verified. 4. Enable Gradle dependency verification and commit trusted checksums or signatures in `gradle/verification-metadata.xml`. 5. Apply repository content filters so the vendor repository can resolve only the expected MobSDK group. 6. Prefer centralized repository declarations and fail builds when project-level repositories introduce unauthorized sources. 7. Avoid `--refresh-dependencies` as a routine integration step; use it only when a dependency refresh is explicitly needed. 8. Run Android builds in isolated, least-privileged CI environments without unnecessary access to unrelated credentials or signing material.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:232
Finding
Application Secrets Written into Source-Controlled Project Files## Vulnerability Details **File Location**: `SKILL.md:232-241`; related guidance in `templates/SHARESDK_README.md:51-64` **Vulnerability Type**: Insecure plaintext storage of SDK and social-platform credentials **Risk Level**: Medium **Vulnerable Code**: ```groovy // Add the plugin at the beginning of the file apply plugin: 'com.mob.sdk' // Add the MobSDK configuration at the end of the file MobSDK { appKey "{user-supplied appKey}" appSecret "{user-supplied appSecret}" gui true ShareSDK { loopShare true devInfo { // Platform configuration generated from user-supplied values {platform configuration blocks} } } } ``` The generated documentation also promotes the same configuration pattern: ```groovy MobSDK { appKey "your_app_key" appSecret "your_app_secret" ShareSDK { devInfo { // Douyin { // appId "your_app_id" // appSecret "your_app_secret" // } } } } ``` ### Technical Analysis The workflow collects MobTech and social-platform credentials in `ShareSDK_Config.xlsx` and directs the Agent to copy the populated values into `app/build.gradle`. Gradle build files are commonly tracked by version control, copied into project archives, processed by CI systems, and included in diagnostic output. The Skill does not instruct users to exclude the populated workbook or a secret-bearing configuration file from version control. It also does not separate credentials from committed source code through environment variables, an untracked properties file, or a CI secret manager. Values compiled into an Android client must not be treated as strongly confidential because a distributed APK can be inspected. Nevertheless, storing them directly in source-controlled files creates additional and avoidable exposure through repository history, for ...[truncated 1583 chars]
Remediation
## Remediation Suggestions 1. Do not write real secrets directly into tracked `app/build.gradle` files. 2. Load configuration from an untracked `local.properties`, a user-specific Gradle properties file, or environment variables. 3. In CI, inject values from the platform’s encrypted secret manager and restrict access to authorized jobs and maintainers. 4. Add `ShareSDK_Config.xlsx` and all local secret-property files to `.gitignore` before creating or populating them. 5. Commit only placeholder values and provide a sanitized example configuration. 6. Ensure generated documentation, command output, errors, and build logs never echo credential values. 7. Apply provider-side restrictions wherever supported, including application package, signing-certificate, redirect-URI, API-scope, and quota restrictions. 8. Document that credentials embedded in a client APK are recoverable and must not grant sensitive server-side privileges. 9. Add automated secret scanning to pre-commit hooks and CI pipelines. 10. Rotate credentials immediately if they have already entered repository history, logs, artifacts, or shared archives; merely deleting them from the latest revision is insufficient.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The declared description presents this skill as an interactive assistant for ShareSDK Android integration, with a guided workflow and user confirmations across setup steps like Gradle configuration, devInfo, and privacy compliance. The supplied code does not implement any interactive behavior, trigger handling, conversational flow, or Android integration logic. Instead, it is a Python utility that uses openpyxl to create and save an Excel template listing configuration parameters for ShareSDK and related platforms. While the generated template is related to ShareSDK configuration, the primary behavior is materially different from the declared purpose: file generation rather than an interactive integration guide. This constitutes a description-behavior mismatch.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The template explicitly asks the user to paste highly sensitive secrets such as appSecret and platform credentials into the skill workflow, but provides no warning, masking guidance, or safer handling path. In an agent setting, this creates a real risk of credential disclosure to the model, logs, chat history, or downstream tooling, which could enable unauthorized use of third-party developer accounts and APIs.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The instruction that the user should reply '填写好了' so the system can 'automatically complete integration configuration' implies the agent may proceed with project configuration changes without clearly stating scope, files affected, or requiring explicit approval for modifications. In a coding-assistant context, ambiguous automation increases the chance of unintended or unsafe edits to build files, manifests, SDK configuration, or privacy-related settings.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The manifest description says to use the skill when the user says phrases like "我要在app中增加分享能力" and also when they ask about broad topics such as "Android分享功能" or social sharing SDK integration. These triggers are not limited to MobTech ShareSDK and could match generic requests about Android sharing, causing the skill to activate outside its intended scope.

Vague Triggers

Medium
Confidence
93% confidence
Finding
Examples like "我要在app中增加分享能力", "帮我配置微信分享", and "自动配置 ShareSDK" are broad enough to overlap with ordinary Android feature requests or other sharing SDKs. Although the file mentions prioritizing this skill for ShareSDK-related questions, it does not provide negative examples or explicit rules for when generic sharing requests should not invoke it.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill declares a narrow scope around sharing SDK integration and compliance, but it also includes third-party login guidance. Expanding from sharing into authentication changes the data-sensitivity profile and may lead users to introduce login/token-handling code without appropriate review, consent flows, or storage protections.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The login example exposes access to user identifiers and OAuth-like tokens through platform.getDb().getUserId() and getToken(), which is materially more sensitive than share-only integration. In the context of a sharing setup skill, surfacing token access can normalize collection of credentials or identifiers without sufficient justification or safeguards.

External Transmission

Medium
Category
Data Exfiltration
Content
data = [
        ["SinaWeibo.appKey", "新浪微博 App Key", ""],
        ["SinaWeibo.appSecret", "新浪微博 App Secret", ""],
        ["SinaWeibo.redirectUri", "回调地址(默认:https://api.weibo.com/oauth2/default.html)", "https://api.weibo.com/oauth2/default.html"],
        ["SinaWeibo.shareByAppClient", "是否使用客户端分享(默认true)", ""],
    ]
    return create_sheet_with_header(wb, "微博", headers, data)
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
data = [
        ["SinaWeibo.appKey", "新浪微博 App Key", ""],
        ["SinaWeibo.appSecret", "新浪微博 App Secret", ""],
        ["SinaWeibo.redirectUri", "回调地址(默认:https://api.weibo.com/oauth2/default.html)", "https://api.weibo.com/oauth2/default.html"],
        ["SinaWeibo.shareByAppClient", "是否使用客户端分享(默认true)", ""],
    ]
    return create_sheet_with_header(wb, "微博", headers, data)
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This markdown file presents all trigger and usage examples exclusively in Chinese, which can amount to a language policy violation when no user opt-in or scope limitation is stated. The file does not indicate that the skill is intended only for Chinese-speaking users or provide any alternative language option.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The README’s user-facing instructions, triggers, and workflow are presented only in Chinese. Under the policy for natural-language issues, forcing a specific language without user opt-in can be a locale/language policy violation when no alternative or choice is offered.

Natural-Language Policy Violations

Low
Confidence
97% confidence
Finding
SQP-3 applies to all file types and includes language or locale policy violations. The module docstring and subsequent user-facing strings are presented only in Chinese, which effectively forces a specific language for users without any opt-in or justification in this file.

Static analysis

No suspicious patterns detected.