T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:20
- Finding
- SSH Host-Key Verification Is Disabled<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:20` **Additional Occurrences**: `SKILL.md:30`, `SKILL.md:57`, `SKILL.md:65` **Vulnerability Type**: Insecure SSH configuration permitting host impersonation **Risk Level**: High ### Vulnerable Code ```bash # OpenCode (primary) ssh -o StrictHostKeyChecking=no workspace@<IP> "cd ~/<project> && /home/workspace/.opencode/bin/opencode run 'task'" & ``` The same insecure option also appears in the dispatch pattern and full PR workflow: ```bash ssh -o StrictHostKeyChecking=no workspace@<IP> "cd ~/<project> && /home/workspace/.opencode/bin/opencode run 'Your task. ``` ### Technical Analysis The documented SSH commands explicitly set `StrictHostKeyChecking=no`. This suppresses normal SSH host-key validation and automatically accepts an unknown host key. As a result, possessing or redirecting traffic associated with a workspace IP is treated as sufficient proof of the remote server's identity. Tailscale provides encrypted network transport and device identity controls, but disabling SSH host-key verification still removes an independent endpoint-authentication layer. If an address is stale, incorrectly selected, reassigned, or traffic is otherwise redirected to an unintended system, the workflow can send its remote command and sensitive task content to that system without detecting a host-key mismatch. ### Attack Path 1. An attacker gains control of, or causes the operator to select, an unintended endpoint reachable at the supplied workspace IP. 2. The operator runs the documented command with `StrictHostKeyChecking=no`. 3. SSH accepts the attacker's previously unknown host key without requiring verification. 4. The remote task command and its contents are sent to the attacker-controlled endpoint. 5. Where the task embeds a wake-hook bearer token, the attacker can capture that credential as well. 6. The endpoint can return deceptive command output or execute the requested coding-agent workload in a ...[truncated 507 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove `-o StrictHostKeyChecking=no` from every SSH command. - Provision each legitimate workspace host key into a managed `known_hosts` file before dispatch. - Require strict validation explicitly, for example: ```bash ssh \ -o StrictHostKeyChecking=yes \ -o UserKnownHostsFile=/path/to/managed_known_hosts \ workspace@<validated-IP> ... ``` - Validate that the selected Tailscale IP and device identity correspond to the intended workspace before connecting. - Establish a controlled host-key rotation process rather than bypassing verification when a key changes. - Treat unexpected host-key changes as security events and investigate them before continuing. - Avoid transmitting callback credentials until the remote endpoint has been strongly authenticated. ]]>
