T09 · Insecure Skill Coding Practices
- Location
references/pipeline.md:101- Finding
Unsanitized Slug Interpolation in Shell Command and Filesystem Paths
- Content
View full analysis
公众号配图" ``` Related output-path construction: ```text \公众号配图\ ├── p1.png ~ pN.png ├── -article.md ├── -text-summary.txt └── used-images.json ``` ### Technical Analysis The pipeline interpolates the `` value directly into a documented shell command and multiple filesystem paths. The specification does not require an allowlist, shell escaping, argument-array execution, path canonicalization, or verification that the resulting path remains beneath the intended Desktop output directory. Double quotes do not make arbitrary input safe for shell execution. If the generated slug contains a quotation mark followed by shell metacharacters, it can terminate the quoted argument and introduce additional shell syntax. Separately, path separators or traversal components such as `..` could redirect generated files outside the intended output directory. The project does not define exactly how the slug is generated or prove that it is attacker-controlled. Nevertheless, because the slug is associated with user-provided content and no validation boundary is specified, implementations following this orchestration document may pass unsafe content into the command. ### Attack Path 1. An attacker supplies source material, a title, or metadata that influences the output slug. 2. The resulting slug contains shell metacharacters, quotation marks, path separators, or traversal components. 3. The agent substitutes the slug into the `lark-cli` shell command or Desktop output path. 4. During optional Feishu synchronization, the shell interprets injected syntax rather than treating the entire slug as data. 5. Alternatively, local output operations r ...[truncated 732 chars]- Remediation
View remediation
