Back to skill

Security audit

ifly-image-understanding

Security checks for vulnerabilities and agentic risk

Overview

The skill's main image-analysis behavior is coherent, but it ships a project-local Claude settings file that grants unrelated file-read and packaging command permissions.

Review or remove artifact/.claude/settings.local.json before installing, especially in Claude environments that honor local permission files. Treat images and prompts as sent to iFlytek's remote service, and avoid using sensitive images unless that third-party transfer is acceptable.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
.claude/settings.local.json:3
Finding

Project Configuration Grants Unnecessary External File Access and Command Execution

Content
View full analysis

Vulnerability Details

File Location: .claude/settings.local.json, lines 3–6
Vulnerability Type: Excessive project-local agent permissions
Risk Level: Medium

Complete Code Snippet:

json
"allow": [
  "Read(//Users/yanhuijiang/Desktop/skill打包/**)",
  "Bash(zip -r xfyun-image-understanding.zip xfyun-image-understanding/)"
]

Technical Analysis

The project-local Claude configuration pre-authorizes access to a developer-specific directory outside the project and permits execution of a packaging command. These capabilities are unrelated to the Skill's declared purpose of reading a user-selected image and submitting it to the iFlytek image-understanding service.

The external recursive read rule violates least privilege because it crosses the project boundary and may suppress the normal approval prompt for files under that directory. The Bash rule also expands the agent's execution permissions even though packaging is not required at runtime.

Exploitation depends on a compatible agent environment loading and enforcing this project-local configuration. The configuration does not itself read files or run the command, but it removes an authorization barrier if a later agent action, malicious instruction, or prompt-injected input requests one of the allowed operations.

Attack Path

  1. A user opens or runs the project in an environment that honors .claude/settings.local.json.
  2. The environment activates the pre-authorized external read and Bash rules.
  3. An attacker-controlled instruction, prompt-injected document, or unintended agent action requests access to a file beneath /Users/yanhuijiang/Desktop/skill打包/.
  4. The read proceeds without the approval that would otherwise be required.
  5. Retrieved data could subsequently be disclosed through agent output or another permitted operation.

Alternatively, an agent can invoke the pre-authorized archive command without a fresh approval prompt, ...[truncated 1133 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove .claude/settings.local.json from the distributed Skill because these development and packaging permissions are not required at runtime.
  2. Remove the recursive external read rule. Require explicit user approval for each user-selected image or constrain access to a narrowly defined project-relative input directory.
  3. Remove the pre-authorized Bash packaging command. Perform release packaging outside the runtime Skill configuration or require an explicit approval when packaging is requested.
  4. Add .claude/settings.local.json to .gitignore or the package exclusion rules so developer-specific local permissions are not shipped.
  5. Review project-local agent settings during release checks and reject absolute paths, recursive external-directory access, and runtime-irrelevant command permissions.
  6. Rotate or inspect potentially sensitive material in the exposed directory if the Skill has already been used in an environment where untrusted instructions could trigger agent tool calls.
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 (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill documents use of environment variables for API credentials and a networked WebSocket endpoint, but it does not declare any explicit tool scope or permissions. This can cause operators or agent frameworks to grant broader access than users expect, weakening least-privilege controls and making secret or network use insufficiently transparent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends user-provided images and prompts to an external iFlytek WebSocket API, but the description does not clearly warn about that data transfer. Users may unknowingly submit sensitive images, OCR content, or prompts to a third party, creating privacy, compliance, and data-handling risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script base64-encodes a local image and sends it to a third-party WebSocket API, but the CLI does not clearly warn users that the image contents will leave the local machine. This creates a privacy and data-handling risk, especially if users analyze sensitive images such as IDs, receipts, medical photos, or internal documents without realizing they are being transmitted externally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file's main description is in English, but the error-code guidance, FAQ, and example questions are presented in Chinese only. This can impose a language preference on users without opt-in or explicit justification, which fits the language/locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The default question is hardcoded in Chinese, which biases the skill toward a specific language without user opt-in. The file does not indicate that Chinese is required for a region-specific reason or provide a neutral language-selection mechanism.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.