T09 · Insecure Skill Coding Practices
- Location
SKILL.md:81- Finding
Headless modes implicitly enable unrestricted automatic approval
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 81-82, 94, 127, 156, 162, and 216-217
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: HighVulnerable Snippet
text Line 81: --print runs in non-interactive Print mode and implicitly enables --yolo. Line 82: --quiet is equivalent to --print --output-format text --final-message-only. Line 94: The recommended default for a quick request is: kimi -p "task description" --quiet Line 127: Headless mode must add --yolo, or rely on --print implicitly enabling --yolo. Line 156: kimi -p "analyze the architecture and potential issues in this project" --quiet Line 162: kimi -p "add unit tests to this project" --print Lines 216-217: Prefer --quiet by default unless the user explicitly requests process output.Technical Analysis
The skill states that
--printimplicitly enables--yolo, while--quietis defined as a derivative of--print. It then recommends--quietas the default mode and provides--printexamples for repository-level tasks.Consequently, commands presented as output-format choices may also automatically approve file changes and shell execution. This conflicts with the skill's separate requirement to obtain explicit user confirmation before enabling YOLO behavior. A user or agent may reasonably select
--quietonly to suppress verbose output without realizing that it also changes the command-approval security boundary.The affected execution inherits the privileges of the account running Kimi CLI. No privilege escalation is demonstrated, but the CLI may perform automatically approved operations available to that account.
Attack Path
- A user asks the agent to analyze or work on a project in headless mode.
- Following the documented default, the agent constructs a command using
--quietor--print. - According to the skill, that mode implicitly enables YOLO behavior.
- Kimi CLI genera ...[truncated 889 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not recommend
--quietor--printas safe defaults if either mode implicitly enables automatic approval. - Explicitly document the approval behavior beside every example using these modes.
- Require affirmative user consent immediately before executing any mode that enables YOLO behavior.
- Separate read-only analysis examples from mutation-capable examples. Use a mode that preserves approval checks for read-only work, if supported.
- If Kimi CLI cannot perform non-interactive execution without automatic approval, state that limitation clearly and require sandboxing rather than presenting the mode as a normal output preference.
- Restrict execution to an explicitly validated
--work-dir, preferably a disposable copy, temporary checkout, container, or other sandbox. - Refuse YOLO execution in home-directory roots, system directories, credential directories, and repositories containing untrusted content.
- Run the CLI as an unprivileged account with minimal filesystem and network permissions.
- Revise examples so that potentially mutating tasks include an explicit consent checkpoint before command construction.
- Add post-execution verification, such as reviewing filesystem changes and preserving a recoverable version-control state.
- Do not recommend
