T09 · Insecure Skill Coding Practices
- Location
filtered-executor.ts:74- Finding
Sensitive Command Arguments May Be Disclosed Through Oversized-Output Logging
- Content
View full analysis
0 && raw.length > this.config.oversizedOutputLog ) { console.error( `[exec-truncate] oversized output: ${raw.length} chars for "${command}" — truncated` ); } ``` ### Technical Analysis When `oversizedOutputLog` is enabled and the command produces output exceeding the configured threshold, the complete command string is written to stderr without redaction. Command arguments may contain API keys, passwords, bearer tokens, signed URLs, database connection strings, authorization headers, private file paths, or environment-variable assignments. The implementation does not distinguish between executable names and sensitive arguments. Although the project delegates execution to a caller-provided function and does not itself inject commands, it receives the original command and may expose its contents through logs. stderr may be collected by CI systems, service managers, centralized logging platforms, terminal capture systems, or the OpenClaw host. ### Attack Path 1. An application enables `oversizedOutputLog` with a positive threshold. 2. A command containing a secret is passed to `FilteredExecutor.run()`, such as a command with an authorization header, token argument, or signed URL. 3. The command produces output larger than the configured threshold. 4. `FilteredExecutor` writes the entire command, including its sensitive arguments, to stderr. 5. An attacker or lower-privileged operator with access to application, CI, container, or centralized logs retrieves the exposed secret. 6. The attacker uses the secret with whatever privileges the credential provides. ### Impact Assessment Successful exploitation can disclose credentials or confidential command arguments to anyone able to read the relevant log ...[truncated 362 chars]- Remediation
View remediation
