T09 · Insecure Skill Coding Practices
- Location
scripts/upload.sh:40- Finding
Persistent Alias Overwrite, Stale Configuration Use, and Credential Exposure
- Content
View full analysis
/dev/null || true ``` ### Technical Analysis The script uses the fixed alias name `rustfs-temp`, but `rc alias set` modifies the user's persistent RustFS client configuration rather than creating an isolated, process-local alias. An existing alias with that name can therefore be overwritten without confirmation, and the original configuration is not restored after execution. The alias configuration command is followed by `|| true`, which suppresses all failures. If alias creation or replacement fails, subsequent commands may continue using a previously configured `rustfs-temp` alias. That stale alias can reference an unintended or attacker-controlled endpoint. The access key and secret key are also supplied as command-line arguments. On systems where process arguments are visible to other local users or monitoring services, the credentials may be exposed while `rc alias set` is running. ### Attack Path 1. A `rustfs-temp` alias already exists in the user's `rc` configuration and references an unintended or attacker-controlled endpoint. This may result from prior configuration, another application using the same fixed name, or prior access to the user's configuration. 2. The user invokes the upload Skill with a legitimate local file and RustFS environment variables. 3. The new `rc alias set` operation fails—for example, because of an invalid endpoint, rejected configuration, filesystem permission error, or incompatible client behavior. 4. The `|| true` construct suppresses that failure and allows execution to continue. 5. Later `rc ls`, `rc mb`, and `rc cp` operatio ...[truncated 1084 chars]- Remediation
View remediation
