T09 · Insecure Skill Coding Practices
- Location
README.md:47- Finding
Persistent Plaintext Storage of Alibaba Cloud Credentials
- Content
View full analysis
Vulnerability Details
File Location:
README.md, lines 47-67
Vulnerability Type: Plaintext storage of long-lived cloud credentials
Risk Level: MediumThe documentation instructs users to export an Alibaba Cloud AccessKey ID and AccessKey secret and recommends persisting the configuration in either the OpenClaw gateway configuration file or a shell startup file.
bash export ALIYUN_ACCESS_KEY_ID="LTAI5tXXXXXXXXXXXX" export ALIYUN_ACCESS_KEY_SECRET="XXXXXXXXXXXXXXXXXXXX" export DATAWORKS_PROJECT_ID="XXXXXX" export DATAWORKS_REGION_ID="cn-shanghai"Recommended persistent configuration locations:
text ~/.openclaw/openclaw.json ~/.bashrcTechnical Analysis
Long-lived AccessKey credentials are bearer secrets: possession is generally sufficient to authenticate as the associated Alibaba Cloud RAM identity. Persisting these credentials directly in a shell initialization file or general application configuration creates an avoidable plaintext secret at rest.
Shell startup files and gateway configuration files may be exposed to other local processes running under the same account, overly broad filesystem permissions, workstation backups, diagnostic bundles, support archives, or accidental configuration disclosure. Environment variables initialized from these files may also be inherited by child processes and exposed through process inspection or debugging facilities, depending on the operating-system configuration.
The example values are placeholders rather than actual leaked credentials. The vulnerability is the recommended credential-storage pattern.
Attack Path
- A user follows the documentation and writes a valid AccessKey ID and secret into
~/.bashrcor~/.openclaw/openclaw.json. - An attacker obtains local read access to the user's files, compromises another process operating as that user, or acquires a backup or diagnostic archive containing the configuration.
- The ...[truncated 1079 chars]
- A user follows the documentation and writes a valid AccessKey ID and secret into
- Remediation
View remediation
Remediation Suggestions
- Prefer short-lived Alibaba Cloud STS credentials instead of long-lived AccessKeys.
- Where supported, use workload identity, instance RAM roles, or another identity mechanism that avoids distributing static secrets.
- Store unavoidable secrets in a dedicated secret manager or operating-system credential store rather than
~/.bashrcor a general gateway configuration file. - Retrieve credentials only when needed and avoid exporting them globally to every child process in the user's shell session.
- Assign the RAM identity only the read-only DataWorks permissions required to list and inspect task instances. Do not use an Alibaba Cloud primary-account AccessKey.
- If file-based storage cannot be avoided, use a dedicated credentials file outside the project, restrict its permissions to the owning user, exclude it from backups and diagnostic archives where feasible, and never commit it to version control.
- Add credential rotation and revocation procedures to the documentation. Rotate immediately if a configuration file or environment dump may have been disclosed.
- Replace the current recommendation with secret-manager or STS-based setup examples and explicitly warn against persistent plaintext storage in shell startup files.
