T09 · Insecure Skill Coding Practices
- Location
SKILL.md:80- Finding
Shell Command Injection Through Unsanitized API Parameters
- Content
View full analysis
, "suppress_preview_output": true, "input_values": }' ``` The result-retrieval workflow similarly places a user-provided request ID directly into a double-quoted shell argument: ```bash curl -s -X GET "[https://api.bizyair.cn/w/v1/webapp/task/openapi/outputs?requestId=](https://api.bizyair.cn/w/v1/webapp/task/openapi/outputs?requestId=)" \ -H "Authorization: Bearer ${BIZYAIR_API_KEY}" ``` ### Technical Analysis The skill supports user-controlled prompts, custom node values, custom `web_app_id` values, and user-supplied `requestId` values. It instructs the agent to dynamically assemble these values into `curl` commands without requiring strict validation, shell-safe argument handling, or JSON serialization. In the POST command, the request body is enclosed in single quotes. If a dynamic prompt or custom parameter contains a single quote, it can terminate the quoted argument. Additional shell syntax can then be interpreted as a command rather than as JSON data. In the GET command, the request ID is inserted into a double-quoted URL. Shell constructs such as command substitution remain active inside double quotes. A value containing `$(command)` or backticks may therefore cause local command execution when the generated command is interpreted by a shell. Embedded d ...[truncated 2451 chars]- Remediation
View remediation
