T09 · Insecure Skill Coding Practices
- Location
scripts/config-preflight-validator.py:43- Finding
Schema Validation Fails Open When No Schema Is Available
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a straightforward OpenClaw configuration validator with disclosed local schema caching, though users should not treat its fallback checks as complete validation.
Install this only if you are comfortable with a Chinese-language helper that invokes the local OpenClaw CLI to fetch schema data and caches that schema under your home directory. For important configuration changes, ensure `jsonschema` is installed and a live or cached schema is available; otherwise the tool only performs limited checks and may overstate confidence.
scripts/config-preflight-validator.py:43Schema Validation Fails Open When No Schema Is Available
SKILL.md:39Unpinned Third-Party Dependency Installation
The skill advertises and instructs shell execution plus reads from and writes to local files, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization ambiguity where an agent may invoke broader capabilities than a reviewer or runtime policy expects, increasing the risk of unintended file access or command execution.
The manifest description and main body are written in Chinese, which imposes a specific language on users. There is no indication that the skill supports other languages, offers opt-in language selection, or is restricted to a justified Chinese-only context.
The file's top-level documentation and CLI descriptions are entirely in Chinese, and the script's output strings continue this language assumption throughout the file. This imposes a specific language on users without opt-in or documentation that the tool is intended only for a Chinese-speaking or region-specific environment.
The script is described as a local preflight validator, but it silently reaches out through the OpenClaw CLI and persists returned data under the user's home directory. This violates least surprise and expands the trust boundary: a compromised or unexpected CLI/backend response could influence validation behavior or leave persistent artifacts without explicit user approval.
For a validator whose stated purpose is local configuration checking, subprocess-based gateway access introduces unnecessary capability and an avoidable dependency on external behavior. In this context, the extra capability increases attack surface and can cause unintended network/service interaction, making the skill more dangerous than its description suggests.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import subprocess
try:
# 优先使用 openclaw CLI 获取
result = subprocess.run(["openclaw", "gateway", "config.schema"], capture_output=True, text=True, timeout=5)
if result.returncode == 0:
schema = json.loads(result.stdout)
# 缓存一份