Back to skill

Security audit

Sih Ai Photo Editor

Security checks for vulnerabilities and agentic risk

Overview

This photo-editing skill is broadly purpose-aligned, but it needs Review because it can transmit sensitive local files/photos to an external API, ships a real-looking API key, and retains local user and usage history.

Review carefully before installing. Use only non-sensitive images you are comfortable sending to the external provider, do not pass arbitrary local file paths, rotate/remove the bundled API key, and require clear user consent plus safer validation before face edits, uploads, local history retention, or any automatic file opening.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sih_api.py:153
Finding

Arbitrary Local File Disclosure Through Image Upload

Content
View full analysis
str: """ 将本地文件转换为Base64格式 Args: file_path: 文件路径 Returns: data:image/...;base64,... 格式的字符串 """ # 读取文件 with open(file_path, "rb") as f: image_data = f.read() # 编码为Base64 base64_data = base64.b64encode(image_data).decode("utf-8") # 获取图片格式 ext = Path(file_path).suffix.lower().lstrip(".") if ext not in ["jpg", "jpeg", "png", "webp", "gif"]: ext = "jpg" # 默认 return f"data:image/{ext};base64,{base64_data}" ``` ### Technical Analysis The client accepts any path for which `os.path.exists()` returns true. It does not require the path to reference a regular image file, constrain it to a user-approved directory, validate its actual media type, or verify that an image decoder can parse it. Unsupported file extensions are not rejected. Instead, arbitrary file contents are Base64-encoded and labeled as JPEG data. The resulting data URI is inserted into the JSON payload and transmitted to `htt ...[truncated 1729 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/config.py:9
Finding

Hard-Coded API Credential Distributed in Source and Documentation

Content
View full analysis
API Key已预设在 `scripts/config.py`: ```python SIH_API_KEY = "sk-w4YfLvoXwIEM0I3uNcOOOclfHkBDiR19Md9ixabWv1XMNPhn" ``` 生产环境建议使用环境变量: ```bash export SIH_API_KEY="your-production-key" ``` ``` ```bash # references/api_guide.md:31-35 curl --location 'https://api.vwu.ai/v1/images/generations/' \ --header 'Authorization: Bearer sk-w4YfLvoXwIEM0I3uNcOOOclfHkBDiR19Md9ixabWv1XMNPhn' \ --header 'Content-Type: application/json' \ --data '{ ``` ### Technical Analysis A credential-shaped API key is embedded as the fallback value in executable configuration and repeated in project documentation. If the `SIH_API_KEY` environment variable is absent, all client instances automatically use the bundled credential. Secrets committed to distributable source code must be treated as public. Environment-variable support does not mitigate the exposure because the hard-coded fallback remains active and retrievable by anyone who obtains the package or repository history. ### Attack Path 1. An attacker downloads or otherwise accesses the Skill package. 2. The attacker reads `scripts/config.py`, `QUICK_START.md`, or `references/api_guide.md`. 3. The attacker extracts the embedded bearer key. 4. The attacker submits direct requests to the documented API endpoint using the exposed key. 5. Requests are attributed to the credential owner until the key is revoked or restricted. No local execution is required to exploit this issue. ### Impact Assessment If the embedded value is active, an attacker may obtain all API privileges associated with that credential. Potential consequences in ...[truncated 447 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sih_api.py:179
Finding

Server-Side Request Forgery Through Unrestricted Image URL Validation

Content
View full analysis
bool: """验证URL是否可访问""" try: response = requests.head(url, timeout=10, allow_redirects=True) return response.status_code == 200 except Exception: return False ``` ### Technical Analysis The Skill makes a `HEAD` request to a user-controlled URL. The URL parser only requires a scheme and network location; it does not restrict the scheme to HTTPS, validate ports, resolve and reject non-public addresses, or constrain redirect destinations. Because redirects are enabled, a public URL can redirect the request to localhost, a private address, a link-local service, or a cloud metadata endpoint. The request originates from the Agent host and therefore has access to network destinations that may not be accessible to an external attacker. The boolean success or failure result provides a limited response oracle. Although the code does not return response bodies, it can still reveal service reachability, distinguish some status conditions, or trigger side effects on endpoints that improperly process `HEAD`. ### Attack Path 1. An attacker supplies an image URL pointing directly to an internal service, or to an attacker-controlled public URL that redirects internally. 2. `_is_url()` accepts the value because it contains a scheme and network location. 3. `_validate_url()` issues a request from the Agent host with redirects enabled. 4. The request re ...[truncated 1009 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/quota_checker.py:213
Finding

Plaintext Persistent Storage of User Prompts and Usage Metadata

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (50)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding indicates behavior extending into local identity persistence, balance deduction, recharge-link generation, and local logging of usage history/prompt fragments, which is materially broader than an image-editing skill. If accurate, the skill could collect or retain sensitive user activity and tie it to billing or identity data without clear upfront disclosure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding indicates behavior extending into local identity persistence, balance deduction, recharge-link generation, and local logging of usage history/prompt fragments, which is materially broader than an image-editing skill. If accurate, the skill could collect or retain sensitive user activity and tie it to billing or identity data without clear upfront disclosure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The changelog states that processed images are automatically downloaded to a local Desktop folder and then opened in Finder and Preview. Those side effects extend beyond passive image editing into local filesystem writes and application launching, which can surprise users and create privacy and safety risks, especially for sensitive or explicit edited images.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Automatic download plus automatic opening of files and apps occurs without any warning or opt-in described here. In the context of an AI photo editor that may handle private, intimate, or face-edited images, silently writing files to the Desktop and launching Preview/Finder can expose sensitive content to anyone with local access or during screen sharing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file promotes face-swapping and beautification capabilities without any warning, restriction, or consent language around sensitive image manipulation. These features materially increase abuse risk because they can enable non-consensual edits, impersonation, harassment, and processing of biometric facial data, especially in a consumer-facing tool triggered by natural-language prompts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide describes automatic user registration, user ID generation, quota tracking, recharge flow, and API-based image processing, but provides no notice about what personal data is collected, how uploaded images are handled, or where usage history is stored. In an image-editing skill, this is risky because photos may contain biometric or highly sensitive personal data, and silent collection or retention can violate user expectations and privacy requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill promotes face-swapping and face replacement without any warning about biometric, impersonation, or consent risks. Because face data is highly sensitive and face-swapping can facilitate non-consensual edits, identity abuse, or deceptive media generation, failing to warn or constrain this feature materially increases misuse risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The publishing content describes use of a third-party image-generation API but does not warn users that their uploaded images and prompts may be transmitted off-platform. For an image-editing skill handling personal photos, this omission creates privacy and consent risk because users may submit sensitive images without understanding where data is sent or how it is processed.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The file explicitly identifies an external API endpoint, confirming that user-provided content will leave the local skill environment. External transmission is expected for this functionality, but it becomes a security/privacy issue here because the documentation lacks accompanying disclosure, data-handling boundaries, or minimization guidance for potentially sensitive user images.

Content

Scanner excerpt · PUBLISH.md (reported line 61)May include surrounding context.

md
### 技术栈
- **API提供商:** 豆包(字节跳动)
- **Endpoint:** https://api.vwu.ai/v1/images/generations/
- **认证:** Bearer Token
- **响应时间:** 10-60秒(取决于复杂度)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The quick-start instructs users to send local images to an external image-editing API and elsewhere describes local storage of usage history, yet it does not warn about privacy implications for image content, prompts, user identifiers, or retained logs. Because image-editing prompts may involve faces, clothing changes, and background replacement, the data can be highly sensitive, making the lack of privacy notice and consent more dangerous in this skill context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes an AI image editing skill for operations like changing clothes, backgrounds, faces, and styles. This document shows the skill also implements a user quota, billing simulation, usage history, and top-up flow, which is a separate account/monetization capability not mentioned in the stated purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation states that persistent local files store current user information and usage history under ~/.sih_ai/, but it does not define retention limits, access protections, or privacy safeguards. Persistently tracking user identifiers and operation history for an image-editing skill can expose sensitive behavioral data, especially on shared systems or developer machines, and the storage exceeds the core image-processing function unless clearly disclosed and minimized.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README promotes face-swapping, face replacement, and portrait modification without any consent, privacy, or misuse warnings. In an image-editing skill, these capabilities can facilitate non-consensual impersonation, deceptive media creation, and unsafe handling of biometric or highly sensitive personal image data if users are not clearly instructed about acceptable use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Line L25 states '用普通话描述即可', which presents a specific language requirement in natural language. SQP-3 applies to all file types and flags language or locale constraints when the skill forces a specific language without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The publish-facing description advertises image editing, free trials, account-linked top-up, and recorded usage history, but it does not clearly disclose that user images and prompts may be transmitted to an external service, that a user identifier may be created automatically, or that usage activity is logged. In a photo-editing skill, this is materially risky because users may submit sensitive biometric or intimate images without informed consent, increasing privacy, compliance, and trust harms.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documents capabilities that imply network access, local file writes, and interaction with local apps, yet it declares no explicit tool scope or permissions. This creates a least-privilege failure: an agent or reviewer cannot tell in advance that using the skill may transmit user data externally and write/open files locally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill prominently advertises automatic download, Finder reveal, and Preview opening, but it does not present these as significant side effects requiring clear user consent. Silent local writes and app launching can surprise users, leak sensitive filenames or content to the desktop, and create opportunities for unsafe handling of untrusted remote files.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match many ordinary photo-editing or image-related requests, increasing the chance of unintended invocation. Because this skill can send images to an external API and trigger local file/app side effects, accidental activation has meaningful privacy and usability consequences.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The skill sends user-supplied images and prompts to an external API endpoint, which is a real data egress risk for potentially sensitive photos and biometric content. In the context of face editing, beauty retouching, and face fusion, the transmitted data may include highly sensitive personal imagery, making external transmission more dangerous than in a generic text-only skill.

Content

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

API Endpoint

text
POST https://api.vwu.ai/v1/images/generations/

认证方式

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description is broad enough to match many generic image-editing requests, which can cause the agent to invoke this skill in situations where narrower or safer tooling would be more appropriate. In this context, the risk is increased because the skill includes sensitive capabilities such as face swapping, beautification, and clothing changes, so over-triggering may lead to privacy, consent, or policy-sensitive image manipulation workflows being selected too easily.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest description is entirely in Chinese and presents the skill behavior and example prompts only in that language. There is no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-language context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

All user-facing text in the script is presented only in Chinese, including status messages and publishing instructions. This imposes a specific language on users without any opt-in or documented locale justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

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 · references/api_guide.md (reported line 7)May include surrounding context.

md
### 图片编辑接口

**Endpoint:** `POST https://api.vwu.ai/v1/images/generations/`

**认证方式:** Bearer Token

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 · references/api_guide.md (reported line 199)May include surrounding context.

md
### 图片编辑接口

**Endpoint:** `POST https://api.vwu.ai/v1/images/generations/`

**认证方式:** Bearer Token

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 · references/api_guide.md (reported line 210)May include surrounding context.

md
### 图片编辑接口

**Endpoint:** `POST https://api.vwu.ai/v1/images/generations/`

**认证方式:** Bearer Token

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
QUICK_START.md:96

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/api_guide.md:33

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:150