T09 · Insecure Skill Coding Practices
- Location
scripts/gui-helper.sh:34- Finding
Sensitive GUI Input Is Disclosed Through Standard Output
- Content
View full analysis
Vulnerability Details
File Location:
scripts/gui-helper.sh, lines 34–39
Vulnerability Type: Plaintext sensitive-data exposure through logging
Risk Level: Mediumbash type) text="${1:-}" xdotool type --delay 50 "$text" echo "Typed: $text" ;;Technical Analysis
The
typecommand accepts arbitrary text for injection into the active GUI window and subsequently prints the entire value to standard output. GUI automation may be used to enter passwords, API tokens, personal information, private messages, or other confidential form data.Although the shell variable is correctly quoted and does not create command injection in this code segment, the status message duplicates the sensitive value into a less restricted output channel. Standard output may be captured by Agent transcripts, gateway logs, terminal recorders, CI systems, or process supervisors.
Attack Path
- A user asks the Agent to enter a password, access token, or other confidential value into a GUI application.
- The Agent invokes
gui-helper.sh typewith that value as an argument. xdotooltypes the value into the active window.- The script executes
echo "Typed: $text"and discloses the complete value through standard output. - Any surrounding logging or transcript system records the disclosed value.
- An operator or process with access to those records can recover the secret.
Impact Assessment
This issue does not directly grant elevated operating-system privileges. Its scope is confidentiality: any text passed to the
typeoperation can be exposed to entities that can access command output or Agent logs. If the disclosed value is a privileged credential or session token, subsequent misuse could provide the permissions associated with that credential, potentially including access to external accounts or protected applications.- Remediation
View remediation
Remediation Suggestions
-
Do not include user-supplied text in status output. Replace the vulnerable message with a constant confirmation:
bash type) text="${1:-}" xdotool type --delay 50 -- "$text" echo "Text typed" ;; -
Avoid passing secrets through command-line arguments where practical, because process inspection and shell history may expose them. Accept sensitive input through standard input or a protected file descriptor.
-
Ensure Agent and gateway logging systems redact credentials and minimize retention of command inputs and outputs.
-
Document that the helper must not echo, log, or persist GUI input values.
-
