T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:69
- Finding
- Plaintext SSH Credentials Exposed Through Process Arguments and Agent Responses<![CDATA[ ## Vulnerability Details **File Location**: - `SKILL.md:60-61` - `SKILL.md:69-73` - `references/agent-execution.md:127-130` - `references/cli.md:29-37` - `references/cli.md:113-127` - `references/examples.md:31-39` - `references/examples.md:98-103` - `references/scenarios.md:43-49` **Vulnerability Type**: Plaintext sensitive-data exposure **Risk Level**: High ### Vulnerable Code Snippets `SKILL.md:60-61` directs the agent to obtain full credentials when a saved connection is unavailable: ```markdown - For `exec/template/tx/tx-workflow/orchestrate/connection test`: - need either full host credentials or usable `--connection`. ``` `SKILL.md:69-73` requires the exact executed command to be returned: ```markdown When command is executed, report: 1. `Operation`: what was run 2. `Command`: exact rauto command 3. `Result`: key output summary ``` `references/agent-execution.md:127-130` places the SSH password directly in a command-line argument: ```bash rauto exec "show version" \ --host <host> --username <username> --password <password> \ --ssh-port 22 --device-profile cisco ``` `references/cli.md:29-37` repeats the direct plaintext-password pattern: ```bash # Direct execute rauto exec "show version" \ --host <host> --username <username> --password <password> --ssh-port 22 # Direct execute with mode rauto exec "show ip route" \ --host <host> --username <username> --password <password> \ --mode Enable ``` `references/cli.md:113-127` also uses plaintext credentials when saving connections and explicitly supports password persistence: ```bash # Add/update saved connection rauto connection add lab1 \ --host <host> --username <username> --password <password> \ --ssh-port 22 --device-profile cisco # List/show/delete rauto connection list rauto connection show lab1 rauto connection delete lab1 # Save effective connection after successful run rauto exec "show version" \ --host <host> --username <username> --password <password> \ --s ...[truncated 3399 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. **Never include secrets in reported commands** - Change the response requirement from “exact command” to “sanitized command.” - Redact all sensitive options, including: - `--password` - `--enable-password` - tokens, private keys, and future secret-bearing flags - Example: ```text Command: rauto exec "show version" --host 10.0.0.5 --username admin --password [REDACTED] ``` 2. **Avoid command-line password arguments** - Prefer a protected saved-connection reference. - If supported by `rauto`, obtain passwords through standard input, an interactive prompt, environment-independent file descriptors, or an operating-system credential store. - Do not place credentials in shell command text or process arguments. 3. **Use secure secret storage** - Store saved passwords in an operating-system keychain, encrypted credential vault, or equivalent protected secret manager. - Keep only a credential reference in connection profiles. - If local files are unavoidable, enforce restrictive permissions such as owner-only access and encrypt secrets at rest. 4. **Require explicit consent before persistence** - Treat `--save-password` as a sensitive operation. - Explain where and how the credential will be stored. - Require explicit confirmation before persisting it. - Prefer saving connection metadata without the password by default. 5. **Apply centralized redaction** - Sanitize commands before they enter agent responses, logs, recordings, telemetry, error messages, or history. - Redaction should happen structurally by recognizing sensitive flags rather than relying only on regular expressions. - Add tests for both `--password value` and `--password=value` forms. 6. **Add recording and backup safeguards** - Warn that full device recordings and configuration output may contain credentials, keys, community strings, or other secrets. - Default to the minimum required r ...[truncated 433 chars]
