Back to skill

Security audit

图像处理基础版

Security checks for vulnerabilities and agentic risk

Overview

This image-processing skill is not clearly malicious, but it needs review because it mixes normal image commands with overbroad task routing, credential-environment checks, and inconsistent privacy claims.

Review this skill before installing. Use it only for explicit image-file tasks, avoid running the environment-variable check, and require confirmation plus separate output paths before any command that writes or batch-processes files. Do not rely on the local-only privacy claim unless the network/API behavior is clarified.

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
SKILL.md:171
Finding

Unnecessary Enumeration of Credential-Related Environment Variables

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 171-173
Vulnerability Type: Credential-related environment reconnaissance beyond the Skill's legitimate image-processing requirements
Risk Level: Medium

bash
env | grep -E "API|KEY|TOKEN|SECRET" | sed "s/=.*/=***/"  # Linux/macOS
# 或 PowerShell
# Get-ChildItem Env: | Where-Object {$_.Name -match "API|KEY|TOKEN"} | Format-Table

Technical Analysis

The Skill instructs the Agent to enumerate environment variables whose names contain credential-related terms such as API, KEY, TOKEN, and SECRET. This operation is unrelated to the declared local image-processing functionality and violates the principle of least privilege.

The Unix command masks values before displaying its final output, but it still reads the environment and reveals the names and presence of secret-bearing variables. The suggested PowerShell command is more dangerous because Get-ChildItem Env: produces environment-variable objects containing names and values; formatting matching objects as a table may disclose credential values directly in terminal output, Agent responses, or execution logs.

No outbound transmission mechanism was identified, so direct credential exfiltration is not established. Nevertheless, exposing sensitive environment data to an Agent session or its logs creates an unauthorized-access risk.

Attack Path

  1. A user or Agent loads the Skill and follows its environment verification instructions.
  2. The Agent executes the credential-enumeration command using its authorized exec capability.
  3. The command searches the Agent process environment for variables associated with API keys, tokens, or secrets.
  4. On Unix-like systems, credential-bearing variable names are exposed even though displayed values are masked.
  5. On PowerShell, matching environment-variable objects may display both names and values.
  6. Sensitive information becomes available throu ...[truncated 965 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove both commands that enumerate broadly named credential-related environment variables.
  2. Do not inspect every environment variable to verify configuration. Check only a specifically documented variable that is strictly required by the Skill.
  3. Return only a boolean or generic status message indicating whether the required variable exists; never print its value.
  4. Because the documented image-processing commands do not require an API credential, remove the credential verification step entirely unless a concrete dependency is introduced.
  5. If future functionality requires a secret, use platform secret stores or narrowly scoped environment access and redact sensitive values before they enter Agent output, logs, diagnostics, or error messages.
  6. Add an explicit instruction prohibiting the Agent from listing, logging, or returning environment variables containing credentials.
  7. Test Unix and PowerShell verification procedures to ensure neither variable names nor values are disclosed unnecessarily.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description contains broad, unrelated invocation guidance that overlaps with general-purpose tasks outside the skill's actual image-processing behavior. Because the skill is allowed to use exec, this ambiguity increases the chance that an agent selects this skill in the wrong context and performs unintended filesystem-affecting operations.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger condition is overly broad and mismatched, telling the agent to use this image skill for generic data analysis, reporting, statistics, and visualization tasks. In a skill with exec access and destructive file-modification examples, such ambiguous routing materially increases the risk of unintended tool use and unsafe command execution in unrelated workflows.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims that all data is stored locally and never uploaded, while other sections state that some functionality may require network access and external APIs. This inconsistency can mislead users into sharing sensitive images or metadata under a false privacy assumption, causing confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest and trigger text position this image-processing skill for unrelated data-analysis and visualization tasks, creating a scope mismatch that can cause the agent to invoke file-writing/exec-capable image tooling in inappropriate contexts. Overbroad invocation criteria increase the chance of accidental execution on unintended user requests and make downstream safety controls less reliable.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description states '支持中文交互' and the functionality note emphasizes '中文交互' without presenting this as an option or documenting a justified region-specific constraint. This can violate language/locale policy when a skill appears to prescribe a specific interaction language by default.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The version matrix and known limitations say the FREE version does not support batch operations, including '每次只能处理一个任务'. Yet L158-L159 explicitly show a batch conversion example using 'mogrify' over '*.jpg', which directly contradicts the stated edition limits and misrepresents actual intended behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The examples include commands that overwrite or create files, crop images, convert formats, and otherwise modify user data, but the documentation does not clearly warn that these actions are file-writing and potentially destructive. Users or agents may run examples assuming they are read-only checks, leading to data loss, unwanted overwrites, or irreversible quality degradation.

Content

No source excerpt is available for this finding.