T09 · Insecure Skill Coding Practices
- Location
query_browser.sh:132- Finding
Alibaba Cloud Credentials Exposed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
query_browser.sh, lines 132-143
Vulnerability Type: Plaintext credential exposure through process arguments
Risk Level: Mediumbash 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 || trueTechnical Analysis
The script reads a reusable Alibaba Cloud account and password from the local
TOOLS.mdfile and passes both values directly toopenclawas 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
- The user stores valid Alibaba Cloud credentials in
~/.openclaw/workspace/TOOLS.md. - The user invokes the Bailian usage skill while no authenticated browser session is available.
- The script reads the account and password into shell variables.
- The script starts
openclaw browser typeoropenclaw browser fillwith the credential embedded in its argument vector. - A c ...[truncated 1015 chars]
- The user stores valid Alibaba Cloud credentials in
- Remediation
View remediation
Remediation Suggestions
- Do not pass account names, passwords, session tokens, or other secrets through command-line arguments.
- Prefer reusing an authenticated browser profile so that the script does not repeatedly handle the account password.
- 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.
- Store credentials in an operating-system credential manager or secret store rather than a general-purpose Markdown file.
- If
TOOLS.mdmust remain supported, verify that it is owned by the expected user and restrict its permissions to that user before reading it. - Use a dedicated least-privileged Alibaba Cloud account and enable multi-factor authentication and login alerts to reduce the impact of credential disclosure.
- Avoid retaining the password longer than necessary and unset credential variables immediately after authentication.
