Back to skill

Security audit

modelscope-image

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed ModelScope image-generation skill that uses a user API key to send prompts to ModelScope and save generated images locally.

Install only if you are comfortable sending your image prompts and generation settings to ModelScope with your own API key. Prefer setting MODELSCOPE_API_KEY in the environment instead of using --api-key on the command line, avoid prompts containing secrets or regulated personal data, and review model choices before generation.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (3)

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill sends user prompts to an external ModelScope API and relies on an API credential, but the documentation does not prominently warn that user-provided content leaves the local environment. Without clear disclosure, users may unknowingly send sensitive prompts or metadata to a third party, creating privacy and compliance risks.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The documentation shows bearer-token usage in headers without warning readers not to paste real tokens into shared terminals, screenshots, logs, or shell history. In an agent skill context, users may copy examples verbatim, increasing the chance of credential disclosure through command history, debug output, or collaboration channels.

External Transmission

Medium
Category
Data Exfiltration
Content
print(result)
```

### cURL 示例

```bash
curl -X POST https://api-inference.modelscope.cn/api/v1/images/generations \
Confidence
86% confidence
Finding
The cURL example encourages placing a bearer token directly on the command line, which can leak credentials via shell history, process inspection, terminal recording, or shared troubleshooting transcripts. In a developer-facing skill, this pattern materially increases accidental secret exposure risk because users often copy commands exactly as shown.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/api_reference.md:338