T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:32- Finding
Overbroad Inspection of Plaintext Secrets and Environment Variables
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 32
Vulnerability Type: Excessive access to credential-bearing data
Risk Level: MediumComplete Code Snippet:
markdown - Scan for plaintext secrets in .env, .bashrc, environment variablesTechnical Analysis
The instruction directs the agent to scan
.env,.bashrc, and environment variables for plaintext secrets. These sources can contain API keys, passwords, access tokens, cloud credentials, and credentials belonging to applications unrelated to OpenClaw.The instruction does not constrain the scan to OpenClaw-specific paths or variable names. It also does not require explicit user consent, local-only matching, redaction, or suppression of secret values in responses and logs. Consequently, secret values may unnecessarily enter the agent's context even though the declared security-deployment function can generally be fulfilled by checking file existence, ownership, permissions, secret naming patterns, and configuration practices without retrieving complete values.
This violates least-privilege and data-minimization principles. The audited file does not specify a remote destination or explicitly instruct the agent to exfiltrate the collected data.
Attack Path
- A user invokes the security-guide Skill.
- The agent follows the instruction to inspect
.env,.bashrc, and all available environment variables. - The inspected sources contain unrelated credentials or authentication tokens.
- Complete secret values enter the agent context.
- Those values may be disclosed in generated output, tool traces, audit logs, or other retained execution records if the implementation does not independently redact them.
Impact Assessment
Successful exposure could compromise any account, API, cloud resource, or service associated with the inspected credentials. The scope depends on the permissions assigned to each exposed secret and may e ...[truncated 249 chars]
- Remediation
View remediation
Remediation Suggestions
-
Restrict checks to documented OpenClaw configuration files and OpenClaw-specific environment-variable names.
-
Check file metadata, ownership, and permissions without reading file contents whenever possible.
-
Require explicit user authorization before inspecting any credential-bearing content.
-
Detect likely secrets locally and report only the source, variable name, secret type, and a fully redacted fingerprint.
-
Prohibit printing, logging, storing, or transmitting complete secret values.
-
Add explicit exclusions for unrelated shell configuration, cloud credentials, and application environments.
-
Replace the instruction with a constrained form such as:
markdown Check permissions and ownership of OpenClaw credential files without displaying their contents. With explicit user consent, scan only documented OpenClaw configuration paths for likely secrets and return redacted findings.
-
