diffusers-ascend-weight-prep

Warn

Audited by Gen Agent Trust Hub on Mar 8, 2026

Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [REMOTE_CODE_EXECUTION]: The script scripts/generate_fake_weights.py uses transformers.AutoConfig.from_pretrained(..., trust_remote_code=True). This flag allows the library to execute arbitrary Python code contained within the model's repository if the repository defines custom logic. If an attacker directs the skill to a malicious or compromised model ID, it could lead to code execution on the user's machine.
  • [COMMAND_EXECUTION]: The skill uses subprocess.run in scripts/download_weights.py to execute external CLI tools like hf (HuggingFace Hub) and modelscope. While arguments are passed as a list to prevent shell injection, the execution of these binaries still grants the skill significant interaction with the host environment. Additionally, scripts/validate_on_npu.sh executes shell commands for environment setup and validation.
  • [EXTERNAL_DOWNLOADS]: The skill is designed to download model metadata and weights from remote sources including HuggingFace (huggingface.co), ModelScope (modelscope.cn), and the hf-mirror.com mirror service. These are well-known platforms, but the downloads are essential to the skill's operation and contribute to its attack surface.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Mar 8, 2026, 10:12 AM