T09 · Insecure Skill Coding Practices
- Location
SKILL.md:27- Finding
Account Password Exposed Through Command-Line Arguments
- Content
View full analysis
--password ``` ### Technical Analysis The documented headless invocation passes the account password directly as a command-line argument. Command-line secrets can be exposed through: - Shell history files - CI/CD job definitions and execution logs - Process inspection utilities - Process accounting and monitoring systems - Terminal session recordings - Diagnostic or crash reports that capture process arguments Although access to process arguments may be restricted by the operating system, the password can remain in shell history or logs after the process exits. This creates unnecessary credential exposure beyond the lifetime of the command. ### Attack Path 1. A user follows the documented headless-mode command and substitutes a real password for the placeholder. 2. The shell records the resulting command in its history, or a CI system records it in job configuration or logs. 3. A local user, administrator, monitoring service, compromised process, or party with access to retained logs reads the exposed command. 4. The attacker extracts the account name and password. 5. The attacker authenticates to the affected service using the stolen credentials. 6. Any resulting access is limited by the compromised account's permissions, but it may include unauthorized use of the remote coding environment if the same credentials are accepted by the service. ### Impact Assessment Successful exploitation discloses the supplied account credentials. The attacker may obtain the privileges assigned to the compromised account, potentially including access to remote coding sessions or associated resources. The scope depends on credential reuse, service-side authorization, operating-system process visibilit ...[truncated 206 chars]- Remediation
View remediation
` example and avoid accepting long-lived secrets as command-line arguments. - Prefer an interactive password prompt that disables terminal echo. - For automation, read the password from a protected file descriptor, operating-system credential store, or dedicated secret-management integration. - If environment variables must be supported, document their residual exposure risks and ensure they are masked in CI logs. - Prefer short-lived, narrowly scoped authentication tokens over reusable account passwords. - Add an explicit warning not to place literal credentials in shell scripts, command history, CI configuration, or logs. - Document credential rotation procedures for users who may already have exposed a password this way. ]]>
