Back to skill

Security audit

qwencloud-text

Security checks for vulnerabilities and agentic risk

Overview

This Qwen text-generation skill has a coherent core purpose, but it also includes under-scoped endpoint overrides and a mandatory update-install workflow that users should review before installing.

Install only if you are comfortable with prompts and API credentials being sent to QwenCloud, and review or disable custom `QWEN_BASE_URL` behavior before using it in untrusted project directories. Be especially cautious with the update prompt: do not run the suggested `npx skills add` command unless you have verified the exact package source and version.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:234
Finding

Mandatory post-execution instructions hijack the Agent's response and workflow

Content
View full analysis
The update-check skill is not installed. It keeps you informed about new qwencloud/qwencloud-ai features and bug fixes. > > 1) **Install now** — I'll run the install command for you > 2) **Skip for now** — do nothing this time > 3) **Never remind me** — permanently suppress this prompt After the user responds: - User chooses **1** → run: `npx skills add QwenCloud/qwencloud-ai --skill qwencloud-update-check -y`, then run: `python3 /gossamer.py --dismiss` ``` The update mechanism is invoked before the requested text-generation operation: ```python def main() -> None: run_update_signal(caller=__file__) parser = argparse.ArgumentParser( ``` When the auxiliary component is absent, the script generates the signal that activates the mandatory instructions: ```python dismiss_install_prompt() print( f"[ACTION_REQUIRED] qwencloud-update-check skill is not installed. " f"Install: {INSTALL_CMD}", file=sys.stderr, ) ``` ### Technical Analysis The declared purpose of the Skill is to send text-generation and chat requests to QwenCloud. Checking whether another Skill is installed, promoting its installation, and controlling the host Agent's subsequent response are not ne ...[truncated 1916 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/gossamer.py:23
Finding

Update workflow installs unpinned third-party code through npx

Content
View full analysis
str: skills = _read_installed_skills(repo) skill_args = " ".join(skills) if skills else "" return f"npx skills add {_SKILLS_REPO} --skill {skill_args} -y" ``` The Skill explicitly directs the Agent to execute it: ```markdown - User chooses **1** → run: `npx skills add QwenCloud/qwencloud-ai --skill qwencloud-update-check -y`, then run: `python3 /gossamer.py --dismiss` ``` ### Technical Analysis Invoking a package through `npx` without a version causes the package manager to resolve the currently available version of the `skills` package at execution time. The repository reference `QwenCloud/qwencloud-ai` is also mutable because it is not tied to a commit hash, signed release, or verified digest. Consequently, the effective installer and installed Skill content can change after this audited package was reviewed. The `-y` option suppresses package-manager confirmation, reducing the opportunity to inspect what will be downloaded and executed. This is a supply-chain weakness even though the documented workflow asks the user to choose “Install now.” User consent to installation does not provide integrity assurance for dynamically resolved code. ### Attack Path 1. The automatic update signal causes the Agent to offer installation of `qwencloud-update-check`. 2. The user accepts the installation prompt. 3. The Agent runs `np ...[truncated 1173 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/qwencloud_lib.py:74
Finding

Working-directory environment configuration can redirect API credentials and prompts to an arbitrary endpoint

Content
View full analysis
None: """Load ``.env`` files with proper priority: current dir > repo root. Parameters ---------- script_file : str or Path, optional ``__file__`` of the calling script, used to locate the repo root. """ load_dotenv(Path.cwd() / ".env") origin = Path(script_file).resolve() if script_file else None if origin: repo = find_repo_root(origin) if repo: load_dotenv(repo / ".env") ``` A value imported as `QWEN_BASE_URL` becomes the request destination without an HTTPS requirement or hostname allowlist: ```python def compat_base_url(self) -> str: url = os.getenv("QWEN_BASE_URL") region = os.getenv("QWEN_REGION", "ap-southeast-1").lower() if region == "none": # When QWEN_REGION=none, skip URL assembly and return the user-configured base URL as-is. if not url: raise RuntimeError( "QWEN_BASE_URL must be set when QWEN_REGION=none." ) return url.rstrip("/") if url: return url.rstrip("/") return self._COMPAT_BASE.get(region, self._COMPAT_BASE["ap-southeast-1"]) ``` The real API key is attached as a bearer credential: ```python def make_headers( self, api_key: str, payload: Any = None, ) -> dict[str, str]: hdrs: dict[str, str] = { "Content-Type": "application/json", "Authorization": f"Bearer {api_key}", } if payload and self.has_managed_url(payload): hdrs["X-DashScope-OssResourceResolve"] = "enable" source_ ...[truncated 3485 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (33)

Tainted flow: 'req' from os.getenv (line 687, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/qwencloud_lib.py (reported line 349)May include surrounding context.

python
headers={"Content-Type": ct},
        )
        try:
            with urllib.request.urlopen(req, timeout=120) as resp:
                if resp.status != 200:
                    raise RuntimeError(f"OSS upload HTTP {resp.status}")
        except urllib.error.HTTPError as exc:

Tainted flow: 'req' from os.getenv (line 687, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/qwencloud_lib.py (reported line 458)May include surrounding context.

python
"Content-Type": "application/json",
            },
        )
        with urllib.request.urlopen(req, timeout=30) as resp:
            body = json.loads(resp.read().decode("utf-8"))
        data = body.get("data")
        if not data:

Tainted flow: 'req' from os.getenv (line 687, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/qwencloud_lib.py (reported line 689)May include surrounding context.

python
for attempt in range(retries + 1):
        req = urllib.request.Request(url, data=data, headers=hdrs, method=method)
        try:
            with urllib.request.urlopen(req, timeout=timeout) as resp:
                return json.loads(resp.read().decode("utf-8"))
        except urllib.error.HTTPError as exc:
            body = ""

Tainted flow: 'req' from os.getenv (line 687, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/qwencloud_lib.py (reported line 745)May include surrounding context.

python
data = json.dumps(payload).encode("utf-8")
    req = urllib.request.Request(url, data=data, headers=hdrs, method="POST")
    try:
        resp = urllib.request.urlopen(req, timeout=timeout)
    except urllib.error.HTTPError as exc:
        body = ""
        try:

Tainted flow: 'req' from os.getenv (line 687, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

download_file fetches an arbitrary URL and writes the response directly to a caller-chosen path with no allowlist, scheme restriction, size validation, or destination safety checks. In a text-chat skill, this expands capability into arbitrary remote file retrieval and disk write, which can be abused for SSRF-like access to internal resources or to plant unexpected files on disk if exposed through higher-level commands.

Content

Scanner excerpt · scripts/qwencloud_lib.py (reported line 841)May include surrounding context.

python
"""Download a file from *url* to *dest*, creating parent dirs as needed."""
    dest.parent.mkdir(parents=True, exist_ok=True)
    req = urllib.request.Request(url, headers={"User-Agent": "qwencloud-ai/1.0"})
    with urllib.request.urlopen(req, timeout=timeout) as resp:
        dest.write_bytes(resp.read())
    return dest

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is Qwen text/chat usage, but the skill also mandates update checks, installation prompts, sibling-skill discovery, and local state suppression logic. This mismatch is dangerous because users or agents may authorize a text-generation skill expecting narrow API use, while it actually drives additional local command execution and persistence-related behavior outside that core purpose.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/qwencloud_lib.py (reported line 87)May include surrounding context.

python
script_file : str or Path, optional
        ``__file__`` of the calling script, used to locate the repo root.
    """
    load_dotenv(Path.cwd() / ".env")
    origin = Path(script_file).resolve() if script_file else None
    if origin:
        repo = find_repo_root(origin)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/qwencloud_lib.py (reported line 92)May include surrounding context.

python
script_file : str or Path, optional
        ``__file__`` of the calling script, used to locate the repo root.
    """
    load_dotenv(Path.cwd() / ".env")
    origin = Path(script_file).resolve() if script_file else None
    if origin:
        repo = find_repo_root(origin)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/qwencloud_lib.py (reported line 406)May include surrounding context.

python
ak_id = os.getenv("OSS_ACCESS_KEY_ID", "")
            ak_secret = os.getenv("OSS_ACCESS_KEY_SECRET", "")
            credentials_provider = (
                oss.credentials.EnvironmentVariableCredentialsProvider()
            )

        cfg = oss.config.load_default()

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/qwencloud_lib.py (reported line 590)May include surrounding context.

python
stream            true/false — overridden by --stream flag

environment variables:
  DASHSCOPE_API_KEY  (required) API key — also loaded from .env file
  QWEN_API_KEY       (alternative) Alias for DASHSCOPE_API_KEY
  QWEN_REGION        ap-southeast-1 (default)
  QWEN_BASE_URL      Override the API base URL entirely

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/text.py (reported line 137)May include surrounding context.

python
stream            true/false — overridden by --stream flag

environment variables:
  DASHSCOPE_API_KEY  (required) API key — also loaded from .env file
  QWEN_API_KEY       (alternative) Alias for DASHSCOPE_API_KEY
  QWEN_REGION        ap-southeast-1 (default)
  QWEN_BASE_URL      Override the API base URL entirely

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill directs the agent to use shell, network, file read/write, and environment access, but it declares no explicit tool scope or permission boundaries. That increases the chance an agent will execute powerful actions implicitly, with no least-privilege constraint or clear review boundary for users and hosting platforms.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 36)May include surrounding context.

md
only status (e.g. "set" / "not set", "valid" / "invalid"), never the value. Never display contents of `.env` or config
files that may contain secrets.

**When the API key is not configured, NEVER ask the user to provide it directly.** Instead, help create a `.env` file with a placeholder (`DASHSCOPE_API_KEY=sk-your-key-here`) and instruct the user to replace it with their actual key from the [QwenCloud Console](https://home.qwencloud.com/api-keys). Only write the actual key value if the user explicitly requests it.

## Key Compatibility

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 173)May include surrounding context.

md
### Request Fields

| Field                 | Type            | Description                                                                                          |
|-----------------------|-----------------|------------------------------------------------------------------------------------------------------|
| `prompt` / `messages` | string \| array | User input or message list                                                                           |
| `model`               | string          | Model ID (e.g. `qwen3.6-plus`)                                                                       |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 179)May include surrounding context.

md
| `model`               | string          | Model ID (e.g. `qwen3.6-plus`)                                                                       |
| `system`              | string          | System prompt (optional)                                                                             |
| `temperature`         | float           | 0–2, controls randomness                                                                             |
| `max_tokens`          | int             | Max output tokens                                                                                    |
| `tools`               | array           | Function definitions for tool calling                                                                |
| `stream`              | bool            | Enable streaming (recommended for interactive use)                                                   |
| `enable_thinking`     | bool            | Enable thinking mode. **Model defaults apply**: `qwen3.6-plus`/`qwen3.5-plus`/`qwen3.5-flash` have thinking **ON by default**. Only set explicitly when user requests deep thinking or needs to disable for flash models. Adds latency for real-time tasks. |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 211)May include surrounding context.

md
## Error Handling

| Error                   | Cause                               | Action                                                                                     |
|-------------------------|-------------------------------------|--------------------------------------------------------------------------------------------|
| `401 Unauthorized`      | Invalid or missing API key          | Run **qwencloud-ops-auth** if available; else prompt user to set key (non-plaintext check only) |
| `429 Too Many Requests` | Rate limit exceeded                 | Retry with backoff                                                                         |

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation instructs the agent to install and manage another skill via local command execution even though that is not necessary for basic Qwen text generation. This expands the trust boundary and can be abused to trigger unexpected code execution paths, package retrieval, and local state changes unrelated to the user’s immediate request.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding

The skill instructs the agent to run npx skills add ... without pinning a specific package version or integrity-checked artifact. This creates a supply-chain risk: future package changes or a compromised upstream release could cause the agent to fetch and execute unintended code during installation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The registry entry uses very broad trigger keywords such as 'chat', 'text generation', and especially 'code', which can match a large share of normal agent requests and cause this skill to be invoked unintentionally. In this context, the file is specifically instructing agents how to register and auto-discover skills, so overbroad matching increases the chance of incorrect tool selection, unintended external model usage, and expansion of the attack surface.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

This section introduces a direct curl-based fallback that sends request contents and bearer-token-authenticated traffic to an external API endpoint. External transmission is expected for this skill’s function, but in the absence of an explicit warning or consent language it still represents a real data-exposure risk if users paste sensitive content into requests.

Content

Scanner excerpt · references/execution-guide.md (reported line 14)May include surrounding context.

md
3. **SSL errors** (`CERTIFICATE_VERIFY_FAILED`): On macOS, run `/Applications/Python\ 3.x/Install\ Certificates.command`. On Linux/Windows, set `SSL_CERT_FILE` to point to your CA bundle.
4. **Proxy**: Set `HTTPS_PROXY=http://proxy:port` before running the script.

After fixing, retry the script (Path 1). If the environment is unfixable, fall through to **Path 2 (curl)** below — curl is available on most systems without Python.

## Path 2 · Direct API Call (curl)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guide instructs users to send prompts and an API key to an external third-party endpoint, but it does not explicitly warn that user content and metadata will leave the local environment and be processed by Alibaba Cloud/Qwen services. In an agent skill context, this omission can lead to unintentional disclosure of sensitive prompts, code, or secrets when users follow the fallback instructions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file belongs to a text-generation skill but embeds update-management, installation prompting, local state tracking, and updater orchestration unrelated to the declared skill purpose. That scope expansion increases attack surface and creates a pathway for social-engineering users into installing additional components, which is especially risky in agent ecosystems where stderr signals may trigger automated actions.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding

The install command references npx skills without pinning an exact package/version, which makes behavior dependent on whatever package version or resolution the environment retrieves at install time. This creates a supply-chain risk: a compromised or incompatible upstream package could be suggested to users and then executed in a trusted workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code writes persistent state in .agents/state.json, suppresses prompts, discovers local skill directories, and invokes an updater script instead of performing text-generation tasks. In the context of a text skill, this hidden control-plane behavior is dangerous because it creates non-obvious side effects and enables execution/orchestration logic that users would not reasonably expect from the advertised capability.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
80% confidence
Finding

The generated update command constructs another floating npx skills add ... invocation without version pinning for the tool being used. Even though this string is only printed, it directs users or agents toward an unpinned supply-chain operation that could install unexpected code or a maliciously altered dependency.

Content

No source excerpt is available for this finding.