Back to skill

Security audit

Auto Doc AI

Security checks for vulnerabilities and agentic risk

Overview

The skill itself is a coherent Python docstring generator, but its README also tells users to clone and run unpinned code from an external repository that is not included in the reviewed artifact.

Install through the reviewed OpenClaw package path when possible. Avoid following the README's direct git clone and ./bin/generate-docs execution unless you first pin and verify the exact repository commit and are comfortable running unaudited code. Use --dry-run before recursive or overwrite modes because the tool can modify source files.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
README.md:20
Finding
Execution of Unpinned Remote Repository Code## Vulnerability Details **File Location**: `README.md`, lines 20-22 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Vulnerable Code:** ```bash git clone https://github.com/kimi-claw/skill-auto-doc-ai.git cd skill-auto-doc-ai ./bin/generate-docs --help ``` ### Technical Analysis The documented installation procedure clones the default branch of an external Git repository without pinning an immutable commit hash or verified release. It then instructs the user to execute `bin/generate-docs` from the downloaded repository. Because the upstream default branch is mutable, the executed script can change after this artifact has been reviewed. The referenced executable is not present in the audited project, which contains only `README.md` and `SKILL.md`; consequently, its behavior and integrity cannot be verified from the supplied artifact. Even invoking a script with `--help` executes its top-level code and does not provide a security boundary. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or the repository's distribution process. 2. The attacker modifies the default branch or replaces `bin/generate-docs` with a malicious payload. 3. A user follows the installation instructions and clones the mutable repository state. 4. The user runs `./bin/generate-docs --help`. 5. The malicious script executes with the privileges and environment of that user. ### Impact Assessment Successful exploitation permits arbitrary code execution under the account that follows the documented instructions. Depending on that account's privileges and accessible environment, the payload could read or alter user files, access environment variables and credentials, modify source repositories, invoke network services, or install additional software. Administrator-level impact is possible if the instructions are executed by a privileged user, although privilege escalation ...[truncated 255 chars]
Remediation
## Remediation Suggestions - Include `bin/generate-docs` and all required implementation files in the reviewed and distributed skill package. - If external retrieval is necessary, pin the source to a specific immutable commit hash rather than cloning and executing the current default branch. - Publish releases with cryptographic signatures and checksums, and require verification before execution. - Use a trusted package registry with locked dependency versions and integrity metadata. - Document the exact expected commit and checksum so users can independently verify downloaded content. - Review the complete executable payload and its transitive dependencies before recommending execution. - Run the tool with least privilege in an isolated environment, without unnecessary credentials or sensitive environment variables.
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The display name and description specify the skill in Chinese and the example generated docstring content is also Chinese, indicating a language-specific behavior. The file does not state that language is configurable or that the locale restriction is intentional for a region-specific use case, which can violate language/locale policy requirements.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The primary skill description is written in Chinese with no indication that other languages are supported or that the user can choose their preferred language. This can violate a language/locale policy when a skill implicitly forces one language without opt-in or documented justification.

Static analysis

No suspicious patterns detected.