T09 · Insecure Skill Coding Practices
- Location
SKILL.md:113- Finding
Server-Controlled Update Command Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 113–128
Vulnerability Type: Command injection through trusted remote update responses
Risk Level: HighVulnerable Code
text - If `updates.cli.status` or `updates.skill.status` is `update_available` or `below_minimum`, tell the user once which component is outdated (installed versus latest) and quote the exact `action` command. The task cannot continue until that update is installed. Ask for approval; with approval, run exactly that command (it already carries the required `--approve-upgrade` argument). ... When the printed `action` refreshes this installed Skill, replace `<skill-directory>` with the directory of this installed Skill (the directory containing this Skill's SKILL.md). Never run `doctor` or a generic capability preflight to check freshness; the `update check` command above is the freshness check. Never ask more than once per component per session, and never substitute another command, flag, origin, or download path for the printed `action`.Technical Analysis
The Skill instructs the agent to execute an
actioncommand supplied by a remote CLI or service response without independently validating its command structure. There is no local allowlist of permitted executables and subcommands, no structured argument validation, and no rejection of shell operators or unexpected paths.Although user approval is required, that approval only confirms the general update operation. It does not ensure that the remotely returned command is limited to installing an authentic PersonWise update. The instruction to run the command “exactly” and not substitute it makes the remote response an effective command-execution control channel.
Attack Path
- An attacker compromises or impersonates a component capable of influencing the PersonWise update response, such as the service, CLI response-processing path, or authenticated ...[truncated 1366 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not execute command strings received from a remote service or parsed CLI response.
- Change the update response to structured metadata, such as component, target version, artifact digest, and operation identifier.
- Map that metadata locally to a strict allowlist of fixed commands shipped with the Skill.
- Invoke the approved executable directly with an argument array rather than through a shell.
- Permit only expected update operations and reject shell metacharacters, unknown flags, unexpected paths, and unrecognized origins.
- Require the destination to resolve to the expected CLI binary or installed Skill directory and reject symlinks or path traversal.
- Pin the release origin and verify signatures or exact digests before installation.
- Present the validated component, version, source, and destination to the user before requesting approval.
- Keep the bundled bootstrap scripts as the only CLI installation path where possible, because they use fixed origins and pinned hashes.
- If remote update metadata fails validation, stop the workflow and report the failure instead of falling back to executing the supplied action.
