T09 · Insecure Skill Coding Practices
- Location
SKILL.md:163- Finding
Cloud credentials are exposed through command-line arguments
- Content
View full analysis
.r2.cloudflarestorage.com ``` ### Technical Analysis The documented commands expand credential-bearing environment variables into command-line arguments. After shell expansion, the access keys and secret keys become part of the `csm` process argument vector. Depending on the operating system, process isolation, logging configuration, and execution environment, command arguments may be exposed through: - Process inspection utilities and operating-system process interfaces. - Agent or terminal command telemetry. - Shell tracing, debugging, and audit systems. - Process supervisors, command wrappers, or endpoint-monitoring products. - Crash diagnostics or error reporting that records the complete command. Passing credentials this way is unnecessary for the declared cloud-storage functionality. Provider-native credential chains, protected standard input, operating-system secret stores, or securely permissioned configuration files can supply the same credentials without placing them in the argument vector. ### Attack Path 1. A user or Agent follows the documented `csm config add` command. 2. The shell replaces variables such as `$AWS_SECRET_ACCESS_KEY` and `$R2_SECRET_KEY` with their plaintext values. 3. The expanded values are passed to `csm` as process arguments. 4. A local process, monitoring component, audit facility, or command-logging integration captures the argument vector. 5. An attacker with access to that captured information extracts the cloud credentials. 6. The attack ...[truncated 891 chars]- Remediation
View remediation
