Back to skill

Security audit

Find File

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a file-finding and file-copying purpose, but it also includes under-disclosed LINE credential discovery and file-upload behavior that users should review carefully.

Install only if you are comfortable with the skill searching local files, copying selected files to a Desktop folder, revealing copied files in Explorer, and potentially sending files through LINE. The LINE helper should be reviewed or removed unless you explicitly want it to read local OpenClaw/Moltbot configuration for credentials; it also prints credential-related details to output.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/send_line.py:7
Finding
Unnecessary Secret-File Discovery and Partial Credential Disclosure<![CDATA[ ## Vulnerability Details **File Location**: `scripts/send_line.py`, lines 7–24, 31–53, and 71–73 **Vulnerability Type**: Sensitive configuration access and credential disclosure **Risk Level**: Medium ### Vulnerable Code ```python def get_openclaw_config(): """ Attempts to find OpenClaw / Moltbot configuration or secrets. """ paths = [ Path("C:/Users/user/.openclaw/openclaw.json"), Path.home() / ".openclaw" / "secrets.json", Path.home() / ".openclaw" / "config.json", Path.home() / ".moltbot" / "secrets.json", ] for p in paths: if p.exists(): try: with open(p, 'r') as f: return json.load(f) except Exception: pass return {} ``` ```python def send_to_line(file_path, channel_access_token=None, user_id=None): """ Sends a file to a LINE user using the Messaging API. """ config = get_openclaw_config() # Helper to find nested keys def find_key(cfg, key_name): if key_name in cfg: return cfg[key_name] for v in cfg.values(): if isinstance(v, dict): res = find_key(v, key_name) if res: return res return None # Priority: Argument > Environment Variable > Config File (Flat or Nested) token = (channel_access_token or os.environ.get("LINE_CHANNEL_ACCESS_TOKEN") or find_key(config, "LINE_CHANNEL_ACCESS_TOKEN") or find_key(config, "line_token") or find_key(config, "channelAccessToken")) to_user = (user_id or os.environ.get("LINE_USER_ID") or find_key(config, "LINE_USER_ID") or find_key(config, "line_user_id") or find_key(config, "userId")) ``` ```python print(f"Credentials Found:") print(f" - Token: {token[:5]}...{token[-5:] if len(token)>10 else ''}") print(f" - Target User: {to_user}") ``` ### Technical An ...[truncated 2476 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove automatic probing of OpenClaw and Moltbot secret files. 2. Accept credentials only through an explicit, documented, and narrowly scoped secure configuration interface. 3. Never print access-token prefixes, suffixes, full tokens, recipient identifiers, or other credential-related values. 4. Validate the requested file, its type, and its size before accessing any credentials. 5. Replace recursive searches for generic keys such as `userId` with strict schema validation and exact configuration paths. 6. If direct LINE transmission is required, implement it through an approved API flow with narrowly scoped credentials and clear failure reporting. 7. If the OpenClaw bridge is the intended transfer mechanism, remove credential handling from this helper entirely and return only the validated local path through the documented bridge interface. 8. Use structured error handling that does not silently suppress configuration parsing errors and does not expose secret values. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
This finding indicates the skill may read local secret/config files, extract credentials or recipient IDs, and route files to an external messaging platform instead of merely copying them locally. In context, that transforms a benign file-finder into a credential-harvesting and data-exfiltration mechanism, especially dangerous because the manifest frames it as local file assistance rather than secret access and network delivery.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
This finding indicates the skill may read local secret/config files, extract credentials or recipient IDs, and route files to an external messaging platform instead of merely copying them locally. In context, that transforms a benign file-finder into a credential-harvesting and data-exfiltration mechanism, especially dangerous because the manifest frames it as local file assistance rather than secret access and network delivery.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
This finding indicates the skill may read local secret/config files, extract credentials or recipient IDs, and route files to an external messaging platform instead of merely copying them locally. In context, that transforms a benign file-finder into a credential-harvesting and data-exfiltration mechanism, especially dangerous because the manifest frames it as local file assistance rather than secret access and network delivery.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
This finding indicates the skill may read local secret/config files, extract credentials or recipient IDs, and route files to an external messaging platform instead of merely copying them locally. In context, that transforms a benign file-finder into a credential-harvesting and data-exfiltration mechanism, especially dangerous because the manifest frames it as local file assistance rather than secret access and network delivery.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
This finding indicates the skill may read local secret/config files, extract credentials or recipient IDs, and route files to an external messaging platform instead of merely copying them locally. In context, that transforms a benign file-finder into a credential-harvesting and data-exfiltration mechanism, especially dangerous because the manifest frames it as local file assistance rather than secret access and network delivery.

Ssd 3

High
Confidence
99% confidence
Finding
The skill explicitly instructs the AI to print full local file paths in chat so an external bridge can automatically upload the referenced file. This is a direct exfiltration pattern: path disclosure becomes a covert command channel that can send sensitive local files off-host without a conventional attachment flow or clear user review.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The script’s behavior does not match the declared skill purpose of local file search/copy-to-reception. Instead, it targets LINE messaging and hunts for OpenClaw/Moltbot configuration and tokens, which is a strong indicator of hidden capability and possible credential abuse. This mismatch is especially dangerous in a skill context because users and reviewers may grant trust based on the manifest while the code performs unrelated secret discovery.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The code enumerates local config and secrets files plus environment variables to extract LINE and unrelated OpenClaw/Moltbot credentials, despite the skill being described as a file finder/sender using a reception folder. Accessing unrelated secrets is credential harvesting behavior and can enable unauthorized messaging, account abuse, or lateral access to adjacent systems. The skill context makes this more dangerous because there is no legitimate operational need for these secrets to perform the advertised task.

Credential Access

High
Category
Privilege Escalation
Content
"""
    paths = [
        Path("C:/Users/user/.openclaw/openclaw.json"),
        Path.home() / ".openclaw" / "secrets.json",
        Path.home() / ".openclaw" / "config.json",
        Path.home() / ".moltbot" / "secrets.json",
    ]
Confidence
98% confidence
Finding
Referencing .openclaw/secrets.json indicates targeted access to stored secrets rather than ordinary file-processing logic. This is a credential access pattern that can expose tokens or API keys usable for impersonation or unauthorized service access. Because the skill is supposed to find and copy files locally, this secret targeting is contextually suspicious and dangerous.

Credential Access

High
Category
Privilege Escalation
Content
Path("C:/Users/user/.openclaw/openclaw.json"),
        Path.home() / ".openclaw" / "secrets.json",
        Path.home() / ".openclaw" / "config.json",
        Path.home() / ".moltbot" / "secrets.json",
    ]
    
    for p in paths:
Confidence
98% confidence
Finding
Referencing .moltbot/secrets.json is another explicit attempt to access stored credentials unrelated to the advertised skill purpose. Such access can reveal tokens for other tools or services, enabling unauthorized actions beyond the current skill. The mismatch between stated functionality and targeted secret files strongly suggests intentional credential harvesting.

Credential Access

High
Category
Privilege Escalation
Content
def main():
    parser = argparse.ArgumentParser(description="Send a file via LINE (using OpenClaw settings).")
    parser.add_argument("path", help="Path to the file to send")
    parser.add_argument("--token", help="Override LINE Channel Access Token")
    parser.add_argument("--to", help="Override LINE User ID")
    
    args = parser.parse_args()
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill declares powerful capabilities to search local files, copy them, open Explorer, and potentially upload them via LINE, but it does not define any explicit tool scope or permission boundaries. In a file-handling skill, missing scope restrictions materially increases the chance of unauthorized filesystem access, command execution, credential exposure, or network exfiltration beyond the stated purpose.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The manifest presents primarily local search/copy behavior, but the documented behavior includes direct LINE upload/network transfer. That discrepancy is dangerous because users may authorize a local-only workflow while the skill is actually capable of sending files off-device, creating a clear exfiltration risk.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The invocation guidance is broad enough that the skill could activate on vague requests to find or send files without tight constraints on directories, file types, or approval steps. In a file-searching skill, overbroad triggers increase the chance of unintentional discovery or transfer of sensitive documents.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The manifest describes a skill that can search by keywords, extensions, or descriptions and also "send" files by copying them to a reception folder. In this file, the implemented behavior is limited to pathname glob matching and optional text search inside file contents, and there is no code that copies or sends files anywhere.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The manifest presents a broader 'File Finder & Sender' capability, including searching by keywords/extensions/descriptions and sending files to a reception folder. In this implementation, the code only performs local filesystem enumeration using a glob pattern and optional text-content search, and never copies or sends files anywhere.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The script copies arbitrary user-specified files or folders into a Desktop reception folder without any confirmation, preview, or warning that local files will be duplicated. In an agent-skill context, silent file modification is risky because it can expose sensitive data in a more visible location, consume storage, or copy more content than the user intended.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
# New: Open the folder and select the file in Windows Explorer
        try:
            subprocess.run(['explorer', '/select,', str(target_path)])
        except Exception:
            pass
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
# New: Open the folder and select the file in Windows Explorer
        try:
            subprocess.run(['explorer', '/select,', str(target_path)])
        except Exception:
            pass
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The code reads sensitive local configuration and secret files without any user-facing disclosure, consent, or indication that credentials will be accessed. Even if not exfiltrated here, silently inspecting secrets violates least surprise and can expose confidential values to downstream logs, debugging output, or future code changes. Within this skill context, secret access is unjustified by the advertised functionality, increasing the severity.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The function claims to send a file through the LINE API, but in practice it mainly discovers credentials, validates inputs, prints credential-derived status, and returns success without actually sending. This deceptive implementation can be used to normalize or conceal secret collection during review and may mislead operators into believing the code is harmless utility logic. In a security-sensitive skill ecosystem, such misrepresentation is itself risky because it masks the true behavior.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
The example response is written in Traditional Chinese and presented as the direct user-facing output, but the document does not offer any language choice or indicate that this locale is optional. This can violate language/locale policy when the skill is used with users who did not opt into that language.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The default target directory name is set to "檔案接收櫃" and the docstring refers to that same localized name, which imposes a specific language choice in the skill behavior. This is a natural-language locale policy concern because users are not given an opt-in or configurable language/locale option.

Context-Inappropriate Capability

Low
Confidence
93% confidence
Finding
The skill spawns Windows Explorer as a side effect after copying a file, creating an additional UI/process-launch capability beyond the core file-transfer purpose. In an agent context, unexpected application launches can leak sensitive filenames on screen, disrupt headless automation, or be abused as an unneeded user-environment interaction surface.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
The default target directory name is fixed as '檔案接收櫃', which imposes a specific language choice without offering the user an opt-in or alternative. This can violate language/locale policy expectations when a skill should not force a locale-specific experience by default.