Back to skill

Security audit

Alibaba Cloud AI Image Qwen Image Edit

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Alibaba Cloud image-editing helper with disclosed credential, SDK, and output-file behavior, though users should treat its API key and saved request artifacts carefully.

Install this only in an isolated environment, pin or lock the dashscope dependency if reproducibility matters, use a narrowly scoped and revocable Alibaba Cloud key, avoid saving sensitive prompts or private image references longer than needed, and clean the output directory after use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:40
Finding
Unpinned Third-Party SDK Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 40–45 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium **Complete Code Snippet**: ```bash - Install SDK in a virtual environment: ```bash python3 -m venv .venv . .venv/bin/activate python -m pip install dashscope ``` ``` ### Technical Analysis The installation instruction retrieves `dashscope` and its transitive dependencies from the user's configured Python package index without a version constraint, lock file, or cryptographic hashes. Consequently, the exact code installed can change after the Skill has been reviewed. Python package installation may execute package-controlled build or installation logic. Runtime use of the installed SDK also executes its code in the process that has access to the Alibaba Cloud API credential. A compromised upstream release, dependency, package index, or dependency-resolution configuration could therefore introduce arbitrary code. The use of a virtual environment limits package installation to that environment but does not sandbox package execution or prevent access to the current user's files, environment variables, or network. ### Attack Path 1. An attacker compromises a future `dashscope` release, one of its transitive dependencies, or the package source used by the operator. 2. A user follows the Skill instructions and runs `python -m pip install dashscope`. 3. Pip resolves and installs the attacker-controlled mutable artifact because no audited version or hash is required. 4. Malicious installation or runtime code executes with the privileges of the user running pip or the SDK. 5. That code may read accessible files and environment variables, including `DASHSCOPE_API_KEY` when present, and transmit data using the user's network access. ### Impact Assessment Successful exploitation could provide code execution with the installing user's privileges. The affected scope includes ...[truncated 324 chars]
Remediation
## Remediation Suggestions 1. Pin `dashscope` to a specifically reviewed version rather than installing an unconstrained latest release. 2. Pin all transitive dependencies through a reviewed lock file. 3. Record and enforce cryptographic hashes with a command such as `pip install --require-hashes -r requirements.txt`. 4. Document the expected official package index and reject untrusted index overrides or extra indexes. 5. Perform installation and execution as an unprivileged user in an isolated environment. 6. Expose the API credential only to the process that requires it and use a narrowly scoped, revocable credential. 7. Add dependency vulnerability scanning and controlled update review to the release process.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill documents file read/write behavior through validation and output persistence, but it does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch weakens least-privilege controls and can cause an agent runtime to grant broader filesystem access than users or policy expect, especially because the skill writes artifacts and evidence files to persistent directories.

Session Persistence

Medium
Category
Rogue Agent
Content
## Validation

```bash
mkdir -p output/alicloud-ai-image-qwen-image-edit
python -m py_compile skills/ai/image/alicloud-ai-image-qwen-image-edit/scripts/prepare_edit_request.py && echo "py_compile_ok" > output/alicloud-ai-image-qwen-image-edit/validate.txt
```
Confidence
84% confidence
Finding
The validation and output guidance explicitly create and reuse persistent output directories for requests, responses, result URLs, and evidence files across sessions. For an image-editing skill, these artifacts may include user prompts, source image references, and generated asset URLs, creating retention and cross-session data exposure risks if storage is shared or not cleaned up.

Missing User Warnings

Low
Confidence
86% confidence
Finding
The skill instructs users to place API credentials in environment variables or a local credentials file without any warning about secret exposure, redaction, or safe storage. While common, this can lead to accidental leakage in shell history, logs, screenshots, or persisted home-directory files when operators are not explicitly cautioned.

Intent-Code Divergence

Low
Confidence
84% confidence
Finding
The manifest and interface describe an image-editing provider focused on preparing edit requests and handling edit responses. The workflow text introduces generic operational steps about determining whether an operation is read-only or mutating and performing a read-only query first, which does not match the described image-edit use case and suggests capabilities the documented skill does not actually present.

Static analysis

No suspicious patterns detected.