Back to skill

Security audit

Android Smssdk Integration

Security checks for vulnerabilities and agentic risk

Overview

This is a mostly coherent SMSSDK setup guide, but it needs review because it handles secrets, edits Android project files, runs Gradle with unsafe path handling, and uses an unpinned build plugin.

Install only if you specifically want MobTech SMSSDK integration for an Android project. Keep credentials out of committed files, avoid using the project-root spreadsheet for real secrets unless it is ignored and removed, pin the MobSDK Gradle plugin to a reviewed version, and run Gradle commands manually from a trusted project path rather than through interpolated shell snippets.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:270
Finding

Shell Command Injection Through an Unquoted Project Path

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 270-271
Vulnerability Type: Shell command injection through unsafe interpolation of user-controlled input
Risk Level: High

Vulnerable Code

bash
cd {project_path}
./gradlew --refresh-dependencies

Technical Analysis

The workflow places the user-supplied project_path directly into a shell command without quoting, escaping, canonicalization, or structured argument handling. Shell metacharacters in the path can consequently be interpreted as command separators, substitutions, redirections, or pipelines rather than as part of a directory name.

Merely checking whether the supplied path exists does not make subsequent shell interpolation safe. For example, unusual but valid directory names can contain shell metacharacters, and validation performed against the raw string may not correspond to how a shell later parses that string.

Attack Path

  1. An attacker creates or identifies an Android project whose supplied path contains shell metacharacters.
  2. The attacker provides a value shaped like /tmp/android-project; attacker-command.
  3. The Skill validates or otherwise accepts the project path.
  4. During Gradle synchronization, the Agent constructs and executes:
    bash
    cd /tmp/android-project; attacker-command
    ./gradlew --refresh-dependencies
    
  5. The shell treats the injected separator and following text as an independent command.
  6. The injected command executes with the same operating-system identity and permissions as the Agent.

Impact Assessment

Successful exploitation permits arbitrary command execution under the Agent's account. Depending on that account's permissions, an attacker could read accessible credentials and source code, modify files outside the Android project, execute additional programs, alter build outputs, or destroy data. The flaw itself does not grant privileges above those already hel ...[truncated 66 chars]

Remediation
View remediation

Remediation Suggestions

  • Do not interpolate the project path into a shell command.
  • Invoke Gradle through a structured process API, passing the validated project directory through the API's cwd parameter and the executable and arguments as separate values.
  • Canonicalize the path before use and confirm that it points to the expected Android project root.
  • Reject control characters and unexpected path forms.
  • If shell execution is unavoidable, apply platform-appropriate shell quoting to the entire path. Structured process invocation remains preferable.
  • Execute Gradle with the minimum necessary permissions and without access to unrelated credentials.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:190
Finding

Unpinned Executable Gradle Plugin Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 190, 214, 525, and 545
Vulnerability Type: Mutable third-party build dependency
Risk Level: Medium

Vulnerable Code

The same dynamic dependency declaration is recommended in multiple Gradle configuration examples:

groovy
buildscript {
    dependencies {
        // Add MobSDK plugin configuration
        classpath "com.mob.sdk:MobSDK2:+"
    }
}

Technical Analysis

The + version selector instructs Gradle to resolve the newest available matching release rather than a specifically reviewed version. Gradle plugins execute code during project configuration and build operations, so the effective executable code can change after the Skill has been audited.

The workflow compounds this exposure by directing the Agent to refresh dependencies:

bash
./gradlew --refresh-dependencies

This produces non-reproducible builds and expands trust to every future version published under the dependency coordinate and to the configured repository serving it. The audit found no dependency-locking, checksum-verification, or Gradle dependency-verification requirement.

Attack Path

  1. A malicious or compromised version becomes the newest release available for com.mob.sdk:MobSDK2.
  2. A developer follows the Skill and adds classpath "com.mob.sdk:MobSDK2:+".
  3. The Agent or developer runs Gradle with dependency refresh enabled.
  4. Gradle resolves and downloads the new unreviewed plugin version.
  5. The plugin executes during Gradle configuration or build processing with the developer or Agent account's permissions.

This path requires compromise or malicious publication through the trusted upstream dependency channel; the audited repository itself does not contain evidence that the current upstream package is malicious.

Impact Assessment

A malicious Gradle plugin could access source code, local build credentials, environment ...[truncated 268 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace MobSDK2:+ with an exact, reviewed version.
  • Document a controlled process for reviewing and upgrading that version.
  • Enable Gradle dependency verification and commit trusted checksums or signatures.
  • Use dependency locking where applicable to preserve reproducible resolution.
  • Restrict repositories to required trusted sources and avoid unnecessary repository declarations.
  • Run builds in an isolated, least-privileged environment without unrelated credentials.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:94
Finding

Plaintext Storage and Client Embedding of the AppSecret

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 94-104 and 123-130; credential embedding at lines 237-256
Vulnerability Type: Insecure handling and persistence of sensitive credentials
Risk Level: High

Vulnerable Code

The workflow instructs the Agent to generate a project-root spreadsheet and have the user enter the credentials:

bash
python {skill_dir}/assets/generate_excel_template.py

It then copies the template to the project as SMSSDK_Config.xlsx and asks the user to enter the AppKey and AppSecret. The values are subsequently placed into Gradle configuration:

groovy
MobSDK {
    appKey "{user-supplied appKey}"
    appSecret "{user-supplied appSecret}"
    SMSSDK {}
}

Technical Analysis

The AppSecret is persisted in a plaintext spreadsheet located at the Android project root and is then embedded into project configuration. The workflow does not require either file to be excluded from version control, restrict file permissions, redact the value from Agent output, remove the temporary spreadsheet after integration, or scan for accidental exposure.

Project-root files are commonly committed, archived, shared with collaborators, uploaded to CI systems, or included in support bundles. Moreover, credentials embedded in an Android client or its build configuration should be treated as recoverable by anyone who receives the application package. A mobile client cannot provide durable confidentiality for a privileged static secret.

Attack Path

  1. The user enters the AppSecret into SMSSDK_Config.xlsx.
  2. The Agent reads that file and writes the value into Gradle configuration.
  3. The spreadsheet or modified Gradle file is committed to source control, copied into a backup, exposed to CI logs, or shared as part of the project.
  4. Alternatively, the secret is propagated into the distributed Android application and extracted through application inspection.
  5. An una ...[truncated 571 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not place privileged long-lived secrets in a mobile client. Where the service supports it, keep privileged operations and secrets on a controlled backend.
  • Clarify which MobTech value is intended to be public client configuration and which must remain confidential.
  • If local build-time configuration is unavoidable, store it in a dedicated untracked local properties file rather than a project-root spreadsheet.
  • Automatically add all generated credential files to .gitignore before requesting credential entry.
  • Restrict local file permissions and avoid printing secret values in prompts, logs, generated documentation, or error messages.
  • Delete the temporary spreadsheet securely after the configuration has been consumed.
  • Add secret scanning to local hooks and CI pipelines.
  • Treat credentials already committed or included in distributed artifacts as exposed and rotate them.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:486
Finding

Application-Wide Cleartext Network Traffic Recommendation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 486
Vulnerability Type: Insecure transport configuration
Risk Level: Medium

Vulnerable Code

text
Android 9.0+ requires usesCleartextTraffic="true" when HTTP requests are needed

Technical Analysis

The documented recommendation points users toward enabling usesCleartextTraffic="true", which broadly permits cleartext HTTP traffic for the application. This weakens Android's default transport protections for all application components rather than limiting an exception to a specifically reviewed legacy endpoint.

Cleartext HTTP provides neither transport confidentiality nor server authenticity. Traffic may be observed or modified by an on-path attacker. A global manifest-level exception also affects future or unrelated components that begin using HTTP.

Attack Path

  1. A developer follows the integration guidance and enables application-wide cleartext traffic.
  2. SMSSDK, application code, or another dependency makes an HTTP request.
  3. The device connects through an attacker-controlled or otherwise hostile network.
  4. An on-path attacker observes the plaintext request or alters the request or response.
  5. Depending on the affected protocol, the attacker may capture exposed data, inject content, redirect traffic, or manipulate application behavior.

Impact Assessment

The scope includes any application component allowed to communicate over HTTP after the global setting is enabled. Exposed data and achievable manipulation depend on the actual HTTP endpoints and payloads. The configuration does not directly grant local privileges, but it can undermine confidentiality and integrity for affected network communications.

Remediation
View remediation

Remediation Suggestions

  • Require HTTPS for SDK and application endpoints.
  • Remove the recommendation to enable application-wide cleartext traffic.
  • If a documented legacy endpoint strictly requires HTTP, use Android Network Security Configuration to create the narrowest possible domain-specific exception.
  • Do not permit cleartext traffic for wildcard domains or unrelated application components.
  • Document the affected endpoint, justification, transmitted data, and planned migration to HTTPS.
  • Test release builds to ensure unexpected cleartext connections are rejected.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents this skill as an interactive Android SMSSDK integration assistant with a 6-step workflow and conversational progression based on user confirmation. The supplied code does not implement an interactive guide or any conversational logic. Instead, it is a standalone Python utility that creates a formatted Excel template file on disk with reference fields and instructions related to SMSSDK setup and privacy compliance. While the content domain is related to SMSSDK, the primary behavior is materially different: document generation rather than interactive integration assistance. This is an undeclared capability and a mismatched primary purpose.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest description uses broad invocation conditions like SMS verification, Gradle configuration, and privacy compliance, which extend beyond the skill's stated boundary of MobTech SMSSDK integration. In an agent environment, ambiguous routing can expose users to irrelevant third-party integration instructions, unnecessary secret handling, and project modification prompts in contexts where they are not appropriate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The invocation examples and workflow are written to expect Chinese phrases like “我要在app中增加短信验证,” and the document provides all user-facing interaction text in Chinese only. Because no language choice, opt-in, or explicit region-scoped justification is provided, this creates a locale policy concern for users who may not operate in Chinese.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad enough to match common Android/SMS-related requests that may not specifically ask for MobTech SMSSDK integration. This can cause the skill to activate in the wrong context and steer users toward editing project files, adding third-party repositories, or handling secrets when they only wanted general advice, increasing the chance of unsafe or unintended changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This file contains user-facing natural-language content such as the module description, sheet names, instructions, and status messages exclusively in Chinese. Because the skill does not provide an opt-in language choice or explicitly document that it is intended only for a Chinese locale, it may violate organizational language/locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains only Chinese-language trigger and usage examples, which can amount to a language/locale constraint in the skill's natural-language interface. There is no indication that users may interact in other languages or that the skill is intentionally limited to a Chinese-speaking audience.

Content

No source excerpt is available for this finding.