Back to skill

Security audit

AI图片生成

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward SiliconFlow image-generation helper, with expected external API use, but users should avoid putting sensitive text in prompts and should choose an explicit output path.

Install only if you are comfortable sending image prompts to SiliconFlow under your API key. Do not include secrets, proprietary text, or personal data in prompts; specify your own output file instead of relying on the default /tmp path; and avoid running the script with elevated privileges.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate.sh:7
Finding

Predictable Temporary Output Allows Symlink-Based File Overwrite

Content
View full analysis
Remediation
View remediation
&2 exit 1 fi ``` - Avoid running the script with elevated privileges. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/generate.sh:22
Finding

Unescaped User-Controlled Values Are Interpolated into a JSON Request

Content
View full analysis
Remediation
View remediation
&2 exit 1 } ``` Additional hardening should include: - Validate `MODEL` against an explicit allowlist of supported model identifiers. - Validate `SIZE` against the documented values: `1024x1024`, `1024x1792`, and `1792x1024`. - Apply an appropriate length limit to prompts before transmitting them. - Declare `jq` as a required binary in `SKILL.md`, because the script already depends on it for response parsing. - Check HTTP and `curl` failures explicitly instead of relying only on a textual search for `"error"` in the response. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

Generate Image

bash
curl -X POST "https://api.siliconflow.cn/v1/images/generations" \
  -H "Authorization: Bearer $SILICONFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

Generate Image

bash
curl -X POST "https://api.siliconflow.cn/v1/images/generations" \
  -H "Authorization: Bearer $SILICONFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

Generate Image

bash
curl -X POST "https://api.siliconflow.cn/v1/images/generations" \
  -H "Authorization: Bearer $SILICONFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This code sends user-controlled content and an authorization-bearing request to an external API endpoint, creating a clear data egress path. In the context of an agent skill, this is security-relevant because users may assume local processing, while prompts and related metadata are actually disclosed to a remote service.

Content

Scanner excerpt · scripts/generate.sh (reported line 23)May include surrounding context.

sh
echo "Generating image with $MODEL..."
echo "Prompt: $PROMPT"

RESPONSE=$(curl -s -X POST "https://api.siliconflow.cn/v1/images/generations" \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -d "{

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This code sends user-controlled content and an authorization-bearing request to an external API endpoint, creating a clear data egress path. In the context of an agent skill, this is security-relevant because users may assume local processing, while prompts and related metadata are actually disclosed to a remote service.

Content

Scanner excerpt · scripts/generate.sh (reported line 23)May include surrounding context.

sh
echo "Generating image with $MODEL..."
echo "Prompt: $PROMPT"

RESPONSE=$(curl -s -X POST "https://api.siliconflow.cn/v1/images/generations" \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -d "{

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script transmits the full user-provided prompt to a third-party image-generation service without any explicit consent, warning, or data-minimization controls. If users include sensitive, proprietary, or personal information in prompts, that data is exposed to the external provider and may be logged, retained, or processed outside the local environment.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.