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.
