Back to skill

Security audit

linkfoxai-image-tool

Security checks for vulnerabilities and agentic risk

Overview

The skill appears intended for image processing, but it needs Review because it stores an API key in a predictable local file and sends user image data to an external service.

Review this before installing if you are not comfortable storing the Ziniao/Open API key in a local plaintext config file. Use a limited-scope key if possible, rotate it if exposed, and avoid processing sensitive images unless you accept that image data and prompts may be sent to the declared third-party API.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:30
Finding

API Credential Persisted in a Predictable Plaintext Configuration File

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 30
Vulnerability Type: Plaintext sensitive-data storage
Risk Level: Medium

Vulnerable Code Snippet

markdown
- `apiKey`: 先确认 `ZNOPEN_API_KEY` 已可用;默认从 `~/.znopen/config.json` 读取,缺失时先提示用户提供,提供后回填文件,完成配置。

English translation: Confirm that ZNOPEN_API_KEY is available; read it from ~/.znopen/config.json by default. If it is missing, ask the user to provide it and write it back to that file.

Technical Analysis

The Skill instructs the agent to persist a bearer API credential in the predictable file ~/.znopen/config.json. It does not require an operating-system credential store, encryption at rest, owner-only permissions, ownership verification, symbolic-link protection, or safe atomic file creation.

Consequently, the credential may be exposed to other local users or processes when the file or its parent directory has permissive access controls. It may also be captured in home-directory backups or accidentally disclosed with configuration files. Because the credential is used as a bearer token, possession may be sufficient to authenticate requests to the declared service.

Exploitation depends on the attacker first obtaining local read access or access to a copy of the configuration file; the instruction does not itself grant such access.

Attack Path

  1. A user invokes the Skill without an existing API-key configuration.
  2. The Skill asks the user for ZNOPEN_API_KEY.
  3. Following the documented behavior, the agent writes the credential to ~/.znopen/config.json.
  4. The file is created or retained without an explicit requirement for restrictive permissions or secure secret storage.
  5. An attacker with local filesystem access, access through another compromised process, or access to a leaked backup reads the configuration file.
  6. The attacker extracts the API key and submits requests with Authorization: Bearer {ApiKey} to the declared platform endpoint.

Impact A

...[truncated 459 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prefer an operating-system credential manager or a dedicated secrets-management service instead of a plaintext JSON file.
  2. Support ephemeral secret injection through a protected environment or runtime secret facility where appropriate.
  3. If file-based storage is unavoidable:
    • Create ~/.znopen with owner-only permissions.
    • Create config.json with mode 0600.
    • Verify that both the directory and file are owned by the current user.
    • Reject symbolic links and unexpected non-regular files.
    • Use secure, atomic file creation to avoid race conditions.
    • Refuse to read the credential when permissions are overly broad.
  4. Never print the API key in standard output, error messages, traces, or logs, and redact it from diagnostic data.
  5. Avoid collecting the key through channels that retain conversational history when a secure secret-input mechanism is available.
  6. Document key rotation and revocation procedures and recommend narrowly scoped, short-lived credentials where supported.
  7. Exclude the configuration file from source control, shared archives, and unencrypted backups.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill metadata and instructions are written entirely in Chinese and describe the skill as directly serving ordinary users, but there is no statement that use of Chinese is optional or limited to a region-specific context. Under the policy, forcing a specific language without user opt-in or clear justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly documents behavior to read an API key from ~/.znopen/config.json and, if missing, prompt for it and write it back to disk, but this credential persistence is not disclosed in the manifest description. Hidden credential storage expands the trust boundary and can surprise users or hosting agents, especially because local file writes are unrelated to the visible image-processing task. In a skill that also prefers local script execution, this makes the behavior more sensitive, not less.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

For an end-user image-processing skill, adding logic to manage a local credential file is unnecessary privilege expansion unless strongly justified. This creates a pathway for secret collection and persistence on the local system, increasing the risk of credential leakage, misuse, or abuse by any local scripts the skill prefers to run first. Because the skill is designed to execute local scripts before API fallback, coupling that with credential file handling materially increases exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is intended to upload images, send image URLs and metadata to an external domain, and execute local scripts, yet it does not warn users up front that their content may be transmitted off-box or processed locally. This undermines informed consent and can expose sensitive images, prompts, and derived metadata to third-party services or local execution surfaces. In this context, the omission is more dangerous because the skill handles user media directly and may also access local configuration during execution.

Content

No source excerpt is available for this finding.