T09 · Insecure Skill Coding Practices
- Location
scripts/backup_config.py:192- Finding
Backups containing potentially sensitive configuration are created without restrictive permissions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent backup purpose, but it can persist sensitive QClaw/OpenClaw configuration and cron data in plaintext with broad automatic triggers and weak local-file safeguards.
Review this before installing if your QClaw/OpenClaw channels, plugins, or cron jobs may contain tokens, webhook URLs, private prompts, account IDs, or delivery targets. Only run backups intentionally, secure the backup directory to owner-only access, avoid the documented fixed /tmp cron-data file, and delete old backups you no longer need.
scripts/backup_config.py:192Backups containing potentially sensitive configuration are created without restrictive permissions
SKILL.md:34Predictable shared temporary file is used for cron-job configuration
The trigger phrases include generic terms such as '版本升级' and '任务失败' that can easily appear in ordinary conversation, increasing the chance that the skill activates unintentionally. In this skill, unintended activation is more dangerous because activation can lead to reads of cron state, local configuration inspection, and creation of persistent backups without a clearly scoped user request.
The skill explicitly describes automatic backup behavior that writes configuration and cron task data to disk, including copying backups into a persistent backup directory, but it does not clearly warn the user or require confirmation before persisting potentially sensitive operational data. This creates a privacy and security risk because cron definitions, channel mappings, and related configuration may contain identifiers, endpoints, or other sensitive metadata that remain on disk longer than the user expects.
The natural-language descriptions and usage text are presented only in Chinese, which imposes a language choice on users without any opt-in or explanation of a region-specific requirement. Under the policy, language constraints should either be optional or clearly justified.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if system == "Darwin": # macOS
try:
result = subprocess.run(
["/usr/libexec/PlistBuddy", "-c", "Print CFBundleShortVersionString",
"/Applications/QClaw.app/Contents/Info.plist"],
capture_output=True, text=True, timeout=5
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
if system == "Darwin": # macOS
try:
result = subprocess.run(
["/usr/libexec/PlistBuddy", "-c", "Print CFBundleShortVersionString",
"/Applications/QClaw.app/Contents/Info.plist"],
capture_output=True, text=True, timeout=5
)
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
if system == "Darwin": # macOS
try:
result = subprocess.run(
["/usr/libexec/PlistBuddy", "-c", "Print CFBundleShortVersionString",
"/Applications/QClaw.app/Contents/Info.plist"],
capture_output=True, text=True, timeout=5
)
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
try:
result = subprocess.run(
["/usr/libexec/PlistBuddy", "-c", "Print CFBundleShortVersionString",
"/Applications/QClaw.app/Contents/Info.plist"],
capture_output=True, text=True, timeout=5
)
if result.returncode == 0:
The script serializes application configuration, plugin settings, channel settings, and cron job data into backup.json and latest.json on disk without any access-control hardening, encryption, redaction, or explicit sensitivity warning. If these configs contain API keys, tokens, server URLs, secrets, or operational details, other local users, malware, or backup/sync tooling could exfiltrate them.
The module documentation says the tool performs '自动修复' and the '--fix' usage line labels it as automatic repair. In practice, the '--fix' branch only runs health checks, prints suggestions, invokes backup_config(), and then tells the user to manually run 'openclaw cron update' commands; it does not actually apply the cron configuration fixes itself.
This code file contains natural-language instructions and status text exclusively in Chinese, beginning with the module docstring and continuing throughout the script. Under the language/locale policy rule, forcing a specific language without user opt-in is a policy violation unless the locale restriction is explicitly justified.