Back to skill

Security audit

Bailian Usage

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned, but it automatically uses saved Alibaba Cloud credentials and a browser session with broad triggers and weak credential handling.

Review before installing. Use this only if you are comfortable storing Alibaba Cloud credentials in TOOLS.md and allowing the skill to log into Bailian automatically. Prefer a least-privileged Alibaba Cloud account, MFA/login alerts, restrictive file permissions, and a confirmation step before any credential use; the password may be briefly visible to local process-monitoring tools during login.

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
query_browser.sh:132
Finding
Alibaba Cloud Credentials Exposed Through Command-Line Arguments## Vulnerability Details **File Location**: `query_browser.sh`, lines 132-143 **Vulnerability Type**: Plaintext credential exposure through process arguments **Risk Level**: Medium ```bash openclaw browser type "$ACCOUNT_REF" "$ACCOUNT" --timeout 5000 2>/dev/null || true else # Attempt to use fill openclaw browser fill --fields "[{\"text\":\"$ACCOUNT\"}]" --timeout 5000 2>/dev/null || true fi sleep 1 # Find the password field (second textbox) echo " Filling password..." # Switch to the password field using Tab openclaw browser press "Tab" --timeout 2000 2>/dev/null || true sleep 0.5 openclaw browser type --text "$PASSWORD" --timeout 5000 2>/dev/null || true ``` ### Technical Analysis The script reads a reusable Alibaba Cloud account and password from the local `TOOLS.md` file and passes both values directly to `openclaw` as command-line arguments. Redirecting standard error does not protect command-line arguments. Depending on operating-system process visibility and host configuration, command arguments can be observed through process inspection interfaces or captured by local process-monitoring, auditing, diagnostic, or endpoint-management software. The exposure window may be brief, but the commands necessarily create processes whose argument vectors contain the plaintext credentials. This finding does not indicate third-party exfiltration by the skill itself. Exploitation requires another local process or user with sufficient ability to inspect process metadata while the login commands are running. ### Attack Path 1. The user stores valid Alibaba Cloud credentials in `~/.openclaw/workspace/TOOLS.md`. 2. The user invokes the Bailian usage skill while no authenticated browser session is available. 3. The script reads the account and password into shell variables. 4. The script starts `openclaw browser type` or `openclaw browser fill` with the credential embedded in its argument vector. 5. A c ...[truncated 1015 chars]
Remediation
## Remediation Suggestions 1. Do not pass account names, passwords, session tokens, or other secrets through command-line arguments. 2. Prefer reusing an authenticated browser profile so that the script does not repeatedly handle the account password. 3. If automated authentication is required, modify or use a browser interface that accepts sensitive input through a protected standard-input stream, inherited file descriptor, or dedicated secret-input API that does not place the value in the process argument vector. 4. Store credentials in an operating-system credential manager or secret store rather than a general-purpose Markdown file. 5. If `TOOLS.md` must remain supported, verify that it is owned by the expected user and restrict its permissions to that user before reading it. 6. Use a dedicated least-privileged Alibaba Cloud account and enable multi-factor authentication and login alerts to reduce the impact of credential disclosure. 7. Avoid retaining the password longer than necessary and unset credential variables immediately after authentication.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger phrase "Coding Plan" is overly broad and can be invoked in many benign conversations unrelated to quota checking. Because this skill can initiate authenticated browser activity using stored credentials, ambiguous activation materially increases the risk of accidental execution and unauthorized account access in contexts where the user did not intend to run it.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill is explicitly designed to read Alibaba Cloud credentials from a local TOOLS.md file and use them for automated browser login. Even though the README claims the credentials are only used locally and not exfiltrated, this is still a sensitive capability because a skill with broad invocation access can cause unintended account access, billing exposure, or make later credential misuse easier if the implementation changes or is subverted.

Skill Enumeration

Medium
Category
Agent Snooping
Content
- **Script**: `~/.openclaw/workspace/skills/bailian-usage/query_browser.sh`
- **Config**: `~/.openclaw/workspace/TOOLS.md` (credentials)
- **Docs**: `~/.openclaw/workspace/skills/bailian-usage/SKILL.md`
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
- **Script**: `~/.openclaw/workspace/skills/bailian-usage/query_browser.sh`
- **Config**: `~/.openclaw/workspace/TOOLS.md` (credentials)
- **Docs**: `~/.openclaw/workspace/skills/bailian-usage/SKILL.md`
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger list includes broad, natural-language phrases such as asking how much quota remains, which can cause accidental invocation during ordinary conversation. In this skill’s context, unintended activation is more dangerous because the documented behavior includes opening a browser, reusing persistent login cookies, and potentially reading local credentials from TOOLS.md to log into a cloud account.

Vague Triggers

Medium
Confidence
92% confidence
Finding
Using any mention of "阿里云百炼" / "Alibaba Cloud Bailian" as a trigger is overly broad and can cause the skill to activate during general discussion rather than an explicit quota-check request. In this skill, over-triggering is more dangerous than usual because activation can lead to browser automation, login checks, and potential use of stored credentials without clear user intent.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The phrase "看看套餐情况" / "Check package status" is vague and not specific to Bailian, so it may collide with unrelated requests about other subscriptions or services. Because this skill performs authenticated account access and data extraction, an ambiguous trigger can result in unintended access to sensitive account information.

Ssd 3

Medium
Confidence
96% confidence
Finding
The skill instructs the agent to read credentials from a local `TOOLS.md` file and use them for automated login without interactive confirmation. This creates a clear secret-handling risk: any unintended or malicious invocation of the skill could cause the agent to access stored credentials and authenticate to a real account, expanding the impact from mis-triggering into unauthorized account access.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The trigger phrases include broad natural-language requests such as asking to see how much Alibaba Cloud quota remains, which can overlap with ordinary user intent and cause this skill to activate unexpectedly. Because the skill reads local credentials and performs authenticated browser automation, an accidental invocation could expose account data or initiate a login flow without sufficiently explicit user consent.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script automatically reads stored credentials from TOOLS.md and uses them for authentication without prompting the user at the point of access. In an agent-skill context, this is risky because a user may invoke a seemingly harmless usage query while the skill silently accesses reusable account secrets and authenticates to a third-party service.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The script claims credentials are handled safely, but it passes the password directly into browser automation commands during login. Even if stderr is redirected, command arguments may still be exposed through process listings, tool telemetry, debug logs, or browser automation histories, so the assurance is misleading and weakens operator awareness of secret exposure risk.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The automated login step transmits account credentials to a remote service with only routine progress messages, not an explicit warning or confirmation. This increases the chance of unintended secret use and makes phishing-like behavior harder for users to distinguish from legitimate automation, especially when combined with UI-driven browser actions.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The documented invocation method requires specific Chinese phrases and presents all user-facing usage instructions only in Chinese, with no indication that other languages are supported or that Chinese is optional. This creates a language/locale constraint without user opt-in or justification as a region-specific requirement.

Natural-Language Policy Violations

Low
Confidence
70% confidence
Finding
The manifest tags the skill with "chinese", which may imply a language-specific experience, but the file does not explicitly state that users can choose language behavior or why Chinese-only behavior would be required. Because language/locale restrictions should be opt-in or clearly justified, this may conflict with language policy expectations.

Static analysis

No suspicious patterns detected.