Back to skill

Security audit

musa-torch-coding

Security checks for vulnerabilities and agentic risk

Overview

The package appears to be a MUSA/PyTorch GPU coding and conversion skill, but its metadata advertises OpenAI Whisper transcription and requests an unrelated OpenAI API key.

Do not install this as an audio transcription skill. Only consider it if you specifically want MUSA/PyTorch coding help, and only after the publisher fixes the metadata, removes the unrelated OPENAI_API_KEY requirement, and clearly documents any file-conversion and privileged setup steps.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:2
Finding
Unnecessary Sensitive Credential Requirement in Misleading Skill Metadata## Vulnerability Details **File Location**: `SKILL.md`, lines 2–11 **Vulnerability Type**: Violation of least privilege through an unnecessary credential requirement **Risk Level**: Medium ### Vulnerable Code ```yaml name: musa-torch-coding description: Transcribe audio via OpenAI Audio Transcriptions API (Whisper). homepage: https://platform.openai.com/docs/guides/speech-to-text metadata: { "openclaw": { "emoji": "☁️", "requires": { "bins": ["curl"], "env": ["OPENAI_API_KEY"] }, "primaryEnv": "OPENAI_API_KEY", }, } ``` ### Technical Analysis The metadata declares that the Skill requires the `OPENAI_API_KEY` environment variable and the `curl` executable. It also describes the Skill as an OpenAI audio transcription integration. However, the substantive Skill documentation and executable files implement MUSA GPU guidance, CUDA-to-MUSA source conversion, and a MUSA-compatible YOLO template. None of the reviewed executable code uses `OPENAI_API_KEY`, `curl`, or the OpenAI API. Requiring a sensitive credential that is unrelated to the implemented functionality violates the principle of least privilege. A compatible host may provision the API key into the Skill's execution environment solely because the metadata declares it as required. The metadata inconsistency is security-relevant because it unnecessarily expands the set of secrets available in the Skill context. The reviewed project contains no code that reads, transmits, or otherwise exfiltrates the key, so active credential theft is not established. ### Attack Path 1. A user or automation platform installs or loads the Skill. 2. The platform processes the `openclaw.requires.env` and `primaryEnv` declarations. 3. To satisfy those declarations, the platform makes `OPENAI_API_KEY` available to the Skill execution context. 4. The Skill performs MUSA-related operations that do not require this credential. 5. T ...[truncated 900 chars]
Remediation
## Remediation Suggestions 1. Remove the unrelated credential and executable requirements: ```yaml metadata: { "openclaw": { "emoji": "☁️", }, } ``` 2. Remove `primaryEnv: "OPENAI_API_KEY"` unless the Skill gains a documented feature that genuinely requires the OpenAI API. 3. Replace the audio-transcription description and OpenAI homepage with accurate MUSA/PyTorch metadata. 4. Declare only dependencies required by the implemented functionality, such as Python and the expected MUSA libraries where appropriate. 5. Add automated metadata validation that compares declared environment variables and executables against actual code usage. 6. Configure the hosting platform to require explicit user approval before exposing credentials to a Skill, even when its metadata requests them. 7. If OpenAI functionality is intentionally added later, isolate it as an optional capability and grant a narrowly scoped, revocable key only when that capability is invoked.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared purpose is audio transcription, but the content describes file transformation, CUDA-to-MUSA migration, and batch processing of source files and directories. A skill that appears to process audio but can steer an agent into source-code rewriting or filesystem operations creates a significant trust and authorization gap.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared purpose is audio transcription, but the content describes file transformation, CUDA-to-MUSA migration, and batch processing of source files and directories. A skill that appears to process audio but can steer an agent into source-code rewriting or filesystem operations creates a significant trust and authorization gap.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The manifest and documentation present materially different intents: audio transcription versus GPU/PyTorch code generation and environment setup. This kind of semantic deception undermines security review and policy enforcement because the skill's trusted label does not match its operative instructions.

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The top-level intent contradicts the rest of the document, indicating either sloppy packaging or deliberate repurposing. In either case, contradiction at the entry point makes the skill more dangerous because users and automated systems rely on top-level metadata to decide whether invoking the skill is appropriate.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
This file implements YOLOv8 training, validation, prediction, and model export, which does not match the declared skill purpose of audio transcription via the OpenAI Whisper API. In an agent skill ecosystem, capability mismatch is dangerous because it can mislead reviewers and users, expand the effective attack surface, and permit execution of unintended ML workloads or access to local devices/files under a false description.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The reference file is materially unrelated to the declared skill purpose of transcribing audio with the OpenAI Whisper API, and instead provides GPU build and development guidance for MUSA/torch_musa. In an agent skill, mismatched reference material can mislead downstream automation or users into executing irrelevant build steps, changing system configuration, or trusting incorrect operational guidance, increasing the chance of unsafe actions and supply-chain style misuse.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The file’s behavior is materially inconsistent with the declared skill purpose: instead of audio transcription, it implements a filesystem-based source-code rewriting tool. In an agent skill context, this kind of hidden capability is dangerous because it expands the skill’s effective privileges to arbitrary code modification, which can enable unauthorized tampering, persistence, or supply-chain abuse if invoked on user or workspace files.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The script recursively enumerates Python files and rewrites them to an arbitrary output path, giving the skill bulk source-code transformation capability unrelated to transcription. In the context of a mismatched skill, this is dangerous because an agent or user may trust the skill for harmless audio processing while it can actually alter large portions of a codebase, causing integrity loss or introducing malicious or unsafe changes at scale.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises one purpose in metadata but declares no explicit tool scope while its content clearly instructs environment inspection, shell command use, and operations that imply file access. In an agent setting, missing scope boundaries can let the skill trigger broader capabilities than users would reasonably expect, reducing transparency and increasing the chance of unintended system interaction.

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
The file states it is a guide for PyTorch code targeting Moore Threads MUSA GPUs and includes a Chinese company name, but more importantly frames the skill around a specific Chinese vendor ecosystem without offering any language or locale choice. Under the policy, forcing a specific language/locale requires user opt-in or a clearly documented, justified regional constraint; this file does not provide that clarification.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
## Troubleshooting

- **Device not found**: Ensure user is in `render` group: `sudo usermod -aG render $(whoami)`
- **Library not found**: Check `LD_LIBRARY_PATH` includes `/usr/local/musa/lib/`
- **Build issues**: Clean and rebuild: `python setup.py clean && bash build.sh`
- **Docker issues**: Use `--env MTHREADS_VISIBLE_DEVICES=all`
Confidence
88% confidence
Finding
The troubleshooting section recommends running a privileged command (`sudo usermod -aG render $(whoami)`) to change group membership. In an agent or assistive automation context, suggesting privilege escalation without strong safeguards can lead to unsafe host modification, especially when embedded in a skill whose declared purpose is unrelated to system administration.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The module docstring explicitly states the code is a YOLOv8n template for MUSA GPU, directly contradicting the skill's stated purpose of audio transcription. This inconsistency increases risk because it signals the package may contain unrelated or misplaced functionality, making it harder to audit and easier for hidden or unintended behavior to be shipped unnoticed.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
### 1. **设备查看问题**

* 普通用户需添加至render group
* 使用`sudo usermod -aG render $(whoami)`

### 2. **计算库无法找到**
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Natural-Language Policy Violations

Low
Confidence
96% confidence
Finding
SQP-3 applies to all file types and covers natural-language policy violations such as forcing a specific language without user opt-in. This markdown file presents all instructions and guidance exclusively in Chinese, with no indication that the user can choose another language or that the restriction is required for a region-specific purpose.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The top-level docstring includes a Chinese-only descriptive line for the tool, with no indication that language is selectable or that the skill is region-specific. This can conflict with language/locale policy expectations when users have not opted into Chinese output or documentation.

Static analysis

No suspicious patterns detected.