Back to skill

Security audit

API文档一键生成规范器

Security checks for vulnerabilities and agentic risk

Overview

This API documentation helper is mostly documentation-focused, but it asks for shell command access that is not justified by its stated purpose.

Review before installing. This skill does not show malicious behavior, but it should not need shell command access for writing API docs. Install only in a sandbox or with command execution disabled, and avoid running it with administrator privileges or on untrusted API descriptions unless the publisher narrows the permissions and scope.

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

Unnecessary Command-Execution Permission for a Documentation-Only Skill

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 27–30
Supporting Locations: SKILL.md, line 329 documents a Markdown-only purpose; line 372 recommends administrator execution when troubleshooting permission errors.
Vulnerability Type: Excessive tool permissions and potential privilege escalation
Risk Level: Medium

Vulnerable Code Snippet

yaml
tools:
- read
- exec
- write

Technical Analysis

The skill requests the exec tool even though its documented function is limited to generating and reviewing Markdown API documentation. This activity ordinarily requires only constrained access to read source material and write user-approved documentation files.

Granting command-execution capability violates least-privilege principles and expands the security boundary from document manipulation to arbitrary local process execution. The risk is compounded by the troubleshooting guidance at line 372, which recommends running with administrator privileges when read or write permissions are insufficient. The skill does mention command allowlisting at line 183, but no enforceable allowlist or command restrictions are defined.

There is no evidence that the skill currently contains or retrieves a malicious command. The vulnerability is therefore an excessive-capability condition: malicious, compromised, or attacker-controlled input could potentially influence an agent that has loaded the skill into invoking commands beyond the skill's legitimate purpose.

Attack Path

  1. A user loads the skill, granting its declared read, write, and exec capabilities.
  2. The agent processes attacker-controlled or otherwise untrusted API descriptions, documentation content, file names, or troubleshooting instructions.
  3. Crafted input attempts to persuade the agent to invoke the unnecessary exec capability.
  4. If a permission error occurs, the documented troubleshooting advice may encourage the user to restart or run the environment with ...[truncated 1015 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove exec from the skill manifest because no documented workflow requires shell-command execution:
yaml
tools:
- read
- write
  1. Restrict read and write access to explicit user-approved project and documentation paths.
  2. Replace the administrator-execution recommendation with least-privilege troubleshooting, such as verifying ownership, selecting a writable output directory, or granting only the minimum file permission required.
  3. If command execution becomes necessary in a future version, define a narrow and enforceable command allowlist rather than relying on advisory text.
  4. Require explicit user confirmation before every command invocation and display the exact command, arguments, working directory, and intended effect.
  5. Prevent untrusted input from being interpolated into shell commands. Use structured process APIs with fixed executable paths and separately supplied arguments.
  6. Run the skill in a sandbox without elevated privileges and deny access to unrelated files, credentials, and network resources.
  7. Add automated manifest validation that rejects permissions not justified by a documented workflow.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (6)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
| POST | 创建资源 | `POST /api/v1/users` |
| PUT | 完整更新 | `PUT /api/v1/users/1` |
| PATCH | 部分更新 | `PATCH /api/v1/users/1` |
| DELETE | 删除资源 | `DELETE /api/v1/users/1` |

### URL 命名规范
- 使用名词复数: `/api/v1/users`

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description says to use it whenever API integration, interface docking, webhook configuration, or system connection is involved, which is overly broad for a documentation helper. Broad activation criteria increase the chance the agent invokes this skill in unrelated or higher-risk contexts, especially since the skill also has read/write/exec tools. That can create unintended exposure or unsafe tool use during generic API workflows.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill declares the exec tool even though its stated purpose is documentation generation. That unnecessarily expands the attack surface: if invoked with adversarial input, the agent may be induced to run shell commands despite no functional need for execution. The surrounding text even discusses command execution and operational failures, reinforcing that execution is contemplated.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file claims the skill is 'pure documentation generation' and does not perform API testing, yet it also describes command-execution failures and related troubleshooting. This contradiction can mislead operators and reviewers about the real behavior and permissions of the skill, causing them to trust a capability set that is broader than advertised. Misrepresented scope is dangerous because it obscures execution risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The description explicitly emphasizes Chinese interaction, but does not indicate that the user can choose another language or locale. Under the stated policy, forcing or presuming a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Entries such as '新接口上线时触发', '接口评审时触发', and '项目文档整理时触发' describe broad project moments instead of clear, user-invoked conditions. This can make it unclear whether the skill should activate automatically for many ordinary team activities involving APIs or documentation.

Content

No source excerpt is available for this finding.