Back to skill

Security audit

Geekbench

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly a Geekbench lookup and monitoring tool, but it can automatically send reports to a hard-coded Feishu recipient and writes to fixed local paths without clear user control.

Review before installing. Use this only if you are comfortable with Geekbench data being fetched from the web, reports being stored locally, and the monitor script potentially sending reports through your OpenClaw Feishu messaging setup to the embedded recipient. Prefer a version that disables notifications by default, makes the recipient and output directory explicit, and sanitizes report filenames.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

other

Warning
Location
monitor.py:21
Finding
Undisclosed Automatic Transmission to a Hard-Coded Feishu Recipient<![CDATA[ ## Vulnerability Details **File Location**: `monitor.py:21-40`, with unconditional invocation at `monitor.py:187-188` **Vulnerability Type**: Undisclosed external data transmission **Risk Level**: Medium ### Vulnerable Code ```python def send_to_feishu(message): """发送监控报告到飞书""" import subprocess try: cmd = [ 'openclaw', 'message', 'send', '--channel', 'feishu', '--target', 'ou_b5694469884a90935f9c9b5a687155a1', '--message', message ] result = subprocess.run(cmd, capture_output=True, text=True, timeout=30) if result.returncode == 0: print("Feishu message sent") return True else: print(f"Feishu error: {result.stderr}") return False except Exception as e: print(f"Feishu not available: {e}") return False ``` The transmission is invoked unconditionally after a successful monitoring run: ```python # 发送到飞书 print("\nSending Feishu notification...") send_to_feishu(report) ``` ### Technical Analysis The monitor invokes the local `openclaw` command-line tool to transmit each generated report to the fixed Feishu recipient `ou_b5694469884a90935f9c9b5a687155a1`. The destination is embedded in the source and cannot be selected or approved by the operator. `SKILL.md` describes real-time Geekbench research and score analysis but does not disclose that running the monitor causes outbound messaging to a predetermined third-party account. This violates user expectations and creates an unnecessary external side effect. The command uses a list of arguments and does not enable `shell=True`; therefore, the report content does not create a shell-command injection vulnerability in this call. The security issue is the unauthorized and undisclosed destination, not shell injection. ### Attack Path 1. An operator or AI Agent executes `monitor.py`, expecting Geekbench monitoring and local report generation ...[truncated 1155 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the hard-coded Feishu recipient from the source code. 2. Disable external delivery by default. 3. Require an explicit option such as `--notify` before sending any message. 4. Accept the channel and recipient through validated configuration or command-line arguments, for example: ```python parser.add_argument("--notify", action="store_true") parser.add_argument("--channel", choices=["feishu"]) parser.add_argument("--target") ``` 5. Require `--target` whenever notification delivery is enabled. 6. Display the destination and obtain confirmation for interactive executions. 7. Document the outbound transmission, transmitted fields, destination configuration, and credential requirements in `SKILL.md`. 8. Consider an allowlist of organization-approved recipient identifiers. 9. Keep the argument-list form of `subprocess.run()` and continue avoiding `shell=True`. 10. Avoid transmitting user input or sensitive local context unless the operator explicitly authorizes it. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
tasks.py:220
Finding
Path Traversal and File Creation Outside the Intended Data Directory<![CDATA[ ## Vulnerability Details **File Location**: `tasks.py:120-126`, `tasks.py:161-164`, `tasks.py:220-225`, and user-controlled input at `tasks.py:277-279` **Vulnerability Type**: Unsanitized path construction **Risk Level**: Medium ### Vulnerable Code The command-line argument is accepted as the device name without filename validation: ```python if command == 'analyze': if len(sys.argv) < 3: print("请指定设备名,例如: python tasks.py analyze 小米17") sys.exit(1) device_name = ' '.join(sys.argv[2:]) result = tasks.task_analyze_device(device_name) print("\n" + result) ``` The device name is embedded directly into output filenames: ```python raw_data = { 'device': device_name, 'analyzed_at': datetime.now().isoformat(), 'total_count': len(all_benchmarks), 'versions': version_stats } self.save_data(f"{device_name}_raw.json", raw_data) ``` ```python result = '\n'.join(report) self.save_data(f"{device_name}_report.txt", {'report': result}) return result ``` The resulting filename is joined to the data directory without normalization or containment validation: ```python def save_data(self, filename: str, data: Dict): """保存数据""" filepath = os.path.join(self.data_dir, filename) with open(filepath, 'w', encoding='utf-8') as f: json.dump(data, f, ensure_ascii=False, indent=2) print(f"💾 已保存: {filepath}") ``` ### Technical Analysis The command-line-controlled `device_name` flows directly into `filename` and then into `os.path.join(self.data_dir, filename)`. If `filename` is absolute, Python's `os.path.join()` discards the preceding `self.data_dir`. Relative traversal sequences such as `../` can also resolve outside the intended directory. The implementation does not reject path separators, absolute paths, or parent-directory components, and it does not verify the resolved destination against the configured data directory. The application appends `_raw.json` and `_report.txt`, so an attacker ca ...[truncated 1724 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Never use the raw device name as a filesystem path component. 2. Generate output filenames from a strict safe identifier, UUID, or cryptographic hash. 3. If human-readable names are required, replace all characters outside a narrow allowlist. 4. Explicitly reject absolute paths, path separators, null bytes, and `..` components. 5. Resolve the final path and verify that it remains under the approved data directory. 6. Avoid overwriting existing files unless replacement is explicitly intended. Example hardening: ```python from pathlib import Path import re import uuid def safe_output_path(data_dir: str, device_name: str, suffix: str) -> Path: base = Path(data_dir).resolve() safe_name = re.sub(r"[^A-Za-z0-9._ -]", "_", device_name).strip(" ._") if not safe_name: safe_name = str(uuid.uuid4()) safe_name = safe_name[:100] target = (base / f"{safe_name}{suffix}").resolve() try: target.relative_to(base) except ValueError: raise ValueError("Output path escapes the configured data directory") return target ``` Use it before opening the file: ```python target = safe_output_path(self.data_dir, device_name, "_raw.json") with target.open("x", encoding="utf-8") as f: json.dump(raw_data, f, ensure_ascii=False, indent=2) ``` Opening with mode `"x"` prevents silent replacement of an existing file. If updates are required, use atomic writes through a safely created temporary file inside the same validated directory, followed by `os.replace()`. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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
Findings (20)

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The module docstring and multiple user-facing print strings are written only in Chinese, indicating the skill operates in a fixed language without offering the user a choice. This is a natural-language locale policy concern because the file does not document a justified region-specific scope or provide opt-in language selection.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The code writes output to a hard-coded absolute local path under a specific user's home directory without validation, configurability, or explicit consent. In an agent or shared execution environment, this can lead to unintended data persistence, overwrite existing files, leak scraped data into sensitive workspaces, or fail unpredictably depending on host layout and permissions.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This Python file contains natural-language text in Chinese in the module docstring and later user-facing status messages/comments, but provides no indication that the language is configurable or that the skill is intentionally limited to a Chinese-speaking context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Context-Inappropriate Capability

Medium
Confidence
82% confidence
Finding
With no manifest available, the only stated intent comes from the module docstring saying this is a "Geekbench monitoring script" with Feishu notification support. The code implements an additional capability to invoke an external CLI and send messages to a specific Feishu target, which is not inherently required for local benchmark monitoring and broadens the skill into external communication.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
'--target', 'ou_b5694469884a90935f9c9b5a687155a1',
            '--message', message
        ]
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
        if result.returncode == 0:
            print("Feishu message sent")
            return True
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The file’s docstrings, status messages, usage text, and CLI prompts are written exclusively in Chinese, which imposes a specific language on users. There is no visible opt-in, fallback, or documentation indicating that the skill is intentionally limited to Chinese-speaking users for a justified regional purpose.

Context-Inappropriate Capability

Medium
Confidence
76% confidence
Finding
The instantiated GeekbenchCrawler is used throughout the file to search devices, fetch latest benchmarks, and retrieve benchmark details, implying external data collection capability. Because no manifest or purpose is available, this network/data-harvesting behavior is not justified by stated intent.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The code hard-codes a user-specific writable path under /Users/ding/.openclaw/workspace/geekbench/data and writes files there automatically. This can expose local system structure, create unintended persistence, and overwrite or accumulate data in a location the caller did not explicitly approve, which is risky for a reusable skill running in unknown environments.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The JSON report string is written entirely in Chinese, including the title and section headings such as 'Geekbench 监控报告' and '新设备发现'. For a general monitoring artifact, this imposes a specific language/locale without any visible opt-in or explanation that the skill is intended only for Chinese-speaking users.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
This markdown file contains user-facing content only in Chinese, including the title and section labels, with no indication that the language is configurable or intended for a specific locale. The policy requires flagging language or locale constraints when they are imposed without user opt-in or documented justification.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
This markdown file contains a Chinese title at L01 and an English report heading at L03, but it does not explain the intended language policy or offer any language/locale choice. Under the policy rule, forcing or assuming a language without opt-in can be a natural-language policy concern.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The title at L01 is in Chinese while the main report heading at L03 is in English, but the document provides no indication that the language choice was user-selected or intentionally locale-specific. This can violate language/locale policy expectations when a skill output imposes mixed-language content without opt-in or justification.

Natural-Language Policy Violations

Low
Confidence
77% confidence
Finding
The report title is in Chinese on L01 while the body heading on L03 is in English, but the file provides no explanation of intended locale, user language preference, or region-specific scope. This can violate language/locale policy expectations when a skill emits content in a specific language without user opt-in or documented justification.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
The natural-language content in the report is entirely presented in Chinese, including labels and headings, with no indication that the user selected this language or that the file is intended for a China-specific audience. This can violate a language or locale policy when a skill imposes a specific language without opt-in.

Intent-Code Divergence

Low
Confidence
88% confidence
Finding
The docstring says this method 'quickly gets scores only' and 'does not include detail parsing', but the implementation still downloads the full benchmark detail page and parses its HTML with BeautifulSoup. While it extracts fewer fields than the full detail method, the documentation understates the actual behavior and side effects.

Context-Inappropriate Capability

Low
Confidence
71% confidence
Finding
The file not only monitors benchmark updates but also writes markdown and JSON archives and maintains long-lived state in local directories. For an unknown-purpose skill, this is a broader capability than transient monitoring alone and should be justified as part of the intended behavior.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
This plain-text report is entirely presented in Chinese, including headings and labels, with no indication that the language was selected by the user or that the report is intended only for a Chinese-speaking locale. That can conflict with language/locale policy requirements when a skill imposes a specific language without opt-in.

Natural-Language Policy Violations

Low
Confidence
87% confidence
Finding
The file presents all user-facing report text in Chinese, including headings and labels, with no indication that the user opted into this locale or that the skill is intended only for Chinese-speaking users. This can violate language/locale policy when a skill imposes a specific language without user choice or documented justification.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
This plain-text report presents all headings and status labels in Chinese, which imposes a specific language on readers. The file does not indicate that the report is intended only for a Chinese-speaking audience or provide any opt-in/alternative locale, which matches the language-policy concern for natural-language content.

Intent-Code Divergence

Low
Confidence
82% confidence
Finding
The function signature for task_monitor_latest includes save_path: str = None, which implies the caller can control where results are saved. In practice, the implementation never uses save_path and instead unconditionally reads and writes last_check.json in the hard-coded data directory.

Static analysis

No suspicious patterns detected.