Back to skill

Security audit

MOSS TTSD 多人对话合成

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims: it sends user-provided dialogue text to MOSI Studio to generate a WAV dialogue file, with some ordinary privacy and credential-handling cautions.

Install only if you are comfortable sending the dialogue text to MOSI Studio. Prefer setting MOSI_TTS_API_KEY through a protected environment or secret manager instead of passing --api-key on the command line, and choose an output path carefully because the script writes the WAV file there.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/mosi_dialogue.sh:70
Finding
API Credential Exposure Through Command-Line Arguments## Vulnerability Details **File Location**: `scripts/mosi_dialogue.sh`, lines 70 and 117-120; documented in `SKILL.md`, line 110 **Vulnerability Type**: API credential disclosure through process arguments and shell history **Risk Level**: Medium ### Vulnerable Code ```bash --api-key|-k) API_KEY="$2"; shift 2 ;; ``` ```bash RESPONSE=$(curl -sf -X POST \ "https://studio.mosi.cn/api/v1/audio/speech" \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ --max-time 1800 \ -d "$PAYLOAD") ``` The corresponding documented option is: ```text --api-key, -k KEY Override MOSI_TTS_API_KEY env var ``` ### Technical Analysis The script permits users to provide the MOSI API key through the `--api-key` command-line option. A key supplied this way may be recorded in shell history and is included in the argument list of the running shell script. The script also expands the key into curl's `Authorization` header argument. Consequently, the bearer token can appear in curl's process argument list for the duration of the network request. Because the request permits a timeout of up to 1,800 seconds, a slow or stalled request may increase the period during which the credential is observable. Process arguments may be accessible through operating-system process inspection interfaces to other local users or processes, depending on host permissions and process isolation. This is not remote credential disclosure by itself; exploitation requires suitable local access or access to retained command history. ### Attack Path 1. A user invokes the script with `--api-key SECRET`, or the script expands `MOSI_TTS_API_KEY` into curl's authorization-header argument. 2. The secret is retained in shell history when entered directly on the command line, or becomes visible in the process arguments while the script or curl process is running. 3. A local attacker or compromised process with p ...[truncated 684 chars]
Remediation
## Remediation Suggestions 1. Remove the `--api-key` option and require the credential to be supplied through a protected secret store or environment variable. 2. Avoid placing the authorization header directly in curl's command-line arguments. Pass sensitive curl configuration through standard input, for example: ```bash printf 'header = "Authorization: Bearer %s"\n' "$API_KEY" | curl --config - \ --fail --silent --show-error \ --request POST \ "https://studio.mosi.cn/api/v1/audio/speech" \ -H "Content-Type: application/json" \ --max-time 1800 \ --data-binary "$PAYLOAD" ``` 3. If standard-input configuration is unsuitable, use a temporary curl configuration file created with restrictive permissions such as mode `0600`, install cleanup traps, and securely remove the file immediately after use. 4. Document that users must not place credentials directly in shell commands. Recommend a platform-supported secret manager and ensure logs never print the key. 5. Clear the in-memory shell variable with `unset API_KEY` after the request where practical, and rotate any credential suspected of prior exposure. 6. Harden host process visibility, such as restricting `/proc` access, as defense in depth rather than as the primary fix.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill documentation exposes shell-based execution paths but does not declare any tool scope such as permissions or allowed-tools. This can lead to overbroad execution in agent environments, where the skill may invoke shell commands without explicit sandboxing or user-visible authorization boundaries.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill sends user-provided dialogue text to an external MOSI service and depends on an API key, but the description does not clearly warn users about this data transfer. This creates a privacy and consent risk because users may provide sensitive conversation content without realizing it leaves the local environment and is processed by a third party.

External Transmission

Medium
Category
Data Exfiltration
Content
echo "Generating dialogue (${#SPEAKERS_JSON} speakers)..." >&2

RESPONSE=$(curl -sf -X POST \
  "https://studio.mosi.cn/api/v1/audio/speech" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Low
Confidence
88% confidence
Finding
This shell script creates the output directory and writes decoded audio to the specified path, which is a file-system side effect. Although it reports the saved path afterward, there is no prior warning, confirmation, or explicit disclosure near the write operation itself beyond the generic usage text.

Static analysis

No suspicious patterns detected.