Back to skill

Security audit

API Docs Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill appears low-risk technically, but it substantially overstates what it does and may overwrite an output file while only producing a fixed sample document.

Review before installing if you need a real API documentation generator. This skill currently looks more like a static OpenAPI sample writer than an automatic generator, and users should choose output paths carefully because existing files could be overwritten.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

There is a material mismatch between the declared purpose and the code's actual behavior. The description says the skill automatically generates API docs from code comments and supports both OpenAPI/Swagger and JSON/YAML outputs. However, the provided script simply writes a prewritten JSON blob to a file. It does not read any codebase files, parse comments, infer endpoints, or switch output based on the requested format. While it does output an OpenAPI-like JSON file, that is only a static template, not generated from code comments as declared.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Nearly all user-facing natural-language content in the skill file is written in Chinese, while no opt-in, language selection, or justification for a Chinese-only experience is provided. The policy specifically calls for flagging skills that force a specific language or locale without user choice.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script accepts a FORMAT argument on L02, suggesting format selection, but that variable is never used. Regardless of inputs, the code writes the same JSON OpenAPI 3.0 document, which does not fulfill the stated support for Swagger or YAML output.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes automatic API documentation generation from code comments with support for OpenAPI/Swagger and JSON/YAML output. In the implementation, the script emits a static JSON blob via a heredoc and never reads source code, parses comments, or derives documentation from input code, so the actual behavior does not match the claimed functionality.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file includes commands that generate output files via --output paths such as docs/openapi.json and docs/swagger.yaml, which implies file creation or overwrite. Under the missing-warning rule for markdown files, there is no explicit user warning about effects on local files or existing documentation artifacts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description is written only in Chinese ("自动生成 API 文档"), which indicates a language-specific presentation without any indication of user choice or a documented locale-specific purpose. Under the language/locale policy, forcing a specific language without opt-in can be a policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.