T08 · Insecure Dependencies
- Location
SKILL.md:45- Finding
Unpinned DashScope Dependency in Skill Installation Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a disclosed Alibaba DashScope video-generation helper with expected network, credential, upload, and output-file behavior, but users should treat its provider uploads and unpinned dependency carefully.
Install in a dedicated virtual environment, prefer a pinned and reviewed dashscope version, avoid running as root, and pass only prompts and reference images you are comfortable sending to Alibaba DashScope. Treat saved logs, task IDs, generated URLs, images, and videos as potentially sensitive and clean them up when no longer needed.
SKILL.md:45Unpinned DashScope Dependency in Skill Installation Instructions
references/api_reference.md:10Unpinned DashScope Dependency in API Reference Installation Instructions
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def download_video(video_url: str, output_path: Path) -> None:
output_path.parent.mkdir(parents=True, exist_ok=True)
with urllib.request.urlopen(video_url) as response:
output_path.write_bytes(response.read())
The documented purpose is a generic video-generation integration skill, but the behavior described includes broader actions such as credential discovery, local file handling, media download/storage, and workflow-specific operations not reflected in the declared scope. This mismatch is dangerous because operators may approve or invoke the skill under false assumptions, enabling unexpected side effects and expanding the attack surface for data exfiltration or unauthorized mutations.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
if not os.environ.get("DASHSCOPE_API_KEY"):
print("Error: DASHSCOPE_API_KEY is not set.", file=sys.stderr)
print("Configure via environment variable, .env file, or ~/.alibabacloud/credentials", file=sys.stderr)
sys.exit(1)
# Default image prompt if not specified
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
if not os.environ.get("DASHSCOPE_API_KEY"):
print("Error: DASHSCOPE_API_KEY is not set.", file=sys.stderr)
print("Configure via environment variable, .env file, or ~/.alibabacloud/credentials", file=sys.stderr)
sys.exit(1)
# Default image prompt if not specified
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def _load_env() -> None:
_load_dotenv(Path.cwd() / ".env")
repo_root = _find_repo_root(Path(__file__).resolve())
if repo_root:
_load_dotenv(repo_root / ".env")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def _load_env() -> None:
_load_dotenv(Path.cwd() / ".env")
repo_root = _find_repo_root(Path(__file__).resolve())
if repo_root:
_load_dotenv(repo_root / ".env")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def _load_env() -> None:
_load_dotenv(Path.cwd() / ".env")
repo_root = _find_repo_root(Path(__file__).resolve())
if repo_root:
_load_dotenv(repo_root / ".env")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def _load_env() -> None:
_load_dotenv(Path.cwd() / ".env")
repo_root = _find_repo_root(Path(__file__).resolve())
if repo_root:
_load_dotenv(repo_root / ".env")
The skill describes code paths that access environment variables, read credential files, write outputs to disk, and make network calls, but it does not declare any explicit tool/permission scope. This creates an authorization gap where an agent may execute broader capabilities than reviewers or policy controls expect, increasing the risk of credential exposure, unintended file access, or unbounded external requests.
The skill instructs persistent storage of validation artifacts, task IDs, polling responses, logs, and final video URLs under a shared output directory. Persisting these artifacts can leak sensitive operational metadata, prompts, URLs, and identifiers across sessions or to other users/processes, especially if outputs are retained without access controls or redaction.
mkdir -p output/aliyun-wan-video
python -m py_compile skills/ai/video/aliyun-wan-video/scripts/generate_video.py && echo "py_compile_ok" > output/aliyun-wan-video/validate.txt
The reference explicitly states that a local file path supplied as reference_image will be auto-uploaded by the SDK, but it does not warn users that this causes network transmission of local content to a third-party service. In an agent or pipeline context, this can lead to unintended exfiltration of sensitive local files if user input or upstream logic passes a local path without clear consent or validation.
The usage example requires a Chinese prompt, and the script later injects Chinese text into generated prompts. This imposes a specific language/locale behavior without user opt-in, which matches the policy-violation category for forced language use.
The manifest describes implementing and documenting DashScope video.generate usage and parameter mapping, but this script also searches ~/.alibabacloud/credentials and imports an API key into the process environment. Credential-file discovery is not an obvious requirement of the narrowly stated skill purpose and adds a capability to access local secrets.
When --image-prompt is not provided, the script prepends a Chinese phrase to the user's prompt, causing the skill to operate in a specific language without opt-in. This is a natural-language policy issue because the user is not given a choice of language or locale.
This code sends the request prompt, model parameters, and potentially a local reference image path to an external video-generation service via VideoSynthesis.async_call, but there is no confirmation prompt or user-facing notice at the point of transmission. Because the operation sends user-supplied content to a network service and may include image input, it meets the code-file missing-warning criteria.
The workflow says to confirm whether the operation is read-only or mutating and to run a minimal read-only query first, but the documented skill is specifically for video.generate requests and async polling, which are generation-oriented operations rather than query-style reads. This is an active documentation mismatch because it instructs an intent and execution pattern not reflected by the described code paths or API usage in the rest of the file.
The markdown file presents all reference titles in Chinese and does not mention any language option, translation availability, or that the skill is intended only for Chinese-speaking users. Under the policy rule for natural-language violations, this can be considered a forced locale/language choice without user opt-in.
The docstring says the function will 'Generate an image of an Asian beauty,' but the implementation simply sends whatever prompt string it is given to the image model. Since callers may supply arbitrary prompts, the documentation actively overstates and misdescribes the function's actual behavior.
The function creates directories and writes bytes to the output path, but there is no print/log/comment at the write site indicating that a file will be created or overwritten. For a code file, file writes should have some visible disclosure unless clearly warned elsewhere; this script's usage text describes output paths but does not explicitly warn about the write action.