Back to skill

Security audit

JSON转YAML工具

Security checks for vulnerabilities and agentic risk

Overview

The skill says it converts JSON to YAML, but it also asks for command execution, file read/write access, API use, and credentials without clear limits.

Review this before installing. It may be acceptable only in a tightly sandboxed agent where file access, command execution, and any API calls require explicit user approval. Do not provide real API keys or sensitive JSON unless the publisher documents the exact service, data flow, command allowlist, and input/output path limits.

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:24
Finding

Excessive Tool Permissions for a JSON-to-YAML Conversion Skill

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 24-27; corroborating capability claims at lines 224-228
Vulnerability Type: Excessive tool permissions and violation of least privilege
Risk Level: Medium

Vulnerable Code

yaml
tools:
- read
- exec
- write

The broader capabilities are also documented as follows:

markdown
## 功能描述
- **自动化执行**: 用Expanso Edge流水线把JSON转YAML格式。Convert JSON input into YAML fo
- **文件处理**: 支持多种文件格式的读取、解析和写入操作
- **API集成**: 通过标准化接口调用外部服务并处理响应
- **命令执行**: 在安全沙箱中执行系统命令并收集结果

Technical Analysis

The declared purpose of this Skill is conversion of JSON data into YAML. Such conversion can be implemented with a fixed local parser and does not inherently require unrestricted system command execution, generic external API access, or broad filesystem read and write capabilities.

The Skill requests read, exec, and write tools but does not define:

  • A command allowlist.
  • Input and output path restrictions.
  • A concrete JSON-to-YAML conversion command or implementation.
  • Enforcement of the claimed sandbox boundary.
  • Approved external endpoints or network restrictions.
  • Validation rules preventing user-controlled content from influencing commands or paths.

The absence of an executable implementation means the requested permissions are not technically justified by the package contents. If the hosting Agent grants these tools based on Skill metadata, the Skill operates with privileges substantially broader than its stated conversion task requires.

No direct command-injection payload or malicious execution instruction was found. Exploitation therefore depends on how the hosting Agent interprets the generic instructions and whether it permits user-controlled requests to reach the declared tools.

Attack Path

  1. A user or operator loads the JSON-to-YAML Skill.
  2. The Agent grants the Skill access to the declared read, write, and exec tools.
  3. An attacker supplies a crafted conversion requ ...[truncated 1136 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the exec tool because JSON-to-YAML conversion does not require shell or process execution.
  2. Use a fixed, local JSON parser and YAML serializer rather than generic commands or external APIs.
  3. Restrict read access to a single explicitly supplied input file or accept JSON directly as an in-memory string.
  4. Restrict write access to a caller-approved output path. Reject absolute paths, parent-directory traversal, symbolic-link escapes, and writes outside a dedicated workspace.
  5. Define strict input limits, including maximum document size, nesting depth, and processing time.
  6. Document the exact conversion algorithm, accepted input schema, output behavior, and error handling.
  7. If command execution is unavoidable, use a fixed executable and argument array without shell interpolation, enforce an allowlist, apply time and resource limits, and run it in a sandbox with minimal filesystem and network access.
  8. Remove generic API integration and credential instructions unless a concrete service is necessary. If retained, specify approved HTTPS endpoints and prohibit transmitting input data or credentials to undeclared destinations.
  9. Configure the hosting Agent to require explicit user approval before any filesystem access or command execution.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (5)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

A JSON-to-YAML conversion task does not inherently require system command execution, yet the skill explicitly advertises command execution capability. In agent environments, unnecessary exec access materially increases the attack surface because user-supplied content or downstream prompts could be turned into shell commands, leading to arbitrary code execution, file access, or persistence attempts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation guidance is broad and ambiguous, describing use across general API integration, webhooks, system connections, and automation contexts rather than a tightly bounded conversion task. Overbroad triggering conditions make it easier for an agent to select this skill in inappropriate contexts, which becomes more dangerous given the skill's documented access to read, write, exec, and external APIs.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill requires API keys and describes external API use even though JSON-to-YAML conversion is normally a local transformation. This is risky because it can exfiltrate user data to third-party services, expand trust boundaries unnecessarily, and prompt users to provide sensitive credentials for a task that should not need them.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is presented as a narrowly scoped JSON-to-YAML converter, but the later documentation expands its role to file handling, API integration, information retrieval, and command execution. This mismatch is dangerous because users or agents may invoke the skill under a low-risk assumption while granting it capabilities far beyond what its name and summary justify, increasing the chance of over-privileged use or deceptive task routing.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The feature list broadens the skill's apparent purpose from format conversion to file processing, API calling, command execution, and retrieval. This creates a dangerous mismatch in agent selection and user expectations, especially because benign-seeming input conversion could become a pathway to privileged operations in the same skill context.

Content

No source excerpt is available for this finding.