Back to skill

Security audit

OpenClaw Doc Generator

Security checks for vulnerabilities and agentic risk

Overview

This documentation skill is mostly aligned with generating project docs, but it needs review because it can load code from an unverified sibling folder and its instructions overstate or under-warn about mutating workflows.

Review this skill before installing. Use it only in repositories where you are comfortable with source scanning and documentation file changes, inspect diffs after README or docs generation, avoid copying the CI push workflow without PR-based safeguards, and treat the optional c-support/lib c_parser import as unsafe unless that sibling dependency is trusted and controlled.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Error
Location
scripts/api_generator.py:15
Finding

Unsafe Import of an Unverified Out-of-Project Python Module

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code clearly implements an API documentation generator: it scans Python and C files, extracts classes, functions, signatures, docstrings, C functions/types/macros, and writes formatted documentation output. This matches part of the declared description ('Generates documentation from code' and 'Creates API docs'). However, the broader declared description also claims README updates, architecture diagram creation, and ongoing synchronization with code changes, none of which are present in this code chunk. There are no triggers, watchers, repository update mechanisms, diagram generation libraries, or README-specific editing logic. Thus the description overstates the implemented capabilities, creating a material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description presents a broader documentation-generation system that creates API docs, README updates, architecture diagrams, and synchronizes docs with code changes. The supplied code chunk is much narrower: it only manipulates README.md content by updating a table of contents and adding/replacing an API reference section pointing to an existing docs file. It does not analyze source code, generate documentation artifacts from code, produce diagrams, or implement general sync behavior. While README updating is consistent with part of the description, the overall declared purpose materially overstates what this code actually does.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The CI/CD example automatically commits and pushes generated documentation to the remote repository with no warning or safety guard. In an automated environment, this can propagate unintended changes, create commit loops, or push sensitive/generated content to shared branches without human review.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill clearly describes reading source files and writing documentation files, but it does not declare any explicit tool scope such as allowed file operations or path constraints. In an agent setting, undocumented read/write capability increases the chance of unintended repository modification or broader file access than the user expects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description is presented in Chinese while the file metadata and examples otherwise use mixed English terminology, and there is no indication that language is user-selectable or intentionally region-specific. This creates a natural-language policy concern because the skill appears to impose a locale/language without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The quick-start instructions encourage commands that write documentation outputs without warning the user that repository files will be created or modified. In agent-assisted workflows, lack of an upfront modification warning can lead to silent edits, unexpected diffs, or overwriting existing docs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented '--fix' mode implies automated remediation but does not warn that it may regenerate, create, or overwrite documentation files. Automatic write behavior is riskier than read-only checking because users may trigger it expecting a safe validation step.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code performs a file write to README.md, which changes user-controlled project documentation, but the only user-facing disclosure is a post-action success message. There is no confirmation prompt or explicit warning before the modification occurs, and the function docstring does not clearly warn that existing README content will be overwritten or replaced in-place.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The function writes updated content back to README.md and may replace an existing API section, which is a file-modifying operation with potentially destructive effects on documentation content. The code returns a success message after the write, but there is no prior warning, confirmation, or clear disclosure that existing README content can be overwritten.

Content

No source excerpt is available for this finding.